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 {}.
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
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.
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.
Attacks that exploit this kind of access
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.
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.
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.
run_workflow is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
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.
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.
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.
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 →