Create a new workflow in the Lens API. Specify name, type (sequential, parallel, conditional, team), and ordered list of agent IDs (from list_agents). Optionally set adapters (UUIDs) to persist in workflow.config.adapters, output_language (e.g. pt, en), and schedule settings to create a recurring...
AI agents use create_workflow to create or update resources in Lens — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Lens environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workflow name (e.g. 'Reasoning', 'My Pipeline') |
type | string | — | Workflow type; sequential = agents run in order |
agent_ids | string | Yes | Comma-separated list of agent UUIDs in the order they will run (from list_agents) |
adapter_ids | string | — | Comma-separated adapter UUIDs to persist in workflow.config.adapters |
description | string | — | Optional short description |
output_language | string | — | ISO 639-1 language for output (e.g. pt, en) |
output_formatter | string | — | LEGACY compatibility only. Prefer adapter_ids + export endpoint. |
schedule_enabled | boolean | — | Whether schedule starts enabled (only used if schedule_cron_expr is set) |
schedule_cron_expr | string | — | Optional cron expression (5 fields). If set, creates a workflow schedule. |
schedule_input_json | string | — | Optional JSON string sent as workflow input on each scheduled run |
Parameters from the server's own tool schema.
This tool creates new workflow objects in the system with reversible effects—workflows can be modified or deleted via other tools (delete_workflow_schedule, delete_agent_session). The action persists data but does not irreversibly destroy anything or execute arbitrary code directly. Creation of workflows that invoke agents represents a Write operation.
From the tool's definition Tool creates a new workflow with specification of name, type, agent IDs, adapters, output language, and optional schedule settings. The description explicitly states 'Create a new workflow' indicating data creation.
Risk signalsHigh parameter count (10 properties)
Attacks that exploit this kind of access
Create a new workflow in the Lens API. Specify name, type (sequential, parallel, conditional, team), and ordered list of agent IDs (from list_agents). Optionally set adapters (UUIDs) to persist in workflow.config.adapters, output_language (e.g. pt, en), and schedule settings to create a recurring run immediately after workflow creation. It is categorised as a Write tool in the Lens MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
create_workflow accepts 10 parameters: name, type, agent_ids, adapter_ids, description, output_language, output_formatter, schedule_enabled, schedule_cron_expr, schedule_input_json. Required: name, agent_ids. 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 create_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.
create_workflow is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the create_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 create_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.
create_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 →