Files
windmill/frontend/src/lib/mcpEndpointTools.ts
T
Ruben FiszelandClaude Opus 5 3c8e4b43fd fix: resolve a script path to its new version as soon as the lock lands (#10794)
* fix: resolve a script path to its new version as soon as the lock lands

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011H5ygpzQHkPeYsjiP9GzBy

* fix: tell MCP script deploy callers to stop polling on a lock error

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011H5ygpzQHkPeYsjiP9GzBy

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 11:54:51 +02:00

2467 lines
106 KiB
TypeScript

// Auto-generated MCP tools from OpenAPI specification
// This file is generated by generate_mcp_tools.py - DO NOT EDIT MANUALLY
export interface EndpointTool {
name: string;
description: string;
instructions: string;
path: string;
method: string;
pathParamsSchema?: object;
queryParamsSchema?: object;
bodySchema?: object;
queryFieldRenames?: Record<string, string>;
bodyFieldRenames?: Record<string, string>;
}
export const mcpEndpointTools: EndpointTool[] = [
{
name: "searchDocs",
description: "Full-text search across the entire Windmill documentation. Provide one or more keywords; returns the most relevant docs pages, each with its Source URL and short matching snippets. Use this FIRST to find relevant pages by their content (a flag, function, error message, config key or concept). If the snippets answer the question, answer directly; otherwise call readDocsPage with a returned Source URL to read more.",
instructions: "",
path: "/docs/search",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Keywords to search for in the documentation body, e.g. \"chromium worker tag\" or \"retry exponential backoff\". Fewer, more distinctive words match better."
}
},
"required": [
"query"
]
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "readDocsPage",
description: "Fetch the markdown of a single Windmill documentation page. Provide the `url` of a page found via searchDocs (its Source URL). If the page is large, this returns its list of section headings instead of the full content; call again with the `section` argument set to one of those headings to read that section.",
instructions: "",
path: "/docs/page",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The docs page to read, as a Source URL returned by searchDocs (e.g. https://www.windmill.dev/docs/core_concepts/jobs). A bare path (e.g. /docs/core_concepts/jobs) is also accepted."
},
"section": {
"type": "string",
"description": "Optional. A heading title from the page outline to read just that section instead of the full page."
}
},
"required": [
"url"
]
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listDataMetrics",
description: "list declared measures and dimensions on DuckLake tables: Call this before writing any aggregate query over a DuckLake table. A declared measure is the canonical definition of that number, and reproducing it yourself will silently disagree with it (a `revenue` measure typically excludes refunds or test rows). Filter by `table` for one table's declarations, or by `path_prefix` (e.g. `f/analytics`) for everything declared under a folder; omit both to browse the whole catalog. Results are keyset-paged: a full page may mean more remain, so continue with the `cursor_*` params rather than assuming a measure does not exist. Use each returned `expr` verbatim, and when a measure has a `filter` write it as `expr FILTER (WHERE filter)` so measures with different predicates can share one GROUP BY. If a number you need has no declared measure, write your own aggregate as usual. Results are limited to declarations whose producing script the caller can read",
instructions: "",
path: "/w/{workspace}/data_metrics/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"table": {
"type": "string",
"description": "DuckLake table path, with or without the `ducklake://` scheme"
},
"path_prefix": {
"type": "string",
"description": "Producing script path prefix, e.g. `f/analytics`"
},
"per_page": {
"type": "integer",
"description": "Results per page, capped at 1000 (default 1000)"
},
"cursor_table": {
"type": "string",
"description": "Keyset cursor. To page, pass the previous response's `next_cursor` fields back as `cursor_*`; all four move together, and are omitted for the first page. Continue whenever `next_cursor` is present. Every returned row is one the caller may read, so the cursor never names a hidden row.\n"
},
"cursor_kind": {
"type": "string"
},
"cursor_name": {
"type": "string"
},
"cursor_script": {
"type": "string"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "createVariable",
description: "create variable",
instructions: "",
path: "/w/{workspace}/variables/create",
method: "POST",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"already_encrypted": {
"type": "boolean",
"description": "whether the variable is already encrypted (default false)"
}
},
"required": []
},
bodySchema: {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The path to the variable"
},
"value": {
"type": "string",
"description": "The value of the variable"
},
"is_secret": {
"type": "boolean",
"description": "Whether the variable is a secret"
},
"description": {
"type": "string",
"description": "The description of the variable"
},
"account": {
"type": "integer",
"description": "The account identifier"
},
"is_oauth": {
"type": "boolean",
"description": "Whether the variable is an OAuth variable"
},
"expires_at": {
"type": "string",
"description": "The expiration date of the variable",
"format": "date-time"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"ws_specific": {
"type": "boolean"
}
},
"required": [
"path",
"value",
"is_secret",
"description"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "deleteVariable",
description: "delete variable",
instructions: "",
path: "/w/{workspace}/variables/delete/{path}",
method: "DELETE",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "updateVariable",
description: "update variable",
instructions: "",
path: "/w/{workspace}/variables/update/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"already_encrypted": {
"type": "boolean",
"description": "whether the variable is already encrypted (default false)"
}
},
"required": []
},
bodySchema: {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "The new value of the variable"
},
"is_secret": {
"type": "boolean",
"description": "Whether the variable is a secret"
},
"description": {
"type": "string",
"description": "The new description of the variable"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"ws_specific": {
"type": "boolean"
},
"path__body": {
"type": "string",
"description": "The path to the variable (body parameter). Defaults to `path` when omitted; set it only to change the path."
}
},
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: {
"path__body": "path"
}
},
{
name: "getVariable",
description: "get variable",
instructions: "",
path: "/w/{workspace}/variables/get/{path}",
method: "GET",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"decrypt_secret": {
"type": "boolean",
"description": "ask to decrypt secret if this variable is secret\n(if not secret no effect, default: true)\n"
},
"include_encrypted": {
"type": "boolean",
"description": "ask to include the encrypted value if secret and decrypt secret is not true (default: false)\n"
},
"get_draft": {
"type": "boolean",
"description": "When true, overlay the authed user's draft (if any) onto the deployed payload."
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listVariable",
description: "list variables",
instructions: "",
path: "/w/{workspace}/variables/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"path_start": {
"type": "string",
"description": "filter variables by path prefix"
},
"path": {
"type": "string",
"description": "exact path match filter"
},
"description": {
"type": "string",
"description": "pattern match filter for description field (case-insensitive)"
},
"value": {
"type": "string",
"description": "pattern match filter for non-secret variable values (case-insensitive)"
},
"broad_filter": {
"type": "string",
"description": "broad search across multiple fields (case-insensitive substring match)"
},
"page": {
"type": "integer",
"description": "which page to return (start at 1, default 1)"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"label": {
"type": "string",
"description": "Filter by label"
},
"include_draft_only": {
"type": "boolean",
"description": "When true, append per-user draft variables whose path has no\ndeployed variable. Synthesized rows carry `draft_only: true`\nso the home page can render a \"Draft\" badge.\n"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "createResource",
description: "create resource",
instructions: "",
path: "/w/{workspace}/resources/create",
method: "POST",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"update_if_exists": {
"type": "boolean",
"description": "update the resource if it already exists (default false)"
}
},
"required": []
},
bodySchema: {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The path to the resource"
},
"value": {
"type": "object"
},
"description": {
"type": "string",
"description": "The description of the resource"
},
"resource_type": {
"type": "string",
"description": "The resource_type associated with the resource"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"ws_specific": {
"type": "boolean"
}
},
"required": [
"path",
"value",
"resource_type"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "deleteResource",
description: "delete resource",
instructions: "",
path: "/w/{workspace}/resources/delete/{path}",
method: "DELETE",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "updateResource",
description: "update resource",
instructions: "",
path: "/w/{workspace}/resources/update/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "The new description of the resource"
},
"value": {
"type": "object"
},
"resource_type": {
"type": "string",
"description": "The new resource_type to be associated with the resource"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"ws_specific": {
"type": "boolean"
},
"path__body": {
"type": "string",
"description": "The path to the resource (body parameter). Defaults to `path` when omitted; set it only to change the path."
}
},
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: {
"path__body": "path"
}
},
{
name: "getResource",
description: "get resource",
instructions: "",
path: "/w/{workspace}/resources/get/{path}",
method: "GET",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"get_draft": {
"type": "boolean",
"description": "When true, overlay the authed user's draft (if any) onto the deployed payload."
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listResource",
description: "list resources",
instructions: "",
path: "/w/{workspace}/resources/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "which page to return (start at 1, default 1)"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"resource_type": {
"type": "string",
"description": "resource_types to list from, separated by ',',"
},
"resource_type_exclude": {
"type": "string",
"description": "resource_types to not list from, separated by ',',"
},
"path_start": {
"type": "string",
"description": "filter resources by path prefix"
},
"path": {
"type": "string",
"description": "exact path match filter"
},
"description": {
"type": "string",
"description": "pattern match filter for description field (case-insensitive)"
},
"value": {
"type": "string",
"description": "JSONB subset match filter using base64 encoded JSON"
},
"broad_filter": {
"type": "string",
"description": "broad search across multiple fields (case-insensitive substring match)"
},
"label": {
"type": "string",
"description": "Filter by label"
},
"include_draft_only": {
"type": "boolean",
"description": "When true, append per-user draft resources whose path has\nno deployed resource. Synthesized rows carry\n`draft_only: true`.\n"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listResourceType",
description: "list resource_types",
instructions: "",
path: "/w/{workspace}/resources/type/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: undefined,
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listScripts",
description: "list all scripts",
instructions: "",
path: "/w/{workspace}/scripts/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "which page to return (start at 1, default 1)"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"order_desc": {
"type": "boolean",
"description": "order by desc order (default true)"
},
"created_by": {
"type": "string",
"description": "filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')"
},
"path_start": {
"type": "string",
"description": "mask to filter matching starting path"
},
"path_exact": {
"type": "string",
"description": "mask to filter exact matching path"
},
"first_parent_hash": {
"type": "string",
"description": "mask to filter scripts whom first direct parent has exact hash"
},
"last_parent_hash": {
"type": "string",
"description": "mask to filter scripts whom last parent in the chain has exact hash.\nBeware that each script stores only a limited number of parents. Hence\nthe last parent hash for a script is not necessarily its top-most parent.\nTo find the top-most parent you will have to jump from last to last hash\n until finding the parent\n"
},
"parent_hash": {
"type": "string",
"description": "is the hash present in the array of stored parent hashes for this script.\nThe same warning applies than for last_parent_hash. A script only store a\nlimited number of direct parent\n"
},
"show_archived": {
"type": "boolean",
"description": "(default false)\nshow only the archived files.\nwhen multiple archived hash share the same path, only the ones with the latest create_at\nare\ned.\n"
},
"include_without_main": {
"type": "boolean",
"description": "(default false)\ninclude scripts without an exported main function\n"
},
"include_draft_only": {
"type": "boolean",
"description": "(default false)\ninclude scripts that have no deployed version\n"
},
"is_template": {
"type": "boolean",
"description": "(default regardless)\nif true show only the templates\nif false show only the non templates\nif not defined, show all regardless of if the script is a template\n"
},
"kinds": {
"type": "string",
"description": "(default regardless)\nscript kinds to filter, split by comma\n"
},
"starred_only": {
"type": "boolean",
"description": "(default false)\nshow only the starred items\n"
},
"with_deployment_msg": {
"type": "boolean",
"description": "(default false)\ninclude deployment message\n"
},
"languages": {
"type": "string",
"description": "Filter to only include scripts written in the given languages.\nAccepts multiple values as a comma-separated list.\n"
},
"without_description": {
"type": "boolean",
"description": "(default false)\nIf true, the description field will be omitted from the response.\n"
},
"dedicated_worker": {
"type": "boolean",
"description": "(default regardless)\nIf true, show only scripts with dedicated_worker enabled.\nIf false, show only scripts with dedicated_worker disabled.\n"
},
"label": {
"type": "string",
"description": "Filter by label"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "createScript",
description: "create script: Creates a script at a path that does not already hold one",
instructions: "Specify the path (e.g., 'f/my_folder/my_script'), the content (source code), and the language. For TypeScript, use 'bun' unless deno-specific APIs are needed. A path that already holds a script is refused: use updateScript to deploy a new version of it, and do NOT delete and recreate a script to change it. A new version generates its lock async, and only a version with a lock is runnable: until it lands, a run by path still executes the previous version. Poll getScriptByPath before running the new one and stop on either outcome: lock non-null means it is ready, lock_error_logs set means the lockfile failed and that version will never run, so report the error instead of polling on.",
path: "/w/{workspace}/scripts/create",
method: "POST",
pathParamsSchema: undefined,
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"content": {
"type": "string"
},
"language": {
"type": "string",
"description": "Possible values: python3, deno, go, bash, powershell, postgresql, mysql, bigquery, snowflake, mssql, oracledb, graphql, nativets, bun, php, rust, ansible, csharp, nu, java, ruby, rlang, duckdb, bunnative, dbt"
},
"kind": {
"type": "string",
"description": "Possible values: script, failure, trigger, command, approval, preprocessor"
},
"tag": {
"type": "string"
},
"deployment_message": {
"type": "string"
}
},
"required": [
"path",
"summary",
"content",
"language"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "updateScript",
description: "update script: Deploys a new version of the script at `path`, which must already hold one.\nThe body's `path` is the destination: the same path leaves the script where it\nis, a different one moves it there and archives the old path",
instructions: "Deploys a new version of an existing script, preserving its history, so do NOT delete and recreate a script to change it. Send the whole script, not a patch: read the current one with getScriptByPath first, unless you wrote its content yourself. Set path__body only to move the script to a different path; omit it to leave the script where it is. A path that holds no script is refused: use createScript to create one. A new version generates its lock async, and only a version with a lock is runnable: until it lands, a run by path still executes the previous version. Poll getScriptByPath before running the new one and stop on either outcome: lock non-null means it is ready, lock_error_logs set means the lockfile failed and that version will never run, so report the error instead of polling on.",
path: "/w/{workspace}/scripts/update/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"content": {
"type": "string"
},
"language": {
"type": "string",
"description": "Possible values: python3, deno, go, bash, powershell, postgresql, mysql, bigquery, snowflake, mssql, oracledb, graphql, nativets, bun, php, rust, ansible, csharp, nu, java, ruby, rlang, duckdb, bunnative, dbt"
},
"kind": {
"type": "string",
"description": "Possible values: script, failure, trigger, command, approval, preprocessor"
},
"tag": {
"type": "string"
},
"deployment_message": {
"type": "string"
},
"path__body": {
"type": "string",
"description": "(body parameter). Defaults to `path` when omitted; set it only to change the path."
}
},
"required": [
"summary",
"content",
"language"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: {
"path__body": "path"
}
},
{
name: "deleteScriptByHash",
description: "delete script by hash (erase content but keep hash, require admin)",
instructions: "",
path: "/w/{workspace}/scripts/delete/h/{hash}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"hash": {
"type": "string"
}
},
"required": [
"hash"
]
},
queryParamsSchema: undefined,
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "deleteScriptByPath",
description: "delete script at a given path (require admin)",
instructions: "",
path: "/w/{workspace}/scripts/delete/p/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"keep_captures": {
"type": "boolean",
"description": "keep captures"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "getScriptByPath",
description: "get script by path",
instructions: "",
path: "/w/{workspace}/scripts/get/p/{path}",
method: "GET",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"with_starred_info": {
"type": "boolean"
},
"get_draft": {
"type": "boolean",
"description": "When true, overlay the authed user's draft (if any) onto the deployed payload."
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "runScriptByPath",
description: "run script by path",
instructions: "You should first use getScriptByPath to retrieve the script's schema and understand what arguments are expected.",
path: "/w/{workspace}/jobs/run/p/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listFlows",
description: "list all flows",
instructions: "",
path: "/w/{workspace}/flows/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "which page to return (start at 1, default 1)"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"order_desc": {
"type": "boolean",
"description": "order by desc order (default true)"
},
"created_by": {
"type": "string",
"description": "filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')"
},
"path_start": {
"type": "string",
"description": "mask to filter matching starting path"
},
"path_exact": {
"type": "string",
"description": "mask to filter exact matching path"
},
"show_archived": {
"type": "boolean",
"description": "(default false)\nshow only the archived files.\nwhen multiple archived hash share the same path, only the ones with the latest create_at\nare displayed.\n"
},
"starred_only": {
"type": "boolean",
"description": "(default false)\nshow only the starred items\n"
},
"include_draft_only": {
"type": "boolean",
"description": "(default false)\ninclude items that have no deployed version\n"
},
"with_deployment_msg": {
"type": "boolean",
"description": "(default false)\ninclude deployment message\n"
},
"without_description": {
"type": "boolean",
"description": "(default false)\nIf true, the description field will be omitted from the response.\n"
},
"dedicated_worker": {
"type": "boolean",
"description": "(default regardless)\nIf true, show only flows with dedicated_worker enabled.\nIf false, show only flows with dedicated_worker disabled.\n"
},
"label": {
"type": "string",
"description": "Filter by label"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "getFlowByPath",
description: "get flow by path",
instructions: "",
path: "/w/{workspace}/flows/get/{path}",
method: "GET",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"with_starred_info": {
"type": "boolean"
},
"get_draft": {
"type": "boolean",
"description": "When true, overlay the authed user's draft (if any) onto the deployed payload."
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "createFlow",
description: "create flow",
instructions: "",
path: "/w/{workspace}/flows/create",
method: "POST",
pathParamsSchema: undefined,
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "Short description of what this flow does"
},
"description": {
"type": "string",
"description": "Detailed documentation for this flow"
},
"value": {
"type": "object"
},
"schema": {
"type": "object"
},
"path": {
"type": "string"
},
"tag": {
"type": "string"
},
"deployment_message": {
"type": "string"
}
},
"required": [
"summary",
"value",
"path"
],
"description": "Top-level flow definition containing metadata, configuration, and the flow structure",
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "updateFlow",
description: "update flow",
instructions: "",
path: "/w/{workspace}/flows/update/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "Short description of what this flow does"
},
"description": {
"type": "string",
"description": "Detailed documentation for this flow"
},
"value": {
"type": "object"
},
"schema": {
"type": "object"
},
"tag": {
"type": "string"
},
"deployment_message": {
"type": "string"
},
"path__body": {
"type": "string",
"description": "(body parameter). Defaults to `path` when omitted; set it only to change the path."
}
},
"required": [
"summary",
"value"
],
"description": "Top-level flow definition containing metadata, configuration, and the flow structure",
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: {
"path__body": "path"
}
},
{
name: "deleteFlowByPath",
description: "delete flow by path",
instructions: "",
path: "/w/{workspace}/flows/delete/{path}",
method: "DELETE",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"keep_captures": {
"type": "boolean",
"description": "keep captures"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listApps",
description: "list all apps",
instructions: "Lists every app, low-code and full-code alike. `raw_app` tells them apart: true is a full-code app, which getAppByPath then reads and updateApp deploys. An app with no `raw_app` field is low-code — the field is omitted rather than sent as false. A low-code app can only be read here — editing one is a job for its editor in the UI.",
path: "/w/{workspace}/apps/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "which page to return (start at 1, default 1)"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"path_start": {
"type": "string",
"description": "mask to filter matching starting path"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "getAppByPath",
description: "get app by path",
instructions: "Returns the app's whole `value`, which is what updateApp needs: it takes the whole thing, not a patch. A big enough app is truncated by the tool-result limit; sending that back fails the build rather than deploying something partial, so edit those in the app editor or with the CLI. `raw_app` says whether this is a full-code app (its value holds `files`/`runnables`) or a low-code one (a `grid`), and only a full-code app can be deployed through MCP.",
path: "/w/{workspace}/apps/get/p/{path}",
method: "GET",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "createApp",
description: "create a raw app from its sources, compiling them on a worker (which runs the app's own dependencies to do so)",
instructions: "Creates a raw (full-code) app: `value.files` holds its sources, keyed by path (`/index.tsx`, `/App.tsx`, `/package.json`), and needs an entry point (`/index.tsx`, `/index.ts` or `/index.js`). The sources are compiled on a worker by the same build the editor and the CLI run, so a compile error comes back as the error of this call. Compiling runs the app's own dependencies on a worker, so this tool can execute code there. Low-code apps are legacy and have no MCP tool at all — they are built in their editor.",
path: "/w/{workspace}/apps/create_raw_source",
method: "POST",
pathParamsSchema: undefined,
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"summary": {
"type": "string"
},
"value": {
"type": "object",
"description": "The raw app's value. `files` maps each source path to its content and must contain an entry point; `runnables` and `data` are carried through unchanged.",
"properties": {
"files": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"runnables": {
"type": "object"
},
"data": {
"type": "object"
}
},
"required": [
"files"
]
},
"policy": {
"type": "object",
"properties": {
"triggerables": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"triggerables_v2": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"s3_inputs": {
"type": "array",
"items": {
"type": "object"
}
},
"allowed_s3_keys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"s3_path": {
"type": "string"
},
"resource": {
"type": "string"
}
}
}
},
"execution_mode": {
"type": "string",
"description": "Who the app's runnables execute as. Optional, and what omitting it means depends on the operation: creating an app defaults it to `publisher` (runs on behalf of the app's publisher and requires an authenticated viewer), while updating one keeps the mode the app is already deployed under. Either way `anonymous`, which makes the app publicly executable, is never assumed. Possible values: viewer, publisher, anonymous"
},
"on_behalf_of": {
"type": "string"
},
"on_behalf_of_email": {
"type": "string"
},
"sandbox": {
"type": "boolean",
"description": "Publisher opt-in to app sandbox isolation (alpha). When true the app is isolated from each viewer's Windmill session. When false/absent the app runs same-origin with the viewer's full session (the default, pre-isolation behavior).\n"
},
"frontend_sdk_scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Raw apps: author-declared scopes for the frontend SDK token. Takes effect only when `sandbox` is also true \u2014 an unsandboxed bundle runs with the viewer's own session, so no token is advertised or minted for it and this list stays inert. On a sandboxed app a non-empty list lets viewers mint (after consenting) a short-lived token carrying their own identity restricted to these scopes, handed to the app bundle so `windmill-client` calls run as the viewer. Must be a subset of the server's curated allowlist (jobs:run, jobs:read, users:read, resources:read, variables:read).\n"
}
}
}
},
"required": [
"path",
"value",
"summary",
"policy"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "updateApp",
description: "update a raw app from its sources, compiling them on a worker (which runs the app's own dependencies to do so)",
instructions: "Use this to change a raw (full-code) app — an app whose `raw_app` field is true. Send the whole `value` (`files`, `runnables`, `data`), not a patch: read the current one with getAppByPath first and edit it. The sources are compiled on a worker by the same build the editor and the CLI run, so a compile error comes back as the error of this call. Compiling runs the app's own dependencies on a worker, so this tool can execute code there. Low-code apps are legacy and have no MCP tool at all — they are edited in their editor.",
path: "/w/{workspace}/apps/update_raw_source/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"summary": {
"type": "string"
},
"value": {
"type": "object",
"description": "The raw app's value. `files` maps each source path (e.g. `/index.tsx`, `/App.tsx`, `/package.json`) to its content and must contain an entry point (`/index.tsx`, `/index.ts` or `/index.js`); `runnables` and `data` are carried through unchanged.",
"properties": {
"files": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"runnables": {
"type": "object"
},
"data": {
"type": "object"
}
},
"required": [
"files"
]
},
"policy": {
"type": "object",
"properties": {
"triggerables": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"triggerables_v2": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"s3_inputs": {
"type": "array",
"items": {
"type": "object"
}
},
"allowed_s3_keys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"s3_path": {
"type": "string"
},
"resource": {
"type": "string"
}
}
}
},
"execution_mode": {
"type": "string",
"description": "Who the app's runnables execute as. Optional, and what omitting it means depends on the operation: creating an app defaults it to `publisher` (runs on behalf of the app's publisher and requires an authenticated viewer), while updating one keeps the mode the app is already deployed under. Either way `anonymous`, which makes the app publicly executable, is never assumed. Possible values: viewer, publisher, anonymous"
},
"on_behalf_of": {
"type": "string"
},
"on_behalf_of_email": {
"type": "string"
},
"sandbox": {
"type": "boolean",
"description": "Publisher opt-in to app sandbox isolation (alpha). When true the app is isolated from each viewer's Windmill session. When false/absent the app runs same-origin with the viewer's full session (the default, pre-isolation behavior).\n"
},
"frontend_sdk_scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Raw apps: author-declared scopes for the frontend SDK token. Takes effect only when `sandbox` is also true \u2014 an unsandboxed bundle runs with the viewer's own session, so no token is advertised or minted for it and this list stays inert. On a sandboxed app a non-empty list lets viewers mint (after consenting) a short-lived token carrying their own identity restricted to these scopes, handed to the app bundle so `windmill-client` calls run as the viewer. Must be a subset of the server's curated allowlist (jobs:run, jobs:read, users:read, resources:read, variables:read).\n"
}
}
},
"path__body": {
"type": "string",
"description": "(body parameter). Defaults to `path` when omitted; set it only to change the path."
}
},
"required": [
"value"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: {
"path__body": "path"
}
},
{
name: "runFlowByPath",
description: "run flow by path",
instructions: "You should first use getFlowByPath to retrieve the flow's schema and understand what arguments are expected.",
path: "/w/{workspace}/jobs/run/f/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "runScriptPreviewAndWaitResult",
description: "run script preview and wait for result",
instructions: "Allows testing a script before deploying it. For typescript code, the language to send is either bun or deno. By default, send bun if no deno specific code is detected.",
path: "/w/{workspace}/jobs/run_wait_result/preview",
method: "POST",
pathParamsSchema: undefined,
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "The code to run"
},
"path": {
"type": "string",
"description": "The path to the script"
},
"script_hash": {
"type": "string",
"description": "The hash of the script"
},
"args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"language": {
"type": "string",
"description": "Possible values: python3, deno, go, bash, powershell, postgresql, mysql, bigquery, snowflake, mssql, oracledb, graphql, nativets, bun, php, rust, ansible, csharp, nu, java, ruby, rlang, duckdb, bunnative, dbt"
},
"tag": {
"type": "string"
},
"kind": {
"type": "string",
"description": "Possible values: code, identity, http"
},
"dedicated_worker": {
"type": "boolean"
},
"lock": {
"type": "string"
},
"flow_path": {
"type": "string"
},
"modules": {
"type": "object",
"nullable": true,
"description": "Additional script modules keyed by relative file path",
"additionalProperties": {
"type": "object",
"description": "An additional module file associated with a script",
"properties": {
"content": {
"type": "string",
"description": "The source code content of this module"
},
"language": {
"type": "string",
"description": "Possible values: python3, deno, go, bash, powershell, postgresql, mysql, bigquery, snowflake, mssql, oracledb, graphql, nativets, bun, php, rust, ansible, csharp, nu, java, ruby, rlang, duckdb, bunnative, dbt"
},
"lock": {
"type": "string",
"nullable": true,
"description": "Lock file content for this module's dependencies"
}
},
"required": [
"content",
"language"
]
}
},
"temp_script_refs": {
"type": "object",
"nullable": true,
"description": "Map of relative-import script path -> temp storage hash so the preview job resolves those imports from not-yet-deployed local content instead of the deployed script",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"args",
"content",
"language"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listQueue",
description: "list all queued jobs",
instructions: "",
path: "/w/{workspace}/jobs/queue/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"order_desc": {
"type": "boolean",
"description": "order by desc order (default true)"
},
"created_by": {
"type": "string",
"description": "filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')"
},
"parent_job": {
"type": "string",
"format": "uuid",
"description": "The parent job that is at the origin and responsible for the execution of this script if any"
},
"worker": {
"type": "string",
"description": "filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2')"
},
"script_path_exact": {
"type": "string",
"description": "filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2')"
},
"script_path_start": {
"type": "string",
"description": "filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2')"
},
"schedule_path": {
"type": "string",
"description": "mask to filter by schedule path"
},
"trigger_path": {
"type": "string",
"description": "filter by trigger path. Supports comma-separated list (e.g. 'f/trigger1,f/trigger2') and negation by prefixing all values with '!' (e.g. '!f/trigger1,!f/trigger2')"
},
"trigger_kind": {
"type": "string",
"description": "filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook')"
},
"script_hash": {
"type": "string",
"description": "mask to filter exact matching path"
},
"started_before": {
"type": "string",
"format": "date-time",
"description": "filter on started before (inclusive) timestamp"
},
"started_after": {
"type": "string",
"format": "date-time",
"description": "filter on started after (exclusive) timestamp"
},
"success": {
"type": "boolean",
"description": "filter on successful jobs"
},
"scheduled_for_before_now": {
"type": "boolean",
"description": "filter on jobs scheduled_for before now (hence waitinf for a worker)"
},
"job_kinds": {
"type": "string",
"description": "filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies')"
},
"suspended": {
"type": "boolean",
"description": "filter on suspended jobs"
},
"running": {
"type": "boolean",
"description": "filter on running jobs"
},
"args": {
"type": "string",
"description": "filter on jobs containing those args as a json subset (@> in postgres)"
},
"result": {
"type": "string",
"description": "filter on jobs containing those result as a json subset (@> in postgres)"
},
"allow_wildcards": {
"type": "boolean",
"description": "allow wildcards (*) in the filter of label, tag, worker"
},
"tag": {
"type": "string",
"description": "filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem')"
},
"page": {
"type": "integer",
"description": "which page to return (start at 1, default 1)"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"all_workspaces": {
"type": "boolean",
"description": "get jobs from all workspaces (only valid if request come from the `admins` workspace)"
},
"is_not_schedule": {
"type": "boolean",
"description": "is not a scheduled job"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listJobs",
description: "list all jobs",
instructions: "",
path: "/w/{workspace}/jobs/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"created_by": {
"type": "string",
"description": "filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')"
},
"label": {
"type": "string",
"description": "filter by exact matching job label. Supports comma-separated list (e.g. 'deploy,release') and negation by prefixing all values with '!' (e.g. '!deploy,!release')"
},
"worker": {
"type": "string",
"description": "filter by worker this job ran on. Supports comma-separated list (e.g. 'worker-1,worker-2') and negation by prefixing all values with '!' (e.g. '!worker-1,!worker-2')"
},
"parent_job": {
"type": "string",
"format": "uuid",
"description": "The parent job that is at the origin and responsible for the execution of this script if any"
},
"script_path_exact": {
"type": "string",
"description": "filter by exact matching script path. Supports comma-separated list (e.g. 'f/script1,f/script2') and negation by prefixing all values with '!' (e.g. '!f/script1,!f/script2')"
},
"script_path_start": {
"type": "string",
"description": "filter by script path prefix. Supports comma-separated list (e.g. 'f/folder1,f/folder2') and negation by prefixing all values with '!' (e.g. '!f/folder1,!f/folder2')"
},
"schedule_path": {
"type": "string",
"description": "mask to filter by schedule path"
},
"script_hash": {
"type": "string",
"description": "mask to filter exact matching path"
},
"started_before": {
"type": "string",
"format": "date-time",
"description": "filter on started before (inclusive) timestamp"
},
"started_after": {
"type": "string",
"format": "date-time",
"description": "filter on started after (exclusive) timestamp"
},
"created_before": {
"type": "string",
"format": "date-time",
"description": "filter on created before (inclusive) timestamp"
},
"created_after": {
"type": "string",
"format": "date-time",
"description": "filter on created after (exclusive) timestamp"
},
"completed_before": {
"type": "string",
"format": "date-time",
"description": "filter on started before (inclusive) timestamp"
},
"completed_after": {
"type": "string",
"format": "date-time",
"description": "filter on started after (exclusive) timestamp"
},
"created_before_queue": {
"type": "string",
"format": "date-time",
"description": "filter on jobs created before X for jobs in the queue only"
},
"created_after_queue": {
"type": "string",
"format": "date-time",
"description": "filter on jobs created after X for jobs in the queue only"
},
"running": {
"type": "boolean",
"description": "filter on running jobs"
},
"scheduled_for_before_now": {
"type": "boolean",
"description": "filter on jobs scheduled_for before now (hence waitinf for a worker)"
},
"job_kinds": {
"type": "string",
"description": "filter by job kind. Supports comma-separated list of values ('preview', 'script', 'dependencies', 'flow') and negation by prefixing all values with '!' (e.g. '!preview,!dependencies')"
},
"suspended": {
"type": "boolean",
"description": "filter on suspended jobs"
},
"args": {
"type": "string",
"description": "filter on jobs containing those args as a json subset (@> in postgres)"
},
"tag": {
"type": "string",
"description": "filter by tag/worker group. Supports comma-separated list (e.g. 'gpu,highmem') and negation by prefixing all values with '!' (e.g. '!gpu,!highmem')"
},
"result": {
"type": "string",
"description": "filter on jobs containing those result as a json subset (@> in postgres)"
},
"allow_wildcards": {
"type": "boolean",
"description": "allow wildcards (*) in the filter of label, tag, worker"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"trigger_kind": {
"type": "string",
"description": "filter by trigger kind. Supports comma-separated list (e.g. 'schedule,webhook') and negation by prefixing all values with '!' (e.g. '!schedule,!webhook')"
},
"is_skipped": {
"type": "boolean",
"description": "is the job skipped"
},
"resolved": {
"type": "boolean",
"description": "filter on whether a failure has been marked as handled. true keeps only resolved failures, false hides them"
},
"is_flow_step": {
"type": "boolean",
"description": "is the job a flow step"
},
"has_null_parent": {
"type": "boolean",
"description": "has null parent"
},
"success": {
"type": "boolean",
"description": "filter on successful jobs"
},
"status": {
"type": "string",
"description": "filter on the exact completed job status. Unlike `success=true` (which also matches `skipped`), `status=success` matches only `success`.. Possible values: success, failure, canceled, skipped"
},
"all_workspaces": {
"type": "boolean",
"description": "get jobs from all workspaces (only valid if request come from the `admins` workspace)"
},
"is_not_schedule": {
"type": "boolean",
"description": "is not a scheduled job"
},
"excludes_entrypoint_override": {
"type": "boolean",
"description": "exclude jobs that were started with a `_ENTRYPOINT_OVERRIDE` arg (e.g. dynamic-select helper runs and preprocessor previews)"
},
"broad_filter": {
"type": "string",
"description": "broad search across multiple fields (case-insensitive substring match on path, tag, schedule path, trigger kind, label)"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "getJob",
description: "get job",
instructions: "",
path: "/w/{workspace}/jobs_u/get/{id}",
method: "GET",
pathParamsSchema: {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"id"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"no_logs": {
"type": "boolean"
},
"no_code": {
"type": "boolean"
},
"approval_token": {
"type": "string",
"description": "Approval token granting read access to the job when not logged in. The token must be the one issued for this job's flow (i.e. the flow id used when generating the approval URL)."
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "getJobLogs",
description: "get job logs",
instructions: "",
path: "/w/{workspace}/jobs_u/get_logs/{id}",
method: "GET",
pathParamsSchema: {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"id"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"remove_ansi_warnings": {
"type": "boolean"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "createSchedule",
description: "create schedule",
instructions: "Creates a new schedule.\nThe schedule should include seconds.\nYou should get the schema of the script or flow before creating the schedule to correctly specify the arguments needed.\n",
path: "/w/{workspace}/schedules/create",
method: "POST",
pathParamsSchema: undefined,
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The unique Windmill path for this schedule. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`."
},
"schedule": {
"type": "string",
"description": "Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon"
},
"timezone": {
"type": "string",
"description": "IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York')"
},
"script_path": {
"type": "string",
"description": "Path to the script or flow to execute when triggered"
},
"is_flow": {
"type": "boolean",
"description": "True if script_path points to a flow, false if it points to a script"
},
"args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"enabled": {
"type": "boolean",
"description": "Whether the schedule is currently active and will trigger jobs"
},
"on_failure": {
"type": "string",
"nullable": true,
"description": "Path to a script or flow to run when the scheduled job fails"
},
"on_failure_times": {
"type": "number",
"nullable": true,
"description": "Number of consecutive failures before the on_failure handler is triggered (default 1)"
},
"on_failure_exact": {
"type": "boolean",
"nullable": true,
"description": "If true, trigger on_failure handler only on exactly N failures, not on every failure after N"
},
"on_failure_extra_args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"on_recovery": {
"type": "string",
"nullable": true,
"description": "Path to a script or flow to run when the schedule recovers after failures"
},
"on_recovery_times": {
"type": "number",
"nullable": true,
"description": "Number of consecutive successes before the on_recovery handler is triggered (default 1)"
},
"on_recovery_extra_args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"on_success": {
"type": "string",
"nullable": true,
"description": "Path to a script or flow to run after each successful execution"
},
"on_success_extra_args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"ws_error_handler_muted": {
"type": "boolean",
"description": "If true, the workspace-level error handler will not be triggered for this schedule's failures"
},
"retry": {
"type": "object",
"description": "Retry configuration for failed module executions",
"properties": {
"constant": {
"type": "object",
"description": "Retry with constant delay between attempts",
"properties": {
"attempts": {
"type": "integer",
"description": "Number of retry attempts"
},
"seconds": {
"type": "integer",
"description": "Seconds to wait between retries"
}
}
},
"exponential": {
"type": "object",
"description": "Retry with exponential backoff (delay doubles each time)",
"properties": {
"attempts": {
"type": "integer",
"description": "Number of retry attempts"
},
"multiplier": {
"type": "integer",
"description": "Multiplier for exponential backoff"
},
"seconds": {
"type": "integer",
"minimum": 1,
"description": "Initial delay in seconds"
},
"random_factor": {
"type": "integer",
"minimum": 0,
"maximum": 100,
"description": "Random jitter percentage (0-100) to avoid thundering herd"
}
}
},
"retry_if": {
"type": "object",
"description": "Conditional retry based on error or result",
"properties": {
"expr": {
"type": "string",
"description": "JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables"
}
},
"required": [
"expr"
]
}
}
},
"no_flow_overlap": {
"type": "boolean",
"description": "If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs)"
},
"summary": {
"type": "string",
"nullable": true,
"description": "Short summary describing the purpose of this schedule"
},
"description": {
"type": "string",
"nullable": true,
"description": "Detailed description of what this schedule does"
},
"tag": {
"type": "string",
"nullable": true,
"description": "Worker tag to route jobs to specific worker groups"
},
"paused_until": {
"type": "string",
"nullable": true,
"format": "date-time",
"description": "ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time"
},
"cron_version": {
"type": "string",
"nullable": true,
"description": "Cron parser version. Use 'v2' for extended syntax with additional features"
},
"dynamic_skip": {
"type": "string",
"nullable": true,
"description": "Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false)"
},
"permissioned_as": {
"type": "string",
"description": "The user or group this schedule runs as. Used during deployment to preserve the original schedule owner."
},
"preserve_permissioned_as": {
"type": "boolean",
"description": "When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it."
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"path",
"schedule",
"timezone",
"script_path",
"is_flow",
"args"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "updateSchedule",
description: "update schedule",
instructions: "Updates a schedule.\nThe schedule should include seconds.\nYou should get the schema of the script or flow before updating the schedule to correctly specify the arguments needed.\n",
path: "/w/{workspace}/schedules/update/{path}",
method: "POST",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: {
"type": "object",
"properties": {
"schedule": {
"type": "string",
"description": "Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon"
},
"timezone": {
"type": "string",
"description": "IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York')"
},
"args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"on_failure": {
"type": "string",
"nullable": true,
"description": "Path to a script or flow to run when the scheduled job fails"
},
"on_failure_times": {
"type": "number",
"nullable": true,
"description": "Number of consecutive failures before the on_failure handler is triggered (default 1)"
},
"on_failure_exact": {
"type": "boolean",
"nullable": true,
"description": "If true, trigger on_failure handler only on exactly N failures, not on every failure after N"
},
"on_failure_extra_args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"on_recovery": {
"type": "string",
"nullable": true,
"description": "Path to a script or flow to run when the schedule recovers after failures"
},
"on_recovery_times": {
"type": "number",
"nullable": true,
"description": "Number of consecutive successes before the on_recovery handler is triggered (default 1)"
},
"on_recovery_extra_args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"on_success": {
"type": "string",
"nullable": true,
"description": "Path to a script or flow to run after each successful execution"
},
"on_success_extra_args": {
"type": "object",
"description": "The arguments to pass to the script or flow",
"additionalProperties": true
},
"ws_error_handler_muted": {
"type": "boolean",
"description": "If true, the workspace-level error handler will not be triggered for this schedule's failures"
},
"retry": {
"type": "object",
"description": "Retry configuration for failed module executions",
"properties": {
"constant": {
"type": "object",
"description": "Retry with constant delay between attempts",
"properties": {
"attempts": {
"type": "integer",
"description": "Number of retry attempts"
},
"seconds": {
"type": "integer",
"description": "Seconds to wait between retries"
}
}
},
"exponential": {
"type": "object",
"description": "Retry with exponential backoff (delay doubles each time)",
"properties": {
"attempts": {
"type": "integer",
"description": "Number of retry attempts"
},
"multiplier": {
"type": "integer",
"description": "Multiplier for exponential backoff"
},
"seconds": {
"type": "integer",
"minimum": 1,
"description": "Initial delay in seconds"
},
"random_factor": {
"type": "integer",
"minimum": 0,
"maximum": 100,
"description": "Random jitter percentage (0-100) to avoid thundering herd"
}
}
},
"retry_if": {
"type": "object",
"description": "Conditional retry based on error or result",
"properties": {
"expr": {
"type": "string",
"description": "JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables"
}
},
"required": [
"expr"
]
}
}
},
"no_flow_overlap": {
"type": "boolean",
"description": "If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs)"
},
"summary": {
"type": "string",
"nullable": true,
"description": "Short summary describing the purpose of this schedule"
},
"description": {
"type": "string",
"nullable": true,
"description": "Detailed description of what this schedule does"
},
"tag": {
"type": "string",
"nullable": true,
"description": "Worker tag to route jobs to specific worker groups"
},
"paused_until": {
"type": "string",
"nullable": true,
"format": "date-time",
"description": "ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time"
},
"cron_version": {
"type": "string",
"nullable": true,
"description": "Cron parser version. Use 'v2' for extended syntax with additional features"
},
"dynamic_skip": {
"type": "string",
"nullable": true,
"description": "Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false)"
},
"permissioned_as": {
"type": "string",
"nullable": true,
"description": "The user or group this schedule runs as (e.g., 'u/admin' or 'g/mygroup'). Only admins and wm_deployers can set this via preserve_permissioned_as."
},
"preserve_permissioned_as": {
"type": "boolean",
"nullable": true,
"description": "If true and user is admin/wm_deployers, preserve the provided permissioned_as instead of using the deploying user's identity"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"schedule",
"timezone",
"args"
],
"minProperties": 1
},
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "deleteSchedule",
description: "delete schedule",
instructions: "",
path: "/w/{workspace}/schedules/delete/{path}",
method: "DELETE",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: undefined,
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "getSchedule",
description: "get schedule",
instructions: "",
path: "/w/{workspace}/schedules/get/{path}",
method: "GET",
pathParamsSchema: {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": [
"path"
]
},
queryParamsSchema: {
"type": "object",
"properties": {
"get_draft": {
"type": "boolean",
"description": "When true, overlay the authed user's draft (if any) onto the deployed payload."
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listSchedules",
description: "list schedules",
instructions: "",
path: "/w/{workspace}/schedules/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "which page to return (start at 1, default 1)"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"args": {
"type": "string",
"description": "filter on jobs containing those args as a json subset (@> in postgres)"
},
"path": {
"type": "string",
"description": "filter by path (script path)"
},
"is_flow": {
"type": "boolean",
"description": "filter schedules by whether they target a flow"
},
"path_start": {
"type": "string",
"description": "filter schedules by path prefix"
},
"schedule_path": {
"type": "string",
"description": "exact match on the schedule's path"
},
"description": {
"type": "string",
"description": "pattern match filter for description field (case-insensitive)"
},
"summary": {
"type": "string",
"description": "pattern match filter for summary field (case-insensitive)"
},
"broad_filter": {
"type": "string",
"description": "broad search across multiple fields (case-insensitive substring match)"
},
"label": {
"type": "string",
"description": "Filter by label"
},
"include_draft_only": {
"type": "boolean",
"description": "When true, append per-user draft schedules whose path has\nno deployed schedule. Synthesized rows carry\n`draft_only: true`.\n"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
},
{
name: "listWorkers",
description: "list workers",
instructions: "",
path: "/workers/list",
method: "GET",
pathParamsSchema: undefined,
queryParamsSchema: {
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "which page to return (start at 1, default 1)"
},
"per_page": {
"type": "integer",
"description": "number of items to return for a given page (default 30, max 100)"
},
"ping_since": {
"type": "integer",
"description": "number of seconds the worker must have had a last ping more recent of (default to 300)"
}
},
"required": []
},
bodySchema: undefined,
queryFieldRenames: undefined,
bodyFieldRenames: undefined
}
];