run_workflow

Execute a Lens workflow by id or name. Provide exactly one of workflow_id or workflow_name. For input: use input_json (JSON string, e.g. {"message": "..."}) or input (plain text, sent as {"message": <value>}). Agents use the 'message' key as the main prompt. If both omitted, sends {}.

Server Lens lens-mcp-server
Category Execute
Risk class High
Parameters 50 required

What run_workflow does on Lens

AI agents invoke run_workflow to trigger actions in Lens. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.

ParameterTypeRequiredDescription
input string Plain text input; used when input_json is not set (sent as {"message": <value>})
input_json string JSON string for workflow input (e.g. {"message": "..."})
workflow_id string Workflow UUID
workflow_name string Workflow name (alternative to workflow_id)
wait_until_complete boolean If true, poll until execution finishes

Parameters from the server's own tool schema.

Why run_workflow needs a policy

This tool executes external workflows with user-supplied arguments, making it an Execute category risk. The severity is high because workflows could perform various actions (API calls, data modifications, external integrations) depending on their definition, and the blast radius of a misconfigured or malicious workflow could be substantial.

From the tool's definition Tool name 'run_workflow' combined with description stating 'Execute a Lens workflow' explicitly indicates execution of a workflow.

Questions about run_workflow

What does the run_workflow tool do? +

Execute a Lens workflow by id or name. Provide exactly one of workflow_id or workflow_name. For input: use input_json (JSON string, e.g. {"message": "..."}) or input (plain text, sent as {"message": <value>}). Agents use the 'message' key as the main prompt. If both omitted, sends {}. It is categorised as a Execute tool in the Lens MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does run_workflow accept? +

run_workflow accepts 5 parameters: input, input_json, workflow_id, workflow_name, wait_until_complete. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on run_workflow? +

Register the Lens MCP server in PolicyLayer and add a rule for run_workflow: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Lens. Nothing to install.

What risk level is run_workflow? +

run_workflow is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit run_workflow? +

Yes. Add a rate_limit block to the run_workflow rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block run_workflow completely? +

Set action: deny in the PolicyLayer policy for run_workflow. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides run_workflow? +

run_workflow is provided by the Lens MCP server (lens-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.