> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fail run

> Fail a run.

export const McpToolCall = ({tool, initialArguments = {}, requiresConfirmation = false}) => {
  const validateCall = function validateReferenceToolCall(token, text, requiresConfirmation, confirmed) {
    if (!token.trim()) return {
      error: "Paste a bearer token first."
    };
    let value;
    try {
      value = JSON.parse(text.trim() || "{}");
    } catch {
      return {
        error: "Arguments must be valid JSON."
      };
    }
    if (!value || typeof value !== "object" || Array.isArray(value)) return {
      error: "Arguments must be a JSON object."
    };
    if (requiresConfirmation && !confirmed) return {
      error: "Confirm the tool call before running it."
    };
    return {
      arguments: value
    };
  };
  const endpoint = "https://api.veryfront.com/mcp";
  const tokenStorageKey = 'veryfront.docs.mcpBearerToken';
  const escapeHtml = value => value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  const highlightJson = value => {
    const escaped = escapeHtml(value);
    return escaped.replace(/("(?:\\u[a-fA-F0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+\-]?\d+)?)/g, match => {
      let color = '#f3f4f6';
      if (match.endsWith(':')) {
        color = '#7dd3fc';
      } else if (match.startsWith('"')) {
        color = '#86efac';
      } else if ((/true|false/).test(match)) {
        color = '#c4b5fd';
      } else if ((/null/).test(match)) {
        color = '#fcd34d';
      } else {
        color = '#67e8f9';
      }
      return `<span style="color: ${color}">${match}</span>`;
    });
  };
  const expandJsonStrings = value => {
    if (typeof value === 'string') {
      const trimmed = value.trim();
      if (trimmed.startsWith('{') && trimmed.endsWith('}') || trimmed.startsWith('[') && trimmed.endsWith(']')) {
        try {
          return expandJsonStrings(JSON.parse(trimmed));
        } catch {}
      }
      return value;
    }
    if (Array.isArray(value)) {
      return value.map(expandJsonStrings);
    }
    if (value && typeof value === 'object') {
      return Object.fromEntries(Object.entries(value).map(([key, nestedValue]) => [key, expandJsonStrings(nestedValue)]));
    }
    return value;
  };
  const formatJson = value => {
    try {
      return JSON.stringify(expandJsonStrings(value), null, 2);
    } catch {
      return String(value);
    }
  };
  const formatResponseText = text => {
    const trimmed = text.trim();
    if (!trimmed) return 'No response body.';
    try {
      return formatJson(JSON.parse(trimmed));
    } catch {}
    const ssePayloads = trimmed.split(/\n\n+/).flatMap(chunk => chunk.split('\n').filter(line => line.startsWith('data:')).map(line => line.slice(5).trim()).filter(Boolean));
    for (let index = ssePayloads.length - 1; index >= 0; index -= 1) {
      try {
        return formatJson(JSON.parse(ssePayloads[index]));
      } catch {}
    }
    return trimmed;
  };
  const readStoredToken = () => {
    if (typeof window === 'undefined') return '';
    try {
      return window.sessionStorage.getItem(tokenStorageKey) || '';
    } catch {
      return '';
    }
  };
  const writeStoredToken = value => {
    if (typeof window === 'undefined') return;
    try {
      if (value) {
        window.sessionStorage.setItem(tokenStorageKey, value);
      } else {
        window.sessionStorage.removeItem(tokenStorageKey);
      }
    } catch {}
  };
  const [token, setToken] = useState(readStoredToken);
  const [argumentText, setArgumentText] = useState(formatJson(initialArguments));
  const [status, setStatus] = useState('Ready');
  const [response, setResponse] = useState('No response yet.');
  const [copied, setCopied] = useState(false);
  const [confirmed, setConfirmed] = useState(false);
  const callTool = async () => {
    const validation = validateCall(token, argumentText, requiresConfirmation, confirmed);
    if (('error' in validation)) {
      setStatus(validation.error);
      return;
    }
    const parsedArguments = validation.arguments;
    setConfirmed(false);
    const body = {
      jsonrpc: '2.0',
      id: Date.now(),
      method: 'tools/call',
      params: {
        name: tool,
        arguments: parsedArguments
      }
    };
    setStatus('Calling tool...');
    setResponse(formatJson(body));
    try {
      const result = await fetch(endpoint, {
        method: 'POST',
        headers: {
          accept: 'application/json, text/event-stream',
          'content-type': 'application/json',
          authorization: `Bearer ${token.trim()}`,
          'x-veryfront-origin': 'docs-mcp-tool-page'
        },
        body: JSON.stringify(body)
      });
      const text = await result.text();
      setStatus(result.ok ? 'Response received.' : `Request failed with HTTP ${result.status}.`);
      setResponse(formatResponseText(text));
    } catch (error) {
      setStatus('Request failed.');
      setResponse(error instanceof Error ? error.message : String(error));
    }
  };
  const copyResponse = async () => {
    try {
      await navigator.clipboard.writeText(response);
      setCopied(true);
      setTimeout(() => setCopied(false), 1500);
    } catch {
      setStatus('Copy failed.');
    }
  };
  return <details className="api-try-operation not-prose">
    <summary>Try this tool</summary>
    <p>Replace sample arguments with values for your project or connected account. Calls run only when you select Run tool.</p>
    <div className="api-request-playground not-prose my-6 rounded-xl border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-950">
      <div className="mb-4">
        <div className="text-sm font-semibold text-gray-900 dark:text-gray-100">MCP tool call</div>
        <div className="mt-1 text-sm text-gray-600 dark:text-gray-400">
          Call <code>{tool}</code> against the Veryfront MCP endpoint.
        </div>
      </div>

      <label className="mb-2 block text-sm font-medium text-gray-900 dark:text-gray-100" htmlFor={`${tool}-token`}>
        Bearer token or API key
      </label>
      <input id={`${tool}-token`} className="mb-4 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100" type="password" value={token} onChange={event => {
    const value = event.target.value;
    setToken(value);
    setConfirmed(false);
    writeStoredToken(value);
  }} placeholder="Paste API key or JWT" />

      <label className="mb-2 block text-sm font-medium text-gray-900 dark:text-gray-100" htmlFor={`${tool}-arguments`}>
        Arguments (JSON)
      </label>
      <textarea id={`${tool}-arguments`} className="mb-4 min-h-40 w-full rounded-md border border-gray-300 bg-white px-3 py-2 font-mono text-sm text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100" value={argumentText} onChange={event => {
    setArgumentText(event.target.value);
    setConfirmed(false);
  }} spellCheck={false} />

      {requiresConfirmation && <label className="api-request-confirmation mb-4 flex items-start gap-2 text-sm">
        <input type="checkbox" checked={confirmed} onChange={event => setConfirmed(event.target.checked)} />
        <span>{tool === 'veryfront__set_project_inference_policy' ? 'Replace the project inference policy with these arguments. Omitted constraints will be removed.' : 'Run this tool with these arguments.'}</span>
      </label>}
      <button disabled={status === 'Calling tool...' || requiresConfirmation && !confirmed} className="disabled:opacity-50 disabled:cursor-not-allowed rounded-md bg-gray-900 px-3 py-2 text-sm font-medium text-white hover:bg-gray-700 dark:bg-gray-100 dark:text-gray-950 dark:hover:bg-gray-300" type="button" onClick={callTool}>
        Run tool
      </button>

      <div className="mt-4 text-sm font-medium text-gray-900 dark:text-gray-100">{status}</div>
      <div className="mt-3 overflow-hidden rounded-md border border-gray-300 dark:border-gray-700">
        <div className="flex items-center justify-between bg-gray-100 px-3 py-2 text-sm font-medium text-gray-900 dark:bg-gray-900 dark:text-gray-100">
          <span>Output JSON</span>
          <button className="rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-900 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-950 dark:text-gray-100 dark:hover:bg-gray-800" type="button" onClick={copyResponse}>
            {copied ? 'Copied' : 'Copy'}
          </button>
        </div>
      <pre className="max-h-96 overflow-auto whitespace-pre-wrap break-words bg-gray-950 p-4 text-sm text-gray-100">
        <code dangerouslySetInnerHTML={{
    __html: highlightJson(response)
  }} />
      </pre>
      </div>
    </div>
    </details>;
};

<div className="api-operation-signature">
  `veryfront__fail_run`
</div>

## Access

No external-service connection is required. Use a Veryfront credential with access to the requested resources.

**Call type:** Can change resources.

## Arguments

| Field | Type | Required | Description and constraints |
| - | - | - | - |
| `error` | `object` | Yes | Error details supplied to the tool. |
| `run_id` | `string` | No | Run for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization. Defaults to the current execution when omitted. Format: `uuid`. |
| `idempotency_key` | `string` | No | Retry key for this operation, 1-128 characters. Overrides the HTTP header. If both are omitted, a new key is generated for each call; supply a key to retry safely. Minimum length: `1`. Maximum length: `128`. |

## Example request

Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See [MCP client setup](/docs/cloud/getting-started/connect-mcp).

```json title="request.json" theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__fail_run",
    "arguments": {
      "error": {
        "code": "example",
        "message": "example"
      }
    }
  }
}
```

## Result

The published output shape is summarized below. Inspect both the MCP response content and `isError` when handling a call.

| Field | Type | Required | Description and constraints |
| - | - | - | - |
| `id` | `string` | Yes | Unique run UUID. Format: `uuid`. |
| `status` | `string` | Yes | Current execution state. Values: `"pending"`, `"running"`, `"waiting"`, `"completed"`, `"failed"`, `"cancelled"`. |
| `project_id` | `string` | Yes | Project containing the run. Format: `uuid`. |
| `target` | `object` | Yes | Execution definition; its ID may be null only on historical runs. |
| `input` | `value` | Yes | Business input supplied when the run was created. |
| `output` | `value` | Yes | Final business output; null until successful finalization. |
| `error` | `object` | No | Failure details, present only when the run failed. |
| `title` | `string` | No | Display title, omitted when unset. |
| `labels` | `object` | No | Labels used to organize runs. |
| `parent_run_id` | `string` | No | Immediate parent run ID, present on child runs. Format: `uuid`. |
| `root_run_id` | `string` | No | Top-level ancestor run ID, present on child runs. Format: `uuid`. |
| `created_at` | `string` | Yes | When the run was accepted. Format: `date-time`. |
| `updated_at` | `string` | Yes | When the resource last changed, including usage updates. Format: `date-time`. |
| `started_at` | `string` | No | When the first execution attempt started, omitted before execution. Format: `date-time`. |
| `finished_at` | `string` | No | When the run completed, failed or was cancelled. Format: `date-time`. |
| `config` | `object` | No | Definition-specific execution configuration. |
| `execution` | `object` | No | Resolved execution settings and diagnostics. |
| `control` | `object` | No | Pending control requests and the current wait. |
| `task_id` | `string` | No | Orchestration task ID, distinct from the execution definition. Minimum length: `1`. Maximum length: `200`. |
| `conversation_id` | `string` | No | Conversation containing the run. Format: `uuid`. |
| `input_message_id` | `string` | No | Conversation message that supplied the input. Format: `uuid`. |
| `output_message_id` | `string` | No | Conversation message containing the result. Format: `uuid`. |
| `batch_id` | `string` | No | Batch containing the run. Format: `uuid`. |
| `trigger` | `object or object or object or object or object or object or object or object or object` | No | How execution was initiated. |
| `usage` | `object` | No | Usage when available; unknown measurements are null. |
| `descendants` | `object` | No | Counts and usage across all descendant runs, excluding this run. |
| `artifacts` | `object[]` | No | Files produced by the run. |
| `schemas` | `object` | No | Pinned schemas for business input and output; null means no declared schema. |
| `metadata` | `object` | No | Additional resource metadata. |

## Full schemas

<CodeGroup>
  ```json title="input-schema.json" theme={null}
  {
    "type": "object",
    "properties": {
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Stable failure code."
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "Human-readable failure message."
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "description": "Additional structured values supplied to the tool."
            },
            "description": "Additional failure details."
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false,
        "description": "Error details supplied to the tool."
      },
      "run_id": {
        "type": "string",
        "format": "uuid",
        "description": "Run for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization. Defaults to the current execution when omitted."
      },
      "idempotency_key": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128,
        "description": "Retry key for this operation, 1-128 characters. Overrides the HTTP header. If both are omitted, a new key is generated for each call; supply a key to retry safely."
      }
    },
    "required": [
      "error"
    ],
    "additionalProperties": false,
    "description": "Error for a failed run.",
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
  ```

  ```json title="output-schema.json" theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Unique run UUID."
      },
      "status": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "waiting",
          "completed",
          "failed",
          "cancelled"
        ],
        "description": "Current execution state."
      },
      "project_id": {
        "type": "string",
        "format": "uuid",
        "description": "Project containing the run."
      },
      "target": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "agent",
              "task",
              "workflow",
              "eval"
            ],
            "description": "Execution definition type."
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^\\S+$",
                "description": "Unique identifier for the returned record."
              },
              {
                "type": "null",
                "description": "Unique identifier for the returned record."
              }
            ],
            "description": "Definition ID; null when unavailable on a historical run."
          }
        },
        "required": [
          "type",
          "id"
        ],
        "additionalProperties": false,
        "description": "Execution definition; its ID may be null only on historical runs."
      },
      "input": {
        "description": "Business input supplied when the run was created."
      },
      "output": {
        "$ref": "#/properties/input",
        "description": "Final business output; null until successful finalization."
      },
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Stable failure code."
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "Human-readable failure message."
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/properties/input",
              "description": "Additional structured values associated with this result."
            },
            "description": "Additional failure details."
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false,
        "description": "Failure details, present only when the run failed."
      },
      "title": {
        "type": "string",
        "description": "Display title, omitted when unset."
      },
      "labels": {
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "maxLength": 256,
          "description": "Additional structured values associated with this result."
        },
        "description": "Labels used to organize runs."
      },
      "parent_run_id": {
        "type": "string",
        "format": "uuid",
        "description": "Immediate parent run ID, present on child runs."
      },
      "root_run_id": {
        "type": "string",
        "format": "uuid",
        "description": "Top-level ancestor run ID, present on child runs."
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "When the run was accepted."
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "description": "When the resource last changed, including usage updates."
      },
      "started_at": {
        "type": "string",
        "format": "date-time",
        "description": "When the first execution attempt started, omitted before execution."
      },
      "finished_at": {
        "type": "string",
        "format": "date-time",
        "description": "When the run completed, failed or was cancelled."
      },
      "config": {
        "type": "object",
        "additionalProperties": {
          "$ref": "#/properties/input",
          "description": "A JSON value."
        },
        "description": "Definition-specific execution configuration."
      },
      "execution": {
        "type": "object",
        "properties": {
          "runtime": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "main_branch"
                    ],
                    "description": "Runtime selection kind."
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false,
                "description": "Selected main-branch deployment."
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "environment"
                    ],
                    "description": "Runtime selection kind."
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Environment UUID."
                  }
                },
                "required": [
                  "type",
                  "id"
                ],
                "additionalProperties": false,
                "description": "Selected environment."
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "preview_branch"
                    ],
                    "description": "Runtime selection kind."
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Preview branch UUID."
                  }
                },
                "required": [
                  "type",
                  "id"
                ],
                "additionalProperties": false,
                "description": "Selected preview branch."
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "registered"
                    ],
                    "description": "Runtime selection kind."
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Registered runtime identifier."
                  }
                },
                "required": [
                  "type",
                  "id"
                ],
                "additionalProperties": false,
                "description": "Selected registered runtime."
              }
            ],
            "description": "Resolved logical runtime selection; main_branch identifies the selected main-branch deployment, not a worker process."
          },
          "timeout_seconds": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "description": "Deadline for the whole run in seconds, measured from its first start and including retries."
          },
          "retry_limit": {
            "type": "integer",
            "minimum": 0,
            "description": "Maximum retries after the first attempt; only retryable failures are retried."
          },
          "attempt": {
            "type": "integer",
            "minimum": 1,
            "description": "Current or last execution attempt, starting at 1; absent before execution."
          },
          "exit_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null",
                "description": "The exit code returned by the tool."
              }
            ],
            "description": "Runtime process exit code, or null when no exit code was recorded."
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null",
                "description": "The duration ms returned by the tool."
              }
            ],
            "description": "Elapsed time from first start to finish, including waits and retries; null when not finished."
          },
          "tool_error_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Recorded failed tool invocations during this run."
          },
          "logs": {
            "type": "string",
            "description": "Captured runtime text logs, when available."
          },
          "start_mode": {
            "type": "string",
            "description": "Recorded execution start mode, when available."
          },
          "worker": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Agent worker ID."
              },
              "name": {
                "type": "string",
                "description": "Worker display name, omitted when the worker registered without one."
              },
              "claimed_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the worker claimed the run."
              }
            },
            "required": [
              "id",
              "claimed_at"
            ],
            "additionalProperties": false,
            "description": "Agent worker that claimed and executed the run; present only on worker-executed runs."
          }
        },
        "additionalProperties": false,
        "description": "Resolved execution settings and diagnostics."
      },
      "control": {
        "type": "object",
        "properties": {
          "waiting": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "resume_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scheduled automatic resume time."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "manual_pause"
                    ],
                    "description": "Condition required to resume the run."
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false,
                "description": "Waiting for manual resumption."
              },
              {
                "type": "object",
                "properties": {
                  "resume_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scheduled automatic resume time."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "tool_result"
                    ],
                    "description": "Condition required to resume the run."
                  },
                  "tool_call_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Tool call awaiting a result."
                  }
                },
                "required": [
                  "reason",
                  "tool_call_id"
                ],
                "additionalProperties": false,
                "description": "Waiting for a tool result."
              },
              {
                "type": "object",
                "properties": {
                  "resume_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scheduled automatic resume time."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "integration_connected"
                    ],
                    "description": "Condition required to resume the run."
                  },
                  "integration": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Integration awaiting connection."
                  }
                },
                "required": [
                  "reason",
                  "integration"
                ],
                "additionalProperties": false,
                "description": "Waiting for an integration connection."
              },
              {
                "type": "object",
                "properties": {
                  "resume_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scheduled automatic resume time."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "approval"
                    ],
                    "description": "Condition required to resume the run."
                  },
                  "wait_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Durable wait identifier."
                  },
                  "node_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "minItems": 1,
                    "description": "Workflow nodes awaiting approval."
                  }
                },
                "required": [
                  "reason",
                  "wait_id",
                  "node_ids"
                ],
                "additionalProperties": false,
                "description": "Waiting for workflow approval."
              },
              {
                "type": "object",
                "properties": {
                  "resume_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scheduled automatic resume time."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "event"
                    ],
                    "description": "Condition required to resume the run."
                  },
                  "wait_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Durable wait identifier."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Event required to resume."
                  }
                },
                "required": [
                  "reason",
                  "wait_id",
                  "name"
                ],
                "additionalProperties": false,
                "description": "Waiting for a named event."
              },
              {
                "type": "object",
                "properties": {
                  "resume_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scheduled automatic resume time."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "input_request"
                    ],
                    "description": "Condition required to resume the run."
                  },
                  "input_request_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "description": "Input requests awaiting responses."
                  }
                },
                "required": [
                  "reason",
                  "input_request_ids"
                ],
                "additionalProperties": false,
                "description": "Waiting for input responses."
              },
              {
                "type": "object",
                "properties": {
                  "resume_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scheduled automatic resume time."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "child_run"
                    ],
                    "description": "Condition required to resume the run."
                  },
                  "dependencies": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "run_id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "Canonical UUID of the child run."
                        },
                        "correlation": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "tool_call"
                                  ],
                                  "description": "Child invocation kind."
                                },
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128,
                                  "description": "Tool call identifier."
                                }
                              },
                              "required": [
                                "type",
                                "id"
                              ],
                              "additionalProperties": false,
                              "description": "Child started by a tool call."
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "workflow_node"
                                  ],
                                  "description": "Child invocation kind."
                                },
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128,
                                  "description": "Workflow node identifier."
                                }
                              },
                              "required": [
                                "type",
                                "id"
                              ],
                              "additionalProperties": false,
                              "description": "Child started by a workflow node."
                            }
                          ]
                        }
                      },
                      "required": [
                        "run_id",
                        "correlation"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "description": "Child runs that must finish."
                  }
                },
                "required": [
                  "reason",
                  "dependencies"
                ],
                "additionalProperties": false,
                "description": "Waiting for child runs."
              },
              {
                "type": "object",
                "properties": {
                  "resume_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Scheduled automatic resume time."
                  },
                  "reason": {
                    "type": "string",
                    "enum": [
                      "timer"
                    ],
                    "description": "Condition required to resume the run."
                  }
                },
                "required": [
                  "resume_at",
                  "reason"
                ],
                "additionalProperties": false,
                "description": "Waiting until the scheduled resume time."
              }
            ],
            "description": "The current durable wait, with only the fields required to satisfy that wait."
          },
          "pause": {
            "type": "object",
            "properties": {
              "requested_at": {
                "type": "string",
                "format": "date-time",
                "description": "Time the pause was requested."
              }
            },
            "required": [
              "requested_at"
            ],
            "additionalProperties": false,
            "description": "When a pause was requested; control.waiting confirms when execution is paused."
          },
          "cancellation": {
            "type": "object",
            "properties": {
              "requested_at": {
                "type": "string",
                "format": "date-time",
                "description": "Time cancellation was requested."
              },
              "stopped_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null",
                    "description": "The stopped at returned by the tool."
                  }
                ],
                "description": "Time the runtime confirmed its stop; null until confirmed."
              }
            },
            "required": [
              "requested_at",
              "stopped_at"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "description": "Pending control requests and the current wait."
      },
      "task_id": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "description": "Orchestration task ID, distinct from the execution definition."
      },
      "conversation_id": {
        "type": "string",
        "format": "uuid",
        "description": "Conversation containing the run."
      },
      "input_message_id": {
        "type": "string",
        "format": "uuid",
        "description": "Conversation message that supplied the input."
      },
      "output_message_id": {
        "type": "string",
        "format": "uuid",
        "description": "Conversation message containing the result."
      },
      "batch_id": {
        "type": "string",
        "format": "uuid",
        "description": "Batch containing the run."
      },
      "trigger": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for the returned record."
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 1 details associated with this tool result."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "api_key"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "Unique identifier for the returned record."
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 2 details associated with this tool result."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "service_account"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "Unique identifier for the returned record."
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 3 details associated with this tool result."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "system"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "Unique identifier for the returned record."
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 4 details associated with this tool result."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "schedule"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for the returned record."
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 5 details associated with this tool result."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "webhook"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "Unique identifier for the returned record."
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 6 details associated with this tool result."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "agent"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^\\S+$",
                "description": "Unique identifier for the returned record."
              },
              "tool_call_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "Tool call identifier associated with this result."
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 7 details associated with this tool result."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "task"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^\\S+$",
                "description": "Unique identifier for the returned record."
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 8 details associated with this tool result."
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "workflow"
                ]
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^\\S+$",
                "description": "Unique identifier for the returned record."
              },
              "node_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false,
            "description": "Structured option 9 details associated with this tool result."
          }
        ],
        "description": "How execution was initiated."
      },
      "usage": {
        "type": "object",
        "properties": {
          "tokens": {
            "type": "object",
            "properties": {
              "input": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null",
                    "description": "The input returned by the tool."
                  }
                ],
                "description": "Input tokens excluding cache reads and writes."
              },
              "output": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null",
                    "description": "The output returned by the tool."
                  }
                ],
                "description": "Output tokens including reasoning."
              },
              "cache": {
                "type": "object",
                "properties": {
                  "read": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null",
                        "description": "The read returned by the tool."
                      }
                    ],
                    "description": "Tokens read from the provider cache."
                  },
                  "write": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null",
                        "description": "The write returned by the tool."
                      }
                    ],
                    "description": "Tokens written to the provider cache."
                  }
                },
                "required": [
                  "read",
                  "write"
                ],
                "additionalProperties": false,
                "description": "Structured cache details associated with this tool result."
              },
              "reasoning": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null",
                    "description": "The reasoning returned by the tool."
                  }
                ],
                "description": "Reasoning tokens included in output."
              },
              "total": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null",
                    "description": "The total returned by the tool."
                  }
                ],
                "description": "Sum of input, output, cache-read and cache-write tokens."
              }
            },
            "required": [
              "input",
              "output",
              "cache",
              "total"
            ],
            "additionalProperties": false,
            "description": "Input excludes cache reads/writes; output includes reasoning. Total is input + output + cache.read + cache.write. Null means unknown, never zero."
          },
          "cost": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "enum": [
                  "EUR"
                ],
                "description": "Currency of reference usage value and provider costs."
              },
              "status": {
                "type": "string",
                "enum": [
                  "estimated",
                  "posted",
                  "unavailable"
                ],
                "description": "Whether charges are estimated, posted or unavailable."
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?\\d+(\\.\\d{1,8})?$"
                  },
                  {
                    "type": "null",
                    "description": "The provider returned by the tool."
                  }
                ],
                "description": "Recorded provider USD cost converted to EUR at the catalog reference rate; null when unknown."
              },
              "platform": {
                "anyOf": [
                  {
                    "$ref": "#/properties/usage/properties/cost/properties/provider/anyOf/0",
                    "description": "The platform returned by the tool."
                  },
                  {
                    "type": "null",
                    "description": "The platform returned by the tool."
                  }
                ],
                "description": "Reference usage value minus estimated provider cost; null when either amount is unknown."
              },
              "total": {
                "anyOf": [
                  {
                    "$ref": "#/properties/usage/properties/cost/properties/provider/anyOf/0",
                    "description": "The total returned by the tool."
                  },
                  {
                    "type": "null",
                    "description": "The total returned by the tool."
                  }
                ],
                "description": "Billed credits valued at EUR 0.10 per credit, independent of subscription or purchase discounts."
              },
              "credits": {
                "anyOf": [
                  {
                    "$ref": "#/properties/usage/properties/cost/properties/provider/anyOf/0",
                    "description": "The credits returned by the tool."
                  },
                  {
                    "type": "null",
                    "description": "The credits returned by the tool."
                  }
                ],
                "description": "Billed credit units."
              }
            },
            "required": [
              "currency",
              "status",
              "provider",
              "platform",
              "total",
              "credits"
            ],
            "additionalProperties": false,
            "description": "Estimated EUR usage value before tax: total values billed credits at EUR 0.10 each; provider converts recorded USD cost at the catalog reference rate; platform is total minus provider and can be negative. These amounts are visible to authorized run readers and do not represent invoice charges or actual purchase prices. Descendants sum the same per-run amounts. Credits are exact billed units. Signed decimal strings have at most eight fractional digits. Unknown provider costs leave provider and platform null. Status is independent of token capture; unavailable requires all amounts null. Posted amounts come from the billing ledger and may change through later adjustments."
          },
          "model_calls": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null",
                "description": "The model calls returned by the tool."
              }
            ],
            "description": "Billed provider call count."
          },
          "capture_status": {
            "type": "string",
            "enum": [
              "complete",
              "partial",
              "missing"
            ],
            "description": "Token capture coverage."
          }
        },
        "required": [
          "tokens",
          "cost",
          "capture_status"
        ],
        "additionalProperties": false,
        "description": "Usage when available; unknown measurements are null."
      },
      "descendants": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total descendants at every depth."
          },
          "active": {
            "type": "integer",
            "minimum": 0,
            "description": "Descendants that are pending, running or waiting."
          },
          "has_failures": {
            "type": "boolean",
            "description": "Whether any descendant has failed."
          },
          "usage": {
            "$ref": "#/properties/usage",
            "description": "Aggregate usage of every descendant, excluding this run."
          }
        },
        "required": [
          "total",
          "active",
          "has_failures"
        ],
        "additionalProperties": false,
        "description": "Counts and usage across all descendant runs, excluding this run."
      },
      "artifacts": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "artifact_id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "Immutable artifact identifier."
            },
            "type": {
              "type": "string",
              "minLength": 1,
              "description": "Artifact kind."
            },
            "media_type": {
              "type": "string",
              "minLength": 1,
              "description": "File media type."
            },
            "size_bytes": {
              "type": "integer",
              "minimum": 0,
              "description": "File size in bytes."
            },
            "sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$",
              "description": "SHA-256 digest of the file."
            },
            "href": {
              "type": "string",
              "format": "uri",
              "description": "Authorized artifact URL."
            }
          },
          "required": [
            "artifact_id",
            "type",
            "media_type",
            "size_bytes",
            "sha256",
            "href"
          ],
          "additionalProperties": false,
          "description": "An immutable file reference authorized through the run’s project and conversation permissions."
        },
        "description": "Files produced by the run."
      },
      "schemas": {
        "type": "object",
        "properties": {
          "input": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schema": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/properties/input",
                          "description": "A JSON value."
                        },
                        "description": "Structured option 2 details associated with this tool result."
                      }
                    ],
                    "description": "JSON Schema captured for this run; object schemas and boolean schemas are supported."
                  },
                  "sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "description": "SHA-256 digest of the pinned schema."
                  }
                },
                "required": [
                  "schema",
                  "sha256"
                ],
                "additionalProperties": false,
                "description": "Structured input details associated with this tool result."
              },
              {
                "type": "null",
                "description": "The input returned by the tool."
              }
            ]
          },
          "output": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "schema": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "additionalProperties": {
                          "$ref": "#/properties/input",
                          "description": "A JSON value."
                        },
                        "description": "Structured option 2 details associated with this tool result."
                      }
                    ],
                    "description": "JSON Schema captured for this run; object schemas and boolean schemas are supported."
                  },
                  "sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "description": "SHA-256 digest of the pinned schema."
                  }
                },
                "required": [
                  "schema",
                  "sha256"
                ],
                "additionalProperties": false,
                "description": "Structured output details associated with this tool result."
              },
              {
                "type": "null",
                "description": "The output returned by the tool."
              }
            ]
          }
        },
        "required": [
          "input",
          "output"
        ],
        "additionalProperties": false,
        "description": "Pinned schemas for business input and output; null means no declared schema."
      },
      "metadata": {
        "type": "object",
        "additionalProperties": {
          "$ref": "#/properties/input",
          "description": "A JSON value."
        },
        "description": "Additional resource metadata."
      }
    },
    "required": [
      "id",
      "status",
      "project_id",
      "target",
      "input",
      "output",
      "created_at",
      "updated_at"
    ],
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#",
    "description": "Structured result returned by the fail_run tool."
  }
  ```
</CodeGroup>

<McpToolCall
  tool="veryfront__fail_run"
  requiresConfirmation={true}
  initialArguments={{
"error": {
  "code": "example",
  "message": "example"
}
}}
/>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.