For tools and AI agents: this page as Markdown · the public OpenAPI file
Description
Pass a definition, or a flowId to check a saved flow. It runs the static checks that exo_create_flow and exo_update_flow run first, and saves nothing. Steps your plan does not include are reported as warnings; the result stays valid. For a saved flow, the step types it already has are not reported.
Permission
Needs an API key or OAuth connection with the build permission.
Input
| Name | Type | Required | Description |
|---|---|---|---|
definition | object | No | A flow definition { nodes, edges } to validate. |
flowId | string | No | Validate this existing flow instead of an inline definition. |
Returns
valid, errors and warnings. Each issue has level, message and, where it applies, nodeId.
Plan check
Each step type belongs to a plan. A create or update that adds a step your workspace's plan does not include is refused before anything is saved, with code: "PLAN_REQUIRED", the plan it needs (requiredPlan), the steps involved (steps) and the message in English, Arabic and Chinese (messages). exo_get_node_types marks which steps your plan includes, and exo_validate_flow reports them as warnings.
{
"saved": false,
"code": "PLAN_REQUIRED",
"upgradeRequired": true,
"currentPlan": "starter",
"requiredPlan": "pro",
"steps": [
{
"nodeId": "sftp_1",
"type": "sftp",
"label": "SFTP / FTP Files",
"family": "advanced_integrations",
"requiredPlan": "pro"
}
],
"messages": {
"en": "Your Starter plan doesn't include these steps: SFTP / FTP Files. They are part of the Professional plan. Nothing was created. Upgrade to Professional, or use steps your plan includes.",
"ar": "…",
"zh": "…"
}
}Errors
Returned as a normal result with isError: true:
Flow "<flowId>" not found.Pass either `definition` or `flowId` to validate.`definition` rejected: <reason>.
Returned as a JSON-RPC error:
| Code | HTTP | Message |
|---|---|---|
| -32001 | 403 | API key lacks the 'build' permission required for flow authoring tools |
Messages are shown exactly as the server sends them, in English. A value in angle brackets is filled in at run time.
Examples
Example call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "exo_validate_flow",
"arguments": {
"definition": {
"nodes": [
{
"id": "trigger_1",
"type": "trigger",
"position": {
"x": 0,
"y": 0
},
"data": {
"nodeType": "trigger",
"label": "Webhook",
"config": {}
}
},
{
"id": "http_1",
"type": "http_request",
"position": {
"x": 260,
"y": 0
},
"data": {
"nodeType": "http_request",
"label": "Post order",
"config": {
"url": "https://example.com/orders",
"method": "POST",
"body": "{{trigger.order_id}}"
}
}
}
],
"edges": [
{
"id": "e1",
"source": "trigger_1",
"target": "http_1"
}
]
}
}
}
}curl -X POST https://exomations.com/api/mcp \
-H "X-Api-Key: exo_your_key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"exo_validate_flow","arguments":{"definition":{"nodes":[{"id":"trigger_1","type":"trigger","position":{"x":0,"y":0},"data":{"nodeType":"trigger","label":"Webhook","config":{}}},{"id":"http_1","type":"http_request","position":{"x":260,"y":0},"data":{"nodeType":"http_request","label":"Post order","config":{"url":"https://example.com/orders","method":"POST","body":"{{trigger.order_id}}"}}}],"edges":[{"id":"e1","source":"trigger_1","target":"http_1"}]}}}}'Example result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Valid. 0 warning(s).\n{ ... }"
}
],
"structuredContent": {
"valid": true,
"errors": [],
"warnings": []
},
"isError": false
}
}Example values. In content, the text after the summary line is the same data as structuredContent.