From 2ba422866975bac68c83ed3d707f0a70d0059bab Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Thu, 9 Apr 2026 11:27:08 -0700 Subject: [PATCH] Checkpoitn --- .../resource-content/resource-content.tsx | 4 +- .../[workspaceId]/home/hooks/use-chat.ts | 33 +- apps/sim/hooks/queries/tasks.ts | 4 +- .../lib/copilot/generated/tool-catalog-v1.ts | 3061 +++--------- .../lib/copilot/generated/tool-schemas-v1.ts | 4251 +++++++++-------- apps/sim/lib/copilot/request/go/stream.ts | 1 + 6 files changed, 2848 insertions(+), 4506 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx index 128ff6508d..6a0796f930 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx @@ -165,7 +165,9 @@ export const ResourceContent = memo(function ResourceContent({ } }, [workspaceId, streamFileName]) - const streamingFileMode: 'append' | 'replace' = isWriteStream ? 'append' : 'replace' + // workspace_file preview events now carry whole-file snapshots, not deltas. + // Treat every live preview as replace so the viewer shows the latest snapshot. + const streamingFileMode: 'append' | 'replace' = 'replace' // For existing file resources (not streaming-file), only pass streaming // content for patch operations where the preview splices new content into diff --git a/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts b/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts index 67ecc58e0b..6c1031c343 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts +++ b/apps/sim/app/workspace/[workspaceId]/home/hooks/use-chat.ts @@ -610,11 +610,34 @@ export function useChat( const assistantId = generateId() const reconnect = async () => { - const succeeded = await retryReconnectRef.current({ - streamId: activeStreamId, - assistantId, - gen, - }) + const initialSnapshot = chatHistory.streamSnapshot + const snapshotEvents = Array.isArray(initialSnapshot?.events) + ? (initialSnapshot.events as StreamBatchEvent[]) + : [] + + const reconnectResult = + snapshotEvents.length > 0 + ? await attachToExistingStream({ + streamId: activeStreamId, + assistantId, + expectedGen: gen, + initialBatch: { + success: true, + events: snapshotEvents, + status: initialSnapshot?.status ?? 'unknown', + }, + afterCursor: String(snapshotEvents[snapshotEvents.length - 1]?.eventId ?? '0'), + }) + : null + + const succeeded = + reconnectResult !== null + ? !reconnectResult.error || reconnectResult.aborted + : await retryReconnectRef.current({ + streamId: activeStreamId, + assistantId, + gen, + }) if (!succeeded && streamGenRef.current === gen) { try { finalizeRef.current({ error: true }) diff --git a/apps/sim/hooks/queries/tasks.ts b/apps/sim/hooks/queries/tasks.ts index b68662902b..35faa5200d 100644 --- a/apps/sim/hooks/queries/tasks.ts +++ b/apps/sim/hooks/queries/tasks.ts @@ -85,7 +85,9 @@ export async function fetchChatHistory( return { id: chat.id, title: chat.title, - messages: Array.isArray(chat.messages) ? chat.messages : [], + messages: Array.isArray(chat.messages) + ? chat.messages.map((m: Record) => normalizeMessage(m)) + : [], activeStreamId: chat.conversationId || null, resources: Array.isArray(chat.resources) ? chat.resources : [], streamSnapshot: chat.streamSnapshot || null, diff --git a/apps/sim/lib/copilot/generated/tool-catalog-v1.ts b/apps/sim/lib/copilot/generated/tool-catalog-v1.ts index d7c96cccff..140a92dd98 100644 --- a/apps/sim/lib/copilot/generated/tool-catalog-v1.ts +++ b/apps/sim/lib/copilot/generated/tool-catalog-v1.ts @@ -3,2710 +3,783 @@ // export interface ToolCatalogEntry { - clientExecutable?: boolean - executor: 'client' | 'go' | 'sim' | 'subagent' - hidden?: boolean - id: - | 'agent' - | 'auth' - | 'check_deployment_status' - | 'complete_job' - | 'context_write' - | 'crawl_website' - | 'create_file' - | 'create_folder' - | 'create_job' - | 'create_workflow' - | 'create_workspace_mcp_server' - | 'debug' - | 'delete_file' - | 'delete_folder' - | 'delete_workflow' - | 'delete_workspace_mcp_server' - | 'deploy' - | 'deploy_api' - | 'deploy_chat' - | 'deploy_mcp' - | 'download_to_workspace_file' - | 'edit_workflow' - | 'file' - | 'function_execute' - | 'generate_api_key' - | 'generate_image' - | 'generate_visualization' - | 'get_block_outputs' - | 'get_block_upstream_references' - | 'get_deployed_workflow_state' - | 'get_deployment_version' - | 'get_execution_summary' - | 'get_job_logs' - | 'get_page_contents' - | 'get_platform_actions' - | 'get_workflow_data' - | 'get_workflow_logs' - | 'glob' - | 'grep' - | 'job' - | 'knowledge' - | 'knowledge_base' - | 'list_folders' - | 'list_user_workspaces' - | 'list_workspace_mcp_servers' - | 'manage_credential' - | 'manage_custom_tool' - | 'manage_job' - | 'manage_mcp_tool' - | 'manage_skill' - | 'materialize_file' - | 'move_folder' - | 'move_workflow' - | 'oauth_get_auth_link' - | 'oauth_request_access' - | 'open_resource' - | 'read' - | 'redeploy' - | 'rename_file' - | 'rename_workflow' - | 'research' - | 'respond' - | 'revert_to_version' - | 'run' - | 'run_block' - | 'run_from_block' - | 'run_workflow' - | 'run_workflow_until_block' - | 'scrape_page' - | 'search_documentation' - | 'search_library_docs' - | 'search_online' - | 'search_patterns' - | 'set_environment_variables' - | 'set_global_workflow_variables' - | 'superagent' - | 'table' - | 'tool_search_tool_regex' - | 'update_job_history' - | 'update_workspace_mcp_server' - | 'user_memory' - | 'user_table' - | 'workflow' - | 'workspace_file' - internal?: boolean - mode: 'async' | 'sync' - name: - | 'agent' - | 'auth' - | 'check_deployment_status' - | 'complete_job' - | 'context_write' - | 'crawl_website' - | 'create_file' - | 'create_folder' - | 'create_job' - | 'create_workflow' - | 'create_workspace_mcp_server' - | 'debug' - | 'delete_file' - | 'delete_folder' - | 'delete_workflow' - | 'delete_workspace_mcp_server' - | 'deploy' - | 'deploy_api' - | 'deploy_chat' - | 'deploy_mcp' - | 'download_to_workspace_file' - | 'edit_workflow' - | 'file' - | 'function_execute' - | 'generate_api_key' - | 'generate_image' - | 'generate_visualization' - | 'get_block_outputs' - | 'get_block_upstream_references' - | 'get_deployed_workflow_state' - | 'get_deployment_version' - | 'get_execution_summary' - | 'get_job_logs' - | 'get_page_contents' - | 'get_platform_actions' - | 'get_workflow_data' - | 'get_workflow_logs' - | 'glob' - | 'grep' - | 'job' - | 'knowledge' - | 'knowledge_base' - | 'list_folders' - | 'list_user_workspaces' - | 'list_workspace_mcp_servers' - | 'manage_credential' - | 'manage_custom_tool' - | 'manage_job' - | 'manage_mcp_tool' - | 'manage_skill' - | 'materialize_file' - | 'move_folder' - | 'move_workflow' - | 'oauth_get_auth_link' - | 'oauth_request_access' - | 'open_resource' - | 'read' - | 'redeploy' - | 'rename_file' - | 'rename_workflow' - | 'research' - | 'respond' - | 'revert_to_version' - | 'run' - | 'run_block' - | 'run_from_block' - | 'run_workflow' - | 'run_workflow_until_block' - | 'scrape_page' - | 'search_documentation' - | 'search_library_docs' - | 'search_online' - | 'search_patterns' - | 'set_environment_variables' - | 'set_global_workflow_variables' - | 'superagent' - | 'table' - | 'tool_search_tool_regex' - | 'update_job_history' - | 'update_workspace_mcp_server' - | 'user_memory' - | 'user_table' - | 'workflow' - | 'workspace_file' - parameters: unknown - requiredPermission?: 'admin' | 'write' - requiresConfirmation?: boolean - resultSchema?: unknown - subagentId?: - | 'agent' - | 'auth' - | 'debug' - | 'deploy' - | 'file' - | 'job' - | 'knowledge' - | 'research' - | 'run' - | 'superagent' - | 'table' - | 'workflow' + clientExecutable?: boolean; + executor: "client" | "go" | "sim" | "subagent"; + hidden?: boolean; + id: "agent" | "auth" | "check_deployment_status" | "complete_job" | "context_write" | "crawl_website" | "create_file" | "create_folder" | "create_job" | "create_workflow" | "create_workspace_mcp_server" | "debug" | "delete_file" | "delete_folder" | "delete_workflow" | "delete_workspace_mcp_server" | "deploy" | "deploy_api" | "deploy_chat" | "deploy_mcp" | "download_to_workspace_file" | "edit_workflow" | "file" | "function_execute" | "generate_api_key" | "generate_image" | "generate_visualization" | "get_block_outputs" | "get_block_upstream_references" | "get_deployed_workflow_state" | "get_deployment_version" | "get_execution_summary" | "get_job_logs" | "get_page_contents" | "get_platform_actions" | "get_workflow_data" | "get_workflow_logs" | "glob" | "grep" | "job" | "knowledge" | "knowledge_base" | "list_folders" | "list_user_workspaces" | "list_workspace_mcp_servers" | "manage_credential" | "manage_custom_tool" | "manage_job" | "manage_mcp_tool" | "manage_skill" | "materialize_file" | "move_folder" | "move_workflow" | "oauth_get_auth_link" | "oauth_request_access" | "open_resource" | "read" | "redeploy" | "rename_file" | "rename_workflow" | "research" | "respond" | "revert_to_version" | "run" | "run_block" | "run_from_block" | "run_workflow" | "run_workflow_until_block" | "scrape_page" | "search_documentation" | "search_library_docs" | "search_online" | "search_patterns" | "set_environment_variables" | "set_global_workflow_variables" | "superagent" | "table" | "tool_search_tool_regex" | "update_job_history" | "update_workspace_mcp_server" | "user_memory" | "user_table" | "workflow" | "workspace_file"; + internal?: boolean; + mode: "async" | "sync"; + name: "agent" | "auth" | "check_deployment_status" | "complete_job" | "context_write" | "crawl_website" | "create_file" | "create_folder" | "create_job" | "create_workflow" | "create_workspace_mcp_server" | "debug" | "delete_file" | "delete_folder" | "delete_workflow" | "delete_workspace_mcp_server" | "deploy" | "deploy_api" | "deploy_chat" | "deploy_mcp" | "download_to_workspace_file" | "edit_workflow" | "file" | "function_execute" | "generate_api_key" | "generate_image" | "generate_visualization" | "get_block_outputs" | "get_block_upstream_references" | "get_deployed_workflow_state" | "get_deployment_version" | "get_execution_summary" | "get_job_logs" | "get_page_contents" | "get_platform_actions" | "get_workflow_data" | "get_workflow_logs" | "glob" | "grep" | "job" | "knowledge" | "knowledge_base" | "list_folders" | "list_user_workspaces" | "list_workspace_mcp_servers" | "manage_credential" | "manage_custom_tool" | "manage_job" | "manage_mcp_tool" | "manage_skill" | "materialize_file" | "move_folder" | "move_workflow" | "oauth_get_auth_link" | "oauth_request_access" | "open_resource" | "read" | "redeploy" | "rename_file" | "rename_workflow" | "research" | "respond" | "revert_to_version" | "run" | "run_block" | "run_from_block" | "run_workflow" | "run_workflow_until_block" | "scrape_page" | "search_documentation" | "search_library_docs" | "search_online" | "search_patterns" | "set_environment_variables" | "set_global_workflow_variables" | "superagent" | "table" | "tool_search_tool_regex" | "update_job_history" | "update_workspace_mcp_server" | "user_memory" | "user_table" | "workflow" | "workspace_file"; + parameters: unknown; + requiredPermission?: "admin" | "write"; + requiresConfirmation?: boolean; + resultSchema?: unknown; + subagentId?: "agent" | "auth" | "debug" | "deploy" | "file" | "job" | "knowledge" | "research" | "run" | "superagent" | "table" | "workflow"; } export const Agent: ToolCatalogEntry = { - id: 'agent', - name: 'agent', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { - request: { description: 'What tool/skill/MCP action is needed.', type: 'string' }, - }, - required: ['request'], - type: 'object', - }, - subagentId: 'agent', + id: "agent", + name: "agent", + executor: "subagent", + mode: "async", + parameters: {"properties":{"request":{"description":"What tool/skill/MCP action is needed.","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "agent", internal: true, - requiredPermission: 'write', -} + requiredPermission: "write", +}; export const Auth: ToolCatalogEntry = { - id: 'auth', - name: 'auth', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { - request: { description: 'What authentication/credential action is needed.', type: 'string' }, - }, - required: ['request'], - type: 'object', - }, - subagentId: 'auth', + id: "auth", + name: "auth", + executor: "subagent", + mode: "async", + parameters: {"properties":{"request":{"description":"What authentication/credential action is needed.","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "auth", internal: true, -} +}; export const CheckDeploymentStatus: ToolCatalogEntry = { - id: 'check_deployment_status', - name: 'check_deployment_status', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - workflowId: { - type: 'string', - description: 'Workflow ID to check (defaults to current workflow)', - }, - }, - }, -} + id: "check_deployment_status", + name: "check_deployment_status", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"workflowId":{"type":"string","description":"Workflow ID to check (defaults to current workflow)"}}}, +}; export const CompleteJob: ToolCatalogEntry = { - id: 'complete_job', - name: 'complete_job', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - jobId: { type: 'string', description: 'The ID of the job to mark as completed.' }, - }, - required: ['jobId'], - }, -} + id: "complete_job", + name: "complete_job", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"jobId":{"type":"string","description":"The ID of the job to mark as completed."}},"required":["jobId"]}, +}; export const ContextWrite: ToolCatalogEntry = { - id: 'context_write', - name: 'context_write', - executor: 'go', - mode: 'sync', - parameters: { - type: 'object', - properties: { - content: { - type: 'string', - description: 'Full content to write to the file (replaces existing content)', - }, - file_path: { type: 'string', description: "Path of the file to write (e.g. 'SESSION.md')" }, - }, - required: ['file_path', 'content'], - }, -} + id: "context_write", + name: "context_write", + executor: "go", + mode: "sync", + parameters: {"type":"object","properties":{"content":{"type":"string","description":"Full content to write to the file (replaces existing content)"},"file_path":{"type":"string","description":"Path of the file to write (e.g. 'SESSION.md')"}},"required":["file_path","content"]}, +}; export const CrawlWebsite: ToolCatalogEntry = { - id: 'crawl_website', - name: 'crawl_website', - executor: 'go', - mode: 'sync', - parameters: { - type: 'object', - properties: { - exclude_paths: { - type: 'array', - description: 'Skip URLs matching these patterns', - items: { type: 'string' }, - }, - include_paths: { - type: 'array', - description: 'Only crawl URLs matching these patterns', - items: { type: 'string' }, - }, - limit: { type: 'number', description: 'Maximum pages to crawl (default 10, max 50)' }, - max_depth: { type: 'number', description: 'How deep to follow links (default 2)' }, - url: { type: 'string', description: 'Starting URL to crawl from' }, - }, - required: ['url'], - }, -} + id: "crawl_website", + name: "crawl_website", + executor: "go", + mode: "sync", + parameters: {"type":"object","properties":{"exclude_paths":{"type":"array","description":"Skip URLs matching these patterns","items":{"type":"string"}},"include_paths":{"type":"array","description":"Only crawl URLs matching these patterns","items":{"type":"string"}},"limit":{"type":"number","description":"Maximum pages to crawl (default 10, max 50)"},"max_depth":{"type":"number","description":"How deep to follow links (default 2)"},"url":{"type":"string","description":"Starting URL to crawl from"}},"required":["url"]}, +}; export const CreateFile: ToolCatalogEntry = { - id: 'create_file', - name: 'create_file', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - contentType: { - type: 'string', - description: - 'Optional MIME type override. Usually omit and let the system infer from the file extension.', - }, - fileName: { - type: 'string', - description: - 'Plain workspace filename including extension, e.g. "main.py" or "report.md". Must not contain slashes.', - }, - }, - required: ['fileName'], - }, - resultSchema: { - type: 'object', - properties: { - data: { type: 'object', description: 'Contains id (the fileId) and name.' }, - message: { type: 'string', description: 'Human-readable outcome.' }, - success: { type: 'boolean', description: 'Whether the file was created.' }, - }, - required: ['success', 'message'], - }, - requiredPermission: 'write', -} + id: "create_file", + name: "create_file", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"contentType":{"type":"string","description":"Optional MIME type override. Usually omit and let the system infer from the file extension."},"fileName":{"type":"string","description":"Plain workspace filename including extension, e.g. \"main.py\" or \"report.md\". Must not contain slashes."}},"required":["fileName"]}, + resultSchema: {"type":"object","properties":{"data":{"type":"object","description":"Contains id (the fileId) and name."},"message":{"type":"string","description":"Human-readable outcome."},"success":{"type":"boolean","description":"Whether the file was created."}},"required":["success","message"]}, + requiredPermission: "write", +}; export const CreateFolder: ToolCatalogEntry = { - id: 'create_folder', - name: 'create_folder', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - name: { type: 'string', description: 'Folder name.' }, - parentId: { type: 'string', description: 'Optional parent folder ID.' }, - workspaceId: { type: 'string', description: 'Optional workspace ID.' }, - }, - required: ['name'], - }, - requiredPermission: 'write', -} + id: "create_folder", + name: "create_folder", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"name":{"type":"string","description":"Folder name."},"parentId":{"type":"string","description":"Optional parent folder ID."},"workspaceId":{"type":"string","description":"Optional workspace ID."}},"required":["name"]}, + requiredPermission: "write", +}; export const CreateJob: ToolCatalogEntry = { - id: 'create_job', - name: 'create_job', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - cron: { - type: 'string', - description: - "Cron expression for recurring jobs (e.g., '*/5 * * * *' for every 5 minutes, '0 9 * * *' for daily at 9 AM). Omit for one-time jobs.", - }, - lifecycle: { - type: 'string', - description: - "'persistent' (default) or 'until_complete'. Until_complete jobs stop when complete_job is called after the success condition is met.", - enum: ['persistent', 'until_complete'], - }, - maxRuns: { - type: 'integer', - description: - 'Maximum number of executions before the job auto-completes. Safety limit to prevent runaway polling.', - }, - prompt: { - type: 'string', - description: - 'The prompt to execute when the job fires. This is sent to the Mothership as a user message.', - }, - successCondition: { - type: 'string', - description: - "What must happen for the job to be considered complete. Used with until_complete lifecycle (e.g., 'John has replied to the partnership email').", - }, - time: { - type: 'string', - description: - "ISO 8601 datetime for one-time execution or as the start time for a cron schedule (e.g., '2026-03-06T09:00:00'). Include timezone offset or use the timezone parameter.", - }, - timezone: { - type: 'string', - description: - "IANA timezone for the schedule (e.g., 'America/New_York', 'Europe/London'). Defaults to UTC.", - }, - title: { - type: 'string', - description: - "A short, descriptive title for the job (e.g., 'Email Poller', 'Daily Report'). Used as the display name.", - }, - }, - required: ['title', 'prompt'], - }, -} + id: "create_job", + name: "create_job", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"cron":{"type":"string","description":"Cron expression for recurring jobs (e.g., '*/5 * * * *' for every 5 minutes, '0 9 * * *' for daily at 9 AM). Omit for one-time jobs."},"lifecycle":{"type":"string","description":"'persistent' (default) or 'until_complete'. Until_complete jobs stop when complete_job is called after the success condition is met.","enum":["persistent","until_complete"]},"maxRuns":{"type":"integer","description":"Maximum number of executions before the job auto-completes. Safety limit to prevent runaway polling."},"prompt":{"type":"string","description":"The prompt to execute when the job fires. This is sent to the Mothership as a user message."},"successCondition":{"type":"string","description":"What must happen for the job to be considered complete. Used with until_complete lifecycle (e.g., 'John has replied to the partnership email')."},"time":{"type":"string","description":"ISO 8601 datetime for one-time execution or as the start time for a cron schedule (e.g., '2026-03-06T09:00:00'). Include timezone offset or use the timezone parameter."},"timezone":{"type":"string","description":"IANA timezone for the schedule (e.g., 'America/New_York', 'Europe/London'). Defaults to UTC."},"title":{"type":"string","description":"A short, descriptive title for the job (e.g., 'Email Poller', 'Daily Report'). Used as the display name."}},"required":["title","prompt"]}, +}; export const CreateWorkflow: ToolCatalogEntry = { - id: 'create_workflow', - name: 'create_workflow', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - description: { type: 'string', description: 'Optional workflow description.' }, - folderId: { type: 'string', description: 'Optional folder ID.' }, - name: { type: 'string', description: 'Workflow name.' }, - workspaceId: { type: 'string', description: 'Optional workspace ID.' }, - }, - required: ['name'], - }, - requiredPermission: 'write', -} + id: "create_workflow", + name: "create_workflow", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"description":{"type":"string","description":"Optional workflow description."},"folderId":{"type":"string","description":"Optional folder ID."},"name":{"type":"string","description":"Workflow name."},"workspaceId":{"type":"string","description":"Optional workspace ID."}},"required":["name"]}, + requiredPermission: "write", +}; export const CreateWorkspaceMcpServer: ToolCatalogEntry = { - id: 'create_workspace_mcp_server', - name: 'create_workspace_mcp_server', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - description: { type: 'string', description: 'Optional description for the server' }, - name: { type: 'string', description: 'Required: server name' }, - workspaceId: { type: 'string', description: 'Workspace ID (defaults to current workspace)' }, - }, - required: ['name'], - }, + id: "create_workspace_mcp_server", + name: "create_workspace_mcp_server", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"description":{"type":"string","description":"Optional description for the server"},"name":{"type":"string","description":"Required: server name"},"workspaceId":{"type":"string","description":"Workspace ID (defaults to current workspace)"}},"required":["name"]}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const Debug: ToolCatalogEntry = { - id: 'debug', - name: 'debug', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { - context: { - description: - 'Pre-gathered context: workflow state JSON, block schemas, error logs. The debug agent will skip re-reading anything included here.', - type: 'string', - }, - request: { - description: - 'What to debug. Include error messages, block IDs, and any context about the failure.', - type: 'string', - }, - }, - required: ['request'], - type: 'object', - }, - subagentId: 'debug', + id: "debug", + name: "debug", + executor: "subagent", + mode: "async", + parameters: {"properties":{"context":{"description":"Pre-gathered context: workflow state JSON, block schemas, error logs. The debug agent will skip re-reading anything included here.","type":"string"},"request":{"description":"What to debug. Include error messages, block IDs, and any context about the failure.","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "debug", internal: true, -} +}; export const DeleteFile: ToolCatalogEntry = { - id: 'delete_file', - name: 'delete_file', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - fileId: { type: 'string', description: 'Canonical workspace file ID of the file to delete.' }, - }, - required: ['fileId'], - }, - resultSchema: { - type: 'object', - properties: { - message: { type: 'string', description: 'Human-readable outcome.' }, - success: { type: 'boolean', description: 'Whether the delete succeeded.' }, - }, - required: ['success', 'message'], - }, - requiredPermission: 'write', -} + id: "delete_file", + name: "delete_file", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"fileId":{"type":"string","description":"Canonical workspace file ID of the file to delete."}},"required":["fileId"]}, + resultSchema: {"type":"object","properties":{"message":{"type":"string","description":"Human-readable outcome."},"success":{"type":"boolean","description":"Whether the delete succeeded."}},"required":["success","message"]}, + requiredPermission: "write", +}; export const DeleteFolder: ToolCatalogEntry = { - id: 'delete_folder', - name: 'delete_folder', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { folderId: { type: 'string', description: 'The folder ID to delete.' } }, - required: ['folderId'], - }, + id: "delete_folder", + name: "delete_folder", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"folderId":{"type":"string","description":"The folder ID to delete."}},"required":["folderId"]}, requiresConfirmation: true, - requiredPermission: 'write', -} + requiredPermission: "write", +}; export const DeleteWorkflow: ToolCatalogEntry = { - id: 'delete_workflow', - name: 'delete_workflow', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { workflowId: { type: 'string', description: 'The workflow ID to delete.' } }, - required: ['workflowId'], - }, + id: "delete_workflow", + name: "delete_workflow", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"workflowId":{"type":"string","description":"The workflow ID to delete."}},"required":["workflowId"]}, requiresConfirmation: true, - requiredPermission: 'write', -} + requiredPermission: "write", +}; export const DeleteWorkspaceMcpServer: ToolCatalogEntry = { - id: 'delete_workspace_mcp_server', - name: 'delete_workspace_mcp_server', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - serverId: { type: 'string', description: 'Required: the MCP server ID to delete' }, - }, - required: ['serverId'], - }, + id: "delete_workspace_mcp_server", + name: "delete_workspace_mcp_server", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"serverId":{"type":"string","description":"Required: the MCP server ID to delete"}},"required":["serverId"]}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const Deploy: ToolCatalogEntry = { - id: 'deploy', - name: 'deploy', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { - request: { - description: - 'Detailed deployment instructions. Include deployment type (api/chat) and ALL user-specified options: identifier, title, description, authType, password, allowedEmails, welcomeMessage, outputConfigs (block outputs to display).', - type: 'string', - }, - }, - required: ['request'], - type: 'object', - }, - subagentId: 'deploy', + id: "deploy", + name: "deploy", + executor: "subagent", + mode: "async", + parameters: {"properties":{"request":{"description":"Detailed deployment instructions. Include deployment type (api/chat) and ALL user-specified options: identifier, title, description, authType, password, allowedEmails, welcomeMessage, outputConfigs (block outputs to display).","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "deploy", internal: true, -} +}; export const DeployApi: ToolCatalogEntry = { - id: 'deploy_api', - name: 'deploy_api', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - action: { - type: 'string', - description: 'Whether to deploy or undeploy the API endpoint', - enum: ['deploy', 'undeploy'], - default: 'deploy', - }, - workflowId: { - type: 'string', - description: 'Workflow ID to deploy (required in workspace context)', - }, - }, - }, + id: "deploy_api", + name: "deploy_api", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"action":{"type":"string","description":"Whether to deploy or undeploy the API endpoint","enum":["deploy","undeploy"],"default":"deploy"},"workflowId":{"type":"string","description":"Workflow ID to deploy (required in workspace context)"}}}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const DeployChat: ToolCatalogEntry = { - id: 'deploy_chat', - name: 'deploy_chat', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - action: { - type: 'string', - description: 'Whether to deploy or undeploy the chat interface', - enum: ['deploy', 'undeploy'], - default: 'deploy', - }, - allowedEmails: { - type: 'array', - description: 'List of allowed emails/domains for email or SSO auth', - items: { type: 'string' }, - }, - authType: { - type: 'string', - description: 'Authentication type: public, password, email, or sso', - enum: ['public', 'password', 'email', 'sso'], - default: 'public', - }, - description: { type: 'string', description: 'Optional description for the chat' }, - identifier: { - type: 'string', - description: 'URL slug for the chat (lowercase letters, numbers, hyphens only)', - }, - outputConfigs: { - type: 'array', - description: 'Output configurations specifying which block outputs to display in chat', - items: { - type: 'object', - properties: { - blockId: { type: 'string', description: 'The block UUID' }, - path: { - type: 'string', - description: "The output path (e.g. 'response', 'response.content')", - }, - }, - required: ['blockId', 'path'], - }, - }, - password: { type: 'string', description: 'Password for password-protected chats' }, - title: { type: 'string', description: 'Display title for the chat interface' }, - welcomeMessage: { type: 'string', description: 'Welcome message shown to users' }, - workflowId: { - type: 'string', - description: 'Workflow ID to deploy (required in workspace context)', - }, - }, - }, + id: "deploy_chat", + name: "deploy_chat", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"action":{"type":"string","description":"Whether to deploy or undeploy the chat interface","enum":["deploy","undeploy"],"default":"deploy"},"allowedEmails":{"type":"array","description":"List of allowed emails/domains for email or SSO auth","items":{"type":"string"}},"authType":{"type":"string","description":"Authentication type: public, password, email, or sso","enum":["public","password","email","sso"],"default":"public"},"description":{"type":"string","description":"Optional description for the chat"},"identifier":{"type":"string","description":"URL slug for the chat (lowercase letters, numbers, hyphens only)"},"outputConfigs":{"type":"array","description":"Output configurations specifying which block outputs to display in chat","items":{"type":"object","properties":{"blockId":{"type":"string","description":"The block UUID"},"path":{"type":"string","description":"The output path (e.g. 'response', 'response.content')"}},"required":["blockId","path"]}},"password":{"type":"string","description":"Password for password-protected chats"},"title":{"type":"string","description":"Display title for the chat interface"},"welcomeMessage":{"type":"string","description":"Welcome message shown to users"},"workflowId":{"type":"string","description":"Workflow ID to deploy (required in workspace context)"}}}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const DeployMcp: ToolCatalogEntry = { - id: 'deploy_mcp', - name: 'deploy_mcp', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - parameterDescriptions: { - type: 'array', - description: 'Array of parameter descriptions for the tool', - items: { - type: 'object', - properties: { - description: { type: 'string', description: 'Parameter description' }, - name: { type: 'string', description: 'Parameter name' }, - }, - required: ['name', 'description'], - }, - }, - serverId: { - type: 'string', - description: 'Required: server ID from list_workspace_mcp_servers', - }, - toolDescription: { type: 'string', description: 'Description for the MCP tool' }, - toolName: { - type: 'string', - description: 'Name for the MCP tool (defaults to workflow name)', - }, - workflowId: { type: 'string', description: 'Workflow ID (defaults to active workflow)' }, - }, - required: ['serverId'], - }, + id: "deploy_mcp", + name: "deploy_mcp", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"parameterDescriptions":{"type":"array","description":"Array of parameter descriptions for the tool","items":{"type":"object","properties":{"description":{"type":"string","description":"Parameter description"},"name":{"type":"string","description":"Parameter name"}},"required":["name","description"]}},"serverId":{"type":"string","description":"Required: server ID from list_workspace_mcp_servers"},"toolDescription":{"type":"string","description":"Description for the MCP tool"},"toolName":{"type":"string","description":"Name for the MCP tool (defaults to workflow name)"},"workflowId":{"type":"string","description":"Workflow ID (defaults to active workflow)"}},"required":["serverId"]}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const DownloadToWorkspaceFile: ToolCatalogEntry = { - id: 'download_to_workspace_file', - name: 'download_to_workspace_file', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - fileName: { - type: 'string', - description: - 'Optional workspace file name to save as. If omitted, the name is inferred from the response or URL.', - }, - url: { - type: 'string', - description: - 'Direct URL of the file to download, such as an image CDN URL ending in .png or .jpg', - }, - }, - required: ['url'], - }, - requiredPermission: 'write', -} + id: "download_to_workspace_file", + name: "download_to_workspace_file", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"fileName":{"type":"string","description":"Optional workspace file name to save as. If omitted, the name is inferred from the response or URL."},"url":{"type":"string","description":"Direct URL of the file to download, such as an image CDN URL ending in .png or .jpg"}},"required":["url"]}, + requiredPermission: "write", +}; export const EditWorkflow: ToolCatalogEntry = { - id: 'edit_workflow', - name: 'edit_workflow', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - operations: { - type: 'array', - description: 'Array of edit operations', - items: { - type: 'object', - properties: { - block_id: { - type: 'string', - description: - 'Block ID for the operation. For add operations, this will be the desired ID for the new block.', - }, - operation_type: { - type: 'string', - description: 'Type of operation to perform', - enum: ['add', 'edit', 'delete', 'insert_into_subflow', 'extract_from_subflow'], - }, - params: { - type: 'object', - description: - 'Parameters for the operation. \nFor edit: {"inputs": {"temperature": 0.5}} NOT {"subBlocks": {"temperature": {"value": 0.5}}}\nFor add: {"type": "agent", "name": "My Agent", "inputs": {"model": "gpt-4o"}}\nFor delete: {} (empty object)', - }, - }, - required: ['operation_type', 'block_id', 'params'], - }, - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to edit. If not provided, uses the current workflow in context.', - }, - }, - required: ['operations'], - }, - requiredPermission: 'write', -} + id: "edit_workflow", + name: "edit_workflow", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"operations":{"type":"array","description":"Array of edit operations","items":{"type":"object","properties":{"block_id":{"type":"string","description":"Block ID for the operation. For add operations, this will be the desired ID for the new block."},"operation_type":{"type":"string","description":"Type of operation to perform","enum":["add","edit","delete","insert_into_subflow","extract_from_subflow"]},"params":{"type":"object","description":"Parameters for the operation. \nFor edit: {\"inputs\": {\"temperature\": 0.5}} NOT {\"subBlocks\": {\"temperature\": {\"value\": 0.5}}}\nFor add: {\"type\": \"agent\", \"name\": \"My Agent\", \"inputs\": {\"model\": \"gpt-4o\"}}\nFor delete: {} (empty object)"}},"required":["operation_type","block_id","params"]}},"workflowId":{"type":"string","description":"Optional workflow ID to edit. If not provided, uses the current workflow in context."}},"required":["operations"]}, + requiredPermission: "write", +}; export const File: ToolCatalogEntry = { - id: 'file', - name: 'file', - executor: 'subagent', - mode: 'async', - parameters: { type: 'object' }, - subagentId: 'file', + id: "file", + name: "file", + executor: "subagent", + mode: "async", + parameters: {"type":"object"}, + subagentId: "file", internal: true, -} +}; export const FunctionExecute: ToolCatalogEntry = { - id: 'function_execute', - name: 'function_execute', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - code: { - type: 'string', - description: - 'Code to execute. For JS: raw statements auto-wrapped in async context. For Python: full script. For shell: bash script with access to pre-installed CLI tools and workspace env vars as $VAR_NAME.', - }, - inputFiles: { - type: 'array', - description: - 'Canonical workspace file IDs to mount in the sandbox. Discover IDs via read("files/{name}/meta.json") or glob("files/by-id/*/meta.json"). Mounted path: /home/user/files/{fileId}/{originalName}. Example: ["wf_123"]', - items: { type: 'string' }, - }, - inputTables: { - type: 'array', - description: - 'Table IDs to mount as CSV files in the sandbox. Each table appears at /home/user/tables/{tableId}.csv with a header row. Example: ["tbl_abc123"]', - items: { type: 'string' }, - }, - language: { - type: 'string', - description: 'Execution language.', - enum: ['javascript', 'python', 'shell'], - }, - outputFormat: { - type: 'string', - description: - 'Format for outputPath. Determines how the code result is serialized. If omitted, inferred from outputPath file extension.', - enum: ['json', 'csv', 'txt', 'md', 'html'], - }, - outputMimeType: { - type: 'string', - description: - 'MIME type for outputSandboxPath export. Required for binary files: image/png, image/jpeg, application/pdf, etc. Omit for text files.', - }, - outputPath: { - type: 'string', - description: - 'Pipe output directly to a NEW workspace file instead of returning in context. ALWAYS use this instead of a separate workspace_file write call. Use a flat path like "files/result.json" — nested paths are not supported.', - }, - outputSandboxPath: { - type: 'string', - description: - 'Path to a file created inside the sandbox that should be exported to the workspace. Use together with outputPath.', - }, - outputTable: { - type: 'string', - description: - 'Table ID to overwrite with the code\'s return value. Code MUST return an array of objects where keys match column names. All existing rows are replaced. Example: "tbl_abc123"', - }, - }, - required: ['code'], - }, - requiredPermission: 'write', -} + id: "function_execute", + name: "function_execute", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"code":{"type":"string","description":"Code to execute. For JS: raw statements auto-wrapped in async context. For Python: full script. For shell: bash script with access to pre-installed CLI tools and workspace env vars as $VAR_NAME."},"inputFiles":{"type":"array","description":"Canonical workspace file IDs to mount in the sandbox. Discover IDs via read(\"files/{name}/meta.json\") or glob(\"files/by-id/*/meta.json\"). Mounted path: /home/user/files/{fileId}/{originalName}. Example: [\"wf_123\"]","items":{"type":"string"}},"inputTables":{"type":"array","description":"Table IDs to mount as CSV files in the sandbox. Each table appears at /home/user/tables/{tableId}.csv with a header row. Example: [\"tbl_abc123\"]","items":{"type":"string"}},"language":{"type":"string","description":"Execution language.","enum":["javascript","python","shell"]},"outputFormat":{"type":"string","description":"Format for outputPath. Determines how the code result is serialized. If omitted, inferred from outputPath file extension.","enum":["json","csv","txt","md","html"]},"outputMimeType":{"type":"string","description":"MIME type for outputSandboxPath export. Required for binary files: image/png, image/jpeg, application/pdf, etc. Omit for text files."},"outputPath":{"type":"string","description":"Pipe output directly to a NEW workspace file instead of returning in context. ALWAYS use this instead of a separate workspace_file write call. Use a flat path like \"files/result.json\" — nested paths are not supported."},"outputSandboxPath":{"type":"string","description":"Path to a file created inside the sandbox that should be exported to the workspace. Use together with outputPath."},"outputTable":{"type":"string","description":"Table ID to overwrite with the code's return value. Code MUST return an array of objects where keys match column names. All existing rows are replaced. Example: \"tbl_abc123\""}},"required":["code"]}, + requiredPermission: "write", +}; export const GenerateApiKey: ToolCatalogEntry = { - id: 'generate_api_key', - name: 'generate_api_key', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - name: { - type: 'string', - description: "A descriptive name for the API key (e.g., 'production-key', 'dev-testing').", - }, - workspaceId: { - type: 'string', - description: "Optional workspace ID. Defaults to user's default workspace.", - }, - }, - required: ['name'], - }, + id: "generate_api_key", + name: "generate_api_key", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"name":{"type":"string","description":"A descriptive name for the API key (e.g., 'production-key', 'dev-testing')."},"workspaceId":{"type":"string","description":"Optional workspace ID. Defaults to user's default workspace."}},"required":["name"]}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const GenerateImage: ToolCatalogEntry = { - id: 'generate_image', - name: 'generate_image', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - aspectRatio: { - type: 'string', - description: 'Aspect ratio for the generated image.', - enum: ['1:1', '16:9', '9:16', '4:3', '3:4'], - }, - fileName: { - type: 'string', - description: - 'Output file name. Defaults to "generated-image.png". Workspace files are flat, so pass a plain file name, not a nested path.', - }, - overwriteFileId: { - type: 'string', - description: - 'If provided, overwrites the existing workspace file with this ID instead of creating a new file. Use this when the user asks to update or redo a previously generated image. The file ID is returned by previous generate_image or generate_visualization calls (fileId field), or can be found via read("files/by-id/{fileId}/meta.json").', - }, - prompt: { - type: 'string', - description: - 'Detailed text description of the image to generate, or editing instructions when used with editFileId.', - }, - referenceFileIds: { - type: 'array', - description: - 'File IDs of workspace images to include as context for the generation. All images are sent alongside the prompt. Use for: editing a single image (1 file), compositing multiple images together (2+ files), style transfer, face swapping, etc. Order matters — list the primary/base image first.', - items: { type: 'string' }, - }, - }, - required: ['prompt'], - }, - requiredPermission: 'write', -} + id: "generate_image", + name: "generate_image", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"aspectRatio":{"type":"string","description":"Aspect ratio for the generated image.","enum":["1:1","16:9","9:16","4:3","3:4"]},"fileName":{"type":"string","description":"Output file name. Defaults to \"generated-image.png\". Workspace files are flat, so pass a plain file name, not a nested path."},"overwriteFileId":{"type":"string","description":"If provided, overwrites the existing workspace file with this ID instead of creating a new file. Use this when the user asks to update or redo a previously generated image. The file ID is returned by previous generate_image or generate_visualization calls (fileId field), or can be found via read(\"files/by-id/{fileId}/meta.json\")."},"prompt":{"type":"string","description":"Detailed text description of the image to generate, or editing instructions when used with editFileId."},"referenceFileIds":{"type":"array","description":"File IDs of workspace images to include as context for the generation. All images are sent alongside the prompt. Use for: editing a single image (1 file), compositing multiple images together (2+ files), style transfer, face swapping, etc. Order matters — list the primary/base image first.","items":{"type":"string"}}},"required":["prompt"]}, + requiredPermission: "write", +}; export const GenerateVisualization: ToolCatalogEntry = { - id: 'generate_visualization', - name: 'generate_visualization', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - code: { - type: 'string', - description: - "Python code that generates a visualization using matplotlib. MUST call plt.savefig('/home/user/output.png', dpi=150, bbox_inches='tight') to produce output.", - }, - fileName: { - type: 'string', - description: - 'Output file name. Defaults to "chart.png". Workspace files are flat, so pass a plain file name, not a nested path.', - }, - inputFiles: { - type: 'array', - description: - 'Canonical workspace file IDs to mount in the sandbox. Discover IDs via read("files/{name}/meta.json") or glob("files/by-id/*/meta.json"). Mounted path: /home/user/files/{fileId}/{originalName}.', - items: { type: 'string' }, - }, - inputTables: { - type: 'array', - description: - "Table IDs to mount as CSV files in the sandbox. Each table appears at /home/user/tables/{tableId}.csv with a header row. Read with pandas: pd.read_csv('/home/user/tables/tbl_xxx.csv')", - items: { type: 'string' }, - }, - overwriteFileId: { - type: 'string', - description: - 'If provided, overwrites the existing workspace file with this ID instead of creating a new file. Use this when the user asks to update or redo a previously generated chart. The file ID is returned by previous generate_visualization or generate_image calls (fileId field), or can be found via read("files/by-id/{fileId}/meta.json").', - }, - }, - required: ['code'], - }, - requiredPermission: 'write', -} + id: "generate_visualization", + name: "generate_visualization", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"code":{"type":"string","description":"Python code that generates a visualization using matplotlib. MUST call plt.savefig('/home/user/output.png', dpi=150, bbox_inches='tight') to produce output."},"fileName":{"type":"string","description":"Output file name. Defaults to \"chart.png\". Workspace files are flat, so pass a plain file name, not a nested path."},"inputFiles":{"type":"array","description":"Canonical workspace file IDs to mount in the sandbox. Discover IDs via read(\"files/{name}/meta.json\") or glob(\"files/by-id/*/meta.json\"). Mounted path: /home/user/files/{fileId}/{originalName}.","items":{"type":"string"}},"inputTables":{"type":"array","description":"Table IDs to mount as CSV files in the sandbox. Each table appears at /home/user/tables/{tableId}.csv with a header row. Read with pandas: pd.read_csv('/home/user/tables/tbl_xxx.csv')","items":{"type":"string"}},"overwriteFileId":{"type":"string","description":"If provided, overwrites the existing workspace file with this ID instead of creating a new file. Use this when the user asks to update or redo a previously generated chart. The file ID is returned by previous generate_visualization or generate_image calls (fileId field), or can be found via read(\"files/by-id/{fileId}/meta.json\")."}},"required":["code"]}, + requiredPermission: "write", +}; export const GetBlockOutputs: ToolCatalogEntry = { - id: 'get_block_outputs', - name: 'get_block_outputs', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - blockIds: { - type: 'array', - description: - 'Optional array of block UUIDs. If provided, returns outputs only for those blocks. If not provided, returns outputs for all blocks in the workflow.', - items: { type: 'string' }, - }, - workflowId: { - type: 'string', - description: 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - }, -} + id: "get_block_outputs", + name: "get_block_outputs", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"blockIds":{"type":"array","description":"Optional array of block UUIDs. If provided, returns outputs only for those blocks. If not provided, returns outputs for all blocks in the workflow.","items":{"type":"string"}},"workflowId":{"type":"string","description":"Optional workflow ID. If not provided, uses the current workflow in context."}}}, +}; export const GetBlockUpstreamReferences: ToolCatalogEntry = { - id: 'get_block_upstream_references', - name: 'get_block_upstream_references', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - blockIds: { - type: 'array', - description: - 'Required array of block UUIDs (minimum 1). Returns what each block can reference based on its position in the workflow graph.', - items: { type: 'string' }, - }, - workflowId: { - type: 'string', - description: 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - required: ['blockIds'], - }, -} + id: "get_block_upstream_references", + name: "get_block_upstream_references", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"blockIds":{"type":"array","description":"Required array of block UUIDs (minimum 1). Returns what each block can reference based on its position in the workflow graph.","items":{"type":"string"}},"workflowId":{"type":"string","description":"Optional workflow ID. If not provided, uses the current workflow in context."}},"required":["blockIds"]}, +}; export const GetDeployedWorkflowState: ToolCatalogEntry = { - id: 'get_deployed_workflow_state', - name: 'get_deployed_workflow_state', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - workflowId: { - type: 'string', - description: 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - }, -} + id: "get_deployed_workflow_state", + name: "get_deployed_workflow_state", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"workflowId":{"type":"string","description":"Optional workflow ID. If not provided, uses the current workflow in context."}}}, +}; export const GetDeploymentVersion: ToolCatalogEntry = { - id: 'get_deployment_version', - name: 'get_deployment_version', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - version: { type: 'number', description: 'The deployment version number' }, - workflowId: { type: 'string', description: 'The workflow ID' }, - }, - required: ['workflowId', 'version'], - }, -} + id: "get_deployment_version", + name: "get_deployment_version", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"version":{"type":"number","description":"The deployment version number"},"workflowId":{"type":"string","description":"The workflow ID"}},"required":["workflowId","version"]}, +}; export const GetExecutionSummary: ToolCatalogEntry = { - id: 'get_execution_summary', - name: 'get_execution_summary', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - limit: { - type: 'number', - description: 'Max number of executions to return (default: 10, max: 20).', - }, - status: { - type: 'string', - description: "Filter by status: 'success', 'error', or 'all' (default: 'all').", - enum: ['success', 'error', 'all'], - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID. If omitted, returns executions across all workflows in the workspace.', - }, - workspaceId: { type: 'string', description: 'Workspace ID to scope executions to.' }, - }, - required: ['workspaceId'], - }, -} + id: "get_execution_summary", + name: "get_execution_summary", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"limit":{"type":"number","description":"Max number of executions to return (default: 10, max: 20)."},"status":{"type":"string","description":"Filter by status: 'success', 'error', or 'all' (default: 'all').","enum":["success","error","all"]},"workflowId":{"type":"string","description":"Optional workflow ID. If omitted, returns executions across all workflows in the workspace."},"workspaceId":{"type":"string","description":"Workspace ID to scope executions to."}},"required":["workspaceId"]}, +}; export const GetJobLogs: ToolCatalogEntry = { - id: 'get_job_logs', - name: 'get_job_logs', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - executionId: { type: 'string', description: 'Optional execution ID for a specific run.' }, - includeDetails: { - type: 'boolean', - description: 'Include tool calls, outputs, and cost details.', - }, - jobId: { type: 'string', description: 'The job (schedule) ID to get logs for.' }, - limit: { type: 'number', description: 'Max number of entries (default: 3, max: 5)' }, - }, - required: ['jobId'], - }, -} + id: "get_job_logs", + name: "get_job_logs", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"executionId":{"type":"string","description":"Optional execution ID for a specific run."},"includeDetails":{"type":"boolean","description":"Include tool calls, outputs, and cost details."},"jobId":{"type":"string","description":"The job (schedule) ID to get logs for."},"limit":{"type":"number","description":"Max number of entries (default: 3, max: 5)"}},"required":["jobId"]}, +}; export const GetPageContents: ToolCatalogEntry = { - id: 'get_page_contents', - name: 'get_page_contents', - executor: 'go', - mode: 'sync', - parameters: { - type: 'object', - properties: { - include_highlights: { - type: 'boolean', - description: 'Include key highlights (default false)', - }, - include_summary: { - type: 'boolean', - description: 'Include AI-generated summary (default false)', - }, - include_text: { type: 'boolean', description: 'Include full page text (default true)' }, - urls: { - type: 'array', - description: 'URLs to get content from (max 10)', - items: { type: 'string' }, - }, - }, - required: ['urls'], - }, -} + id: "get_page_contents", + name: "get_page_contents", + executor: "go", + mode: "sync", + parameters: {"type":"object","properties":{"include_highlights":{"type":"boolean","description":"Include key highlights (default false)"},"include_summary":{"type":"boolean","description":"Include AI-generated summary (default false)"},"include_text":{"type":"boolean","description":"Include full page text (default true)"},"urls":{"type":"array","description":"URLs to get content from (max 10)","items":{"type":"string"}}},"required":["urls"]}, +}; export const GetPlatformActions: ToolCatalogEntry = { - id: 'get_platform_actions', - name: 'get_platform_actions', - executor: 'sim', - mode: 'async', - parameters: { type: 'object', properties: {} }, -} + id: "get_platform_actions", + name: "get_platform_actions", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{}}, +}; export const GetWorkflowData: ToolCatalogEntry = { - id: 'get_workflow_data', - name: 'get_workflow_data', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - data_type: { - type: 'string', - description: 'The type of workflow data to retrieve', - enum: ['global_variables', 'custom_tools', 'mcp_tools', 'files'], - }, - workflowId: { - type: 'string', - description: 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - required: ['data_type'], - }, -} + id: "get_workflow_data", + name: "get_workflow_data", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"data_type":{"type":"string","description":"The type of workflow data to retrieve","enum":["global_variables","custom_tools","mcp_tools","files"]},"workflowId":{"type":"string","description":"Optional workflow ID. If not provided, uses the current workflow in context."}},"required":["data_type"]}, +}; export const GetWorkflowLogs: ToolCatalogEntry = { - id: 'get_workflow_logs', - name: 'get_workflow_logs', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - executionId: { - type: 'string', - description: - 'Optional execution ID to get logs for a specific execution. Use with get_execution_summary to find execution IDs first.', - }, - includeDetails: { type: 'boolean', description: 'Include detailed info' }, - limit: { type: 'number', description: 'Max number of entries (hard limit: 3)' }, - workflowId: { - type: 'string', - description: 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - }, -} + id: "get_workflow_logs", + name: "get_workflow_logs", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"executionId":{"type":"string","description":"Optional execution ID to get logs for a specific execution. Use with get_execution_summary to find execution IDs first."},"includeDetails":{"type":"boolean","description":"Include detailed info"},"limit":{"type":"number","description":"Max number of entries (hard limit: 3)"},"workflowId":{"type":"string","description":"Optional workflow ID. If not provided, uses the current workflow in context."}}}, +}; export const Glob: ToolCatalogEntry = { - id: 'glob', - name: 'glob', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - pattern: { - type: 'string', - description: - 'Glob pattern to match file paths. Supports * (any segment) and ** (any depth).', - }, - }, - required: ['pattern'], - }, -} + id: "glob", + name: "glob", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"pattern":{"type":"string","description":"Glob pattern to match file paths. Supports * (any segment) and ** (any depth)."},"title":{"type":"string","description":"Short human-readable label shown in the UI while this search runs (e.g. 'Finding workflow configs', 'Listing knowledge bases')."}},"required":["pattern"]}, +}; export const Grep: ToolCatalogEntry = { - id: 'grep', - name: 'grep', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - context: { - type: 'number', - description: - "Number of lines to show before and after each match. Only applies to output_mode 'content'.", - }, - ignoreCase: { type: 'boolean', description: 'Case insensitive search (default false).' }, - lineNumbers: { - type: 'boolean', - description: - "Include line numbers in output (default true). Only applies to output_mode 'content'.", - }, - maxResults: { - type: 'number', - description: 'Maximum number of matches to return (default 50).', - }, - output_mode: { - type: 'string', - description: - "Output mode: 'content' shows matching lines (default), 'files_with_matches' shows only file paths, 'count' shows match counts per file.", - enum: ['content', 'files_with_matches', 'count'], - }, - path: { - type: 'string', - description: - "Optional path prefix to scope the search (e.g. 'workflows/', 'environment/', 'internal/', 'components/blocks/').", - }, - pattern: { type: 'string', description: 'Regex pattern to search for in file contents.' }, - }, - required: ['pattern'], - }, -} + id: "grep", + name: "grep", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"context":{"type":"number","description":"Number of lines to show before and after each match. Only applies to output_mode 'content'."},"ignoreCase":{"type":"boolean","description":"Case insensitive search (default false)."},"lineNumbers":{"type":"boolean","description":"Include line numbers in output (default true). Only applies to output_mode 'content'."},"maxResults":{"type":"number","description":"Maximum number of matches to return (default 50)."},"output_mode":{"type":"string","description":"Output mode: 'content' shows matching lines (default), 'files_with_matches' shows only file paths, 'count' shows match counts per file.","enum":["content","files_with_matches","count"]},"path":{"type":"string","description":"Optional path prefix to scope the search (e.g. 'workflows/', 'environment/', 'internal/', 'components/blocks/')."},"pattern":{"type":"string","description":"Regex pattern to search for in file contents."},"title":{"type":"string","description":"Short human-readable label shown in the UI while this search runs (e.g. 'Searching Slack integrations', 'Finding deployed workflows')."}},"required":["pattern"]}, +}; export const Job: ToolCatalogEntry = { - id: 'job', - name: 'job', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { request: { description: 'What job action is needed.', type: 'string' } }, - required: ['request'], - type: 'object', - }, - subagentId: 'job', + id: "job", + name: "job", + executor: "subagent", + mode: "async", + parameters: {"properties":{"request":{"description":"What job action is needed.","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "job", internal: true, -} +}; export const Knowledge: ToolCatalogEntry = { - id: 'knowledge', - name: 'knowledge', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { - request: { description: 'What knowledge base action is needed.', type: 'string' }, - }, - required: ['request'], - type: 'object', - }, - subagentId: 'knowledge', + id: "knowledge", + name: "knowledge", + executor: "subagent", + mode: "async", + parameters: {"properties":{"request":{"description":"What knowledge base action is needed.","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "knowledge", internal: true, -} +}; export const KnowledgeBase: ToolCatalogEntry = { - id: 'knowledge_base', - name: 'knowledge_base', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - args: { - type: 'object', - description: 'Arguments for the operation', - properties: { - apiKey: { - type: 'string', - description: - 'API key for API-key-based connectors (required when connector auth mode is apiKey)', - }, - chunkingConfig: { - type: 'object', - description: "Chunking configuration (optional for 'create')", - properties: { - maxSize: { - type: 'number', - description: 'Maximum chunk size (100-4000, default: 1024)', - default: 1024, - }, - minSize: { - type: 'number', - description: 'Minimum chunk size (1-2000, default: 1)', - default: 1, - }, - overlap: { - type: 'number', - description: 'Overlap between chunks (0-500, default: 200)', - default: 200, - }, - }, - }, - connectorId: { - type: 'string', - description: - 'Connector ID (required for update_connector, delete_connector, sync_connector)', - }, - connectorStatus: { - type: 'string', - description: 'Connector status (optional for update_connector)', - enum: ['active', 'paused'], - }, - connectorType: { - type: 'string', - description: - "Connector type from registry, e.g. 'confluence', 'google_drive', 'notion' (required for add_connector). Read knowledgebases/connectors/{type}.json for the config schema.", - }, - credentialId: { - type: 'string', - description: - 'OAuth credential ID from environment/credentials.json (required for OAuth connectors)', - }, - description: { - type: 'string', - description: "Description of the knowledge base (optional for 'create')", - }, - disabledTagIds: { - type: 'array', - description: - 'Tag definition IDs to opt out of (optional for add_connector). See tagDefinitions in the connector schema.', - }, - documentId: { - type: 'string', - description: 'Document ID (required for delete_document, update_document)', - }, - enabled: { - type: 'boolean', - description: 'Enable/disable a document (optional for update_document)', - }, - fileId: { - type: 'string', - description: - 'Canonical workspace file ID to add as a document (preferred for add_file). Discover via read("files/{name}/meta.json") or glob("files/by-id/*/meta.json").', - }, - filePath: { - type: 'string', - description: 'Legacy workspace file reference for add_file. Prefer fileId.', - }, - filename: { - type: 'string', - description: 'New filename for a document (optional for update_document)', - }, - knowledgeBaseId: { - type: 'string', - description: - 'Knowledge base ID (required for get, query, add_file, list_tags, create_tag, get_tag_usage)', - }, - name: { - type: 'string', - description: "Name of the knowledge base (required for 'create')", - }, - query: { type: 'string', description: "Search query text (required for 'query')" }, - sourceConfig: { - type: 'object', - description: - 'Connector-specific configuration matching the configFields in knowledgebases/connectors/{type}.json', - }, - syncIntervalMinutes: { - type: 'number', - description: - 'Sync interval in minutes: 60 (hourly), 360 (6h), 1440 (daily), 10080 (weekly), 0 (manual only). Default: 1440', - default: 1440, - }, - tagDefinitionId: { - type: 'string', - description: 'Tag definition ID (required for update_tag, delete_tag)', - }, - tagDisplayName: { - type: 'string', - description: - 'Display name for the tag (required for create_tag, optional for update_tag)', - }, - tagFieldType: { - type: 'string', - description: - 'Field type: text, number, date, boolean (optional for create_tag, defaults to text)', - enum: ['text', 'number', 'date', 'boolean'], - }, - topK: { - type: 'number', - description: 'Number of results to return (1-50, default: 5)', - default: 5, - }, - workspaceId: { - type: 'string', - description: "Workspace ID (required for 'create', optional filter for 'list')", - }, - }, - }, - operation: { - type: 'string', - description: 'The operation to perform', - enum: [ - 'create', - 'get', - 'query', - 'add_file', - 'update', - 'delete', - 'delete_document', - 'update_document', - 'list_tags', - 'create_tag', - 'update_tag', - 'delete_tag', - 'get_tag_usage', - 'add_connector', - 'update_connector', - 'delete_connector', - 'sync_connector', - ], - }, - }, - required: ['operation', 'args'], - }, - resultSchema: { - type: 'object', - properties: { - data: { type: 'object', description: 'Operation-specific result payload.' }, - message: { type: 'string', description: 'Human-readable outcome summary.' }, - success: { type: 'boolean', description: 'Whether the operation succeeded.' }, - }, - required: ['success', 'message'], - }, + id: "knowledge_base", + name: "knowledge_base", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"args":{"type":"object","description":"Arguments for the operation","properties":{"apiKey":{"type":"string","description":"API key for API-key-based connectors (required when connector auth mode is apiKey)"},"chunkingConfig":{"type":"object","description":"Chunking configuration (optional for 'create')","properties":{"maxSize":{"type":"number","description":"Maximum chunk size (100-4000, default: 1024)","default":1024},"minSize":{"type":"number","description":"Minimum chunk size (1-2000, default: 1)","default":1},"overlap":{"type":"number","description":"Overlap between chunks (0-500, default: 200)","default":200}}},"connectorId":{"type":"string","description":"Connector ID (required for update_connector, delete_connector, sync_connector)"},"connectorStatus":{"type":"string","description":"Connector status (optional for update_connector)","enum":["active","paused"]},"connectorType":{"type":"string","description":"Connector type from registry, e.g. 'confluence', 'google_drive', 'notion' (required for add_connector). Read knowledgebases/connectors/{type}.json for the config schema."},"credentialId":{"type":"string","description":"OAuth credential ID from environment/credentials.json (required for OAuth connectors)"},"description":{"type":"string","description":"Description of the knowledge base (optional for 'create')"},"disabledTagIds":{"type":"array","description":"Tag definition IDs to opt out of (optional for add_connector). See tagDefinitions in the connector schema."},"documentId":{"type":"string","description":"Document ID (required for delete_document, update_document)"},"enabled":{"type":"boolean","description":"Enable/disable a document (optional for update_document)"},"fileId":{"type":"string","description":"Canonical workspace file ID to add as a document (preferred for add_file). Discover via read(\"files/{name}/meta.json\") or glob(\"files/by-id/*/meta.json\")."},"filePath":{"type":"string","description":"Legacy workspace file reference for add_file. Prefer fileId."},"filename":{"type":"string","description":"New filename for a document (optional for update_document)"},"knowledgeBaseId":{"type":"string","description":"Knowledge base ID (required for get, query, add_file, list_tags, create_tag, get_tag_usage)"},"name":{"type":"string","description":"Name of the knowledge base (required for 'create')"},"query":{"type":"string","description":"Search query text (required for 'query')"},"sourceConfig":{"type":"object","description":"Connector-specific configuration matching the configFields in knowledgebases/connectors/{type}.json"},"syncIntervalMinutes":{"type":"number","description":"Sync interval in minutes: 60 (hourly), 360 (6h), 1440 (daily), 10080 (weekly), 0 (manual only). Default: 1440","default":1440},"tagDefinitionId":{"type":"string","description":"Tag definition ID (required for update_tag, delete_tag)"},"tagDisplayName":{"type":"string","description":"Display name for the tag (required for create_tag, optional for update_tag)"},"tagFieldType":{"type":"string","description":"Field type: text, number, date, boolean (optional for create_tag, defaults to text)","enum":["text","number","date","boolean"]},"topK":{"type":"number","description":"Number of results to return (1-50, default: 5)","default":5},"workspaceId":{"type":"string","description":"Workspace ID (required for 'create', optional filter for 'list')"}}},"operation":{"type":"string","description":"The operation to perform","enum":["create","get","query","add_file","update","delete","delete_document","update_document","list_tags","create_tag","update_tag","delete_tag","get_tag_usage","add_connector","update_connector","delete_connector","sync_connector"]}},"required":["operation","args"]}, + resultSchema: {"type":"object","properties":{"data":{"type":"object","description":"Operation-specific result payload."},"message":{"type":"string","description":"Human-readable outcome summary."},"success":{"type":"boolean","description":"Whether the operation succeeded."}},"required":["success","message"]}, requiresConfirmation: true, -} +}; export const ListFolders: ToolCatalogEntry = { - id: 'list_folders', - name: 'list_folders', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - workspaceId: { type: 'string', description: 'Optional workspace ID to list folders for.' }, - }, - }, -} + id: "list_folders", + name: "list_folders", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"workspaceId":{"type":"string","description":"Optional workspace ID to list folders for."}}}, +}; export const ListUserWorkspaces: ToolCatalogEntry = { - id: 'list_user_workspaces', - name: 'list_user_workspaces', - executor: 'sim', - mode: 'async', - parameters: { type: 'object', properties: {} }, -} + id: "list_user_workspaces", + name: "list_user_workspaces", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{}}, +}; export const ListWorkspaceMcpServers: ToolCatalogEntry = { - id: 'list_workspace_mcp_servers', - name: 'list_workspace_mcp_servers', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - workspaceId: { type: 'string', description: 'Workspace ID (defaults to current workspace)' }, - }, - }, -} + id: "list_workspace_mcp_servers", + name: "list_workspace_mcp_servers", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace ID (defaults to current workspace)"}}}, +}; export const ManageCredential: ToolCatalogEntry = { - id: 'manage_credential', - name: 'manage_credential', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - credentialId: { - type: 'string', - description: 'The credential ID (from environment/credentials.json)', - }, - displayName: { type: 'string', description: 'New display name (required for rename)' }, - operation: { - type: 'string', - description: 'The operation to perform', - enum: ['rename', 'delete'], - }, - }, - required: ['operation', 'credentialId'], - }, + id: "manage_credential", + name: "manage_credential", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"credentialId":{"type":"string","description":"The credential ID (from environment/credentials.json)"},"displayName":{"type":"string","description":"New display name (required for rename)"},"operation":{"type":"string","description":"The operation to perform","enum":["rename","delete"]}},"required":["operation","credentialId"]}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const ManageCustomTool: ToolCatalogEntry = { - id: 'manage_custom_tool', - name: 'manage_custom_tool', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - code: { - type: 'string', - description: - 'The JavaScript code that executes when the tool is called (required for add). Parameters from schema are available as variables. Function body only - no signature or wrapping braces.', - }, - operation: { - type: 'string', - description: "The operation to perform: 'add', 'edit', 'list', or 'delete'", - enum: ['add', 'edit', 'delete', 'list'], - }, - schema: { - type: 'object', - description: 'The tool schema in OpenAI function calling format (required for add).', - properties: { - function: { - type: 'object', - description: 'The function definition', - properties: { - description: { type: 'string', description: 'What the function does' }, - name: { type: 'string', description: 'The function name (camelCase)' }, - parameters: { - type: 'object', - description: 'The function parameters schema', - properties: { - properties: { - type: 'object', - description: 'Parameter definitions as key-value pairs', - }, - required: { - type: 'array', - description: 'Array of required parameter names', - items: { type: 'string' }, - }, - type: { type: 'string', description: "Must be 'object'" }, - }, - required: ['type', 'properties'], - }, - }, - required: ['name', 'parameters'], - }, - type: { type: 'string', description: "Must be 'function'" }, - }, - required: ['type', 'function'], - }, - toolId: { - type: 'string', - description: - "The ID of the custom tool (required for edit/delete). Must be the exact toolId from the get_workflow_data custom tool response - do not guess or construct it. DO NOT PROVIDE THE TOOL ID IF THE OPERATION IS 'ADD'.", - }, - }, - required: ['operation'], - }, + id: "manage_custom_tool", + name: "manage_custom_tool", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"code":{"type":"string","description":"The JavaScript code that executes when the tool is called (required for add). Parameters from schema are available as variables. Function body only - no signature or wrapping braces."},"operation":{"type":"string","description":"The operation to perform: 'add', 'edit', 'list', or 'delete'","enum":["add","edit","delete","list"]},"schema":{"type":"object","description":"The tool schema in OpenAI function calling format (required for add).","properties":{"function":{"type":"object","description":"The function definition","properties":{"description":{"type":"string","description":"What the function does"},"name":{"type":"string","description":"The function name (camelCase)"},"parameters":{"type":"object","description":"The function parameters schema","properties":{"properties":{"type":"object","description":"Parameter definitions as key-value pairs"},"required":{"type":"array","description":"Array of required parameter names","items":{"type":"string"}},"type":{"type":"string","description":"Must be 'object'"}},"required":["type","properties"]}},"required":["name","parameters"]},"type":{"type":"string","description":"Must be 'function'"}},"required":["type","function"]},"toolId":{"type":"string","description":"The ID of the custom tool (required for edit/delete). Must be the exact toolId from the get_workflow_data custom tool response - do not guess or construct it. DO NOT PROVIDE THE TOOL ID IF THE OPERATION IS 'ADD'."}},"required":["operation"]}, requiresConfirmation: true, -} +}; export const ManageJob: ToolCatalogEntry = { - id: 'manage_job', - name: 'manage_job', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - args: { - type: 'object', - description: - 'Operation-specific arguments. For create: {title, prompt, cron?, time?, timezone?, lifecycle?, successCondition?, maxRuns?}. For get/delete: {jobId}. For update: {jobId, title?, prompt?, cron?, timezone?, status?, lifecycle?, successCondition?, maxRuns?}. For list: no args needed.', - properties: { - cron: { type: 'string', description: 'Cron expression for recurring jobs' }, - jobId: { type: 'string', description: 'Job ID (required for get, update, delete)' }, - lifecycle: { - type: 'string', - description: - "'persistent' (default) or 'until_complete'. Until_complete jobs stop when complete_job is called.", - }, - maxRuns: { - type: 'integer', - description: 'Max executions before auto-completing. Safety limit.', - }, - prompt: { type: 'string', description: 'The prompt to execute when the job fires' }, - status: { type: 'string', description: 'Job status: active, paused' }, - successCondition: { - type: 'string', - description: - 'What must happen for the job to be considered complete (until_complete lifecycle).', - }, - time: { - type: 'string', - description: 'ISO 8601 datetime for one-time jobs or cron start time', - }, - timezone: { - type: 'string', - description: 'IANA timezone (e.g. America/New_York). Defaults to UTC.', - }, - title: { - type: 'string', - description: "Short descriptive title for the job (e.g. 'Email Poller')", - }, - }, - }, - operation: { - type: 'string', - description: 'The operation to perform: create, list, get, update, delete', - enum: ['create', 'list', 'get', 'update', 'delete'], - }, - }, - required: ['operation'], - }, -} + id: "manage_job", + name: "manage_job", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"args":{"type":"object","description":"Operation-specific arguments. For create: {title, prompt, cron?, time?, timezone?, lifecycle?, successCondition?, maxRuns?}. For get/delete: {jobId}. For update: {jobId, title?, prompt?, cron?, timezone?, status?, lifecycle?, successCondition?, maxRuns?}. For list: no args needed.","properties":{"cron":{"type":"string","description":"Cron expression for recurring jobs"},"jobId":{"type":"string","description":"Job ID (required for get, update, delete)"},"lifecycle":{"type":"string","description":"'persistent' (default) or 'until_complete'. Until_complete jobs stop when complete_job is called."},"maxRuns":{"type":"integer","description":"Max executions before auto-completing. Safety limit."},"prompt":{"type":"string","description":"The prompt to execute when the job fires"},"status":{"type":"string","description":"Job status: active, paused"},"successCondition":{"type":"string","description":"What must happen for the job to be considered complete (until_complete lifecycle)."},"time":{"type":"string","description":"ISO 8601 datetime for one-time jobs or cron start time"},"timezone":{"type":"string","description":"IANA timezone (e.g. America/New_York). Defaults to UTC."},"title":{"type":"string","description":"Short descriptive title for the job (e.g. 'Email Poller')"}}},"operation":{"type":"string","description":"The operation to perform: create, list, get, update, delete","enum":["create","list","get","update","delete"]}},"required":["operation"]}, +}; export const ManageMcpTool: ToolCatalogEntry = { - id: 'manage_mcp_tool', - name: 'manage_mcp_tool', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - config: { - type: 'object', - description: 'Required for add and edit. The MCP server configuration.', - properties: { - enabled: { - type: 'boolean', - description: 'Whether the server is enabled (default: true)', - }, - headers: { - type: 'object', - description: 'Optional HTTP headers to send with requests (key-value pairs)', - }, - name: { type: 'string', description: 'Display name for the MCP server' }, - timeout: { - type: 'number', - description: 'Request timeout in milliseconds (default: 30000)', - }, - transport: { - type: 'string', - description: "Transport protocol: 'streamable-http' or 'sse'", - enum: ['streamable-http', 'sse'], - default: 'streamable-http', - }, - url: { type: 'string', description: 'The MCP server endpoint URL (required for add)' }, - }, - }, - operation: { - type: 'string', - description: "The operation to perform: 'add', 'edit', 'list', or 'delete'", - enum: ['add', 'edit', 'delete', 'list'], - }, - serverId: { - type: 'string', - description: - "Required for edit and delete. The database ID of the MCP server. DO NOT PROVIDE if operation is 'add' or 'list'.", - }, - }, - required: ['operation'], - }, + id: "manage_mcp_tool", + name: "manage_mcp_tool", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"config":{"type":"object","description":"Required for add and edit. The MCP server configuration.","properties":{"enabled":{"type":"boolean","description":"Whether the server is enabled (default: true)"},"headers":{"type":"object","description":"Optional HTTP headers to send with requests (key-value pairs)"},"name":{"type":"string","description":"Display name for the MCP server"},"timeout":{"type":"number","description":"Request timeout in milliseconds (default: 30000)"},"transport":{"type":"string","description":"Transport protocol: 'streamable-http' or 'sse'","enum":["streamable-http","sse"],"default":"streamable-http"},"url":{"type":"string","description":"The MCP server endpoint URL (required for add)"}}},"operation":{"type":"string","description":"The operation to perform: 'add', 'edit', 'list', or 'delete'","enum":["add","edit","delete","list"]},"serverId":{"type":"string","description":"Required for edit and delete. The database ID of the MCP server. DO NOT PROVIDE if operation is 'add' or 'list'."}},"required":["operation"]}, requiresConfirmation: true, - requiredPermission: 'write', -} + requiredPermission: "write", +}; export const ManageSkill: ToolCatalogEntry = { - id: 'manage_skill', - name: 'manage_skill', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - content: { - type: 'string', - description: 'Markdown instructions for the skill. Required for add, optional for edit.', - }, - description: { - type: 'string', - description: 'Short description of the skill. Required for add, optional for edit.', - }, - name: { - type: 'string', - description: - "Skill name in kebab-case (e.g. 'my-skill'). Required for add, optional for edit.", - }, - operation: { - type: 'string', - description: "The operation to perform: 'add', 'edit', 'list', or 'delete'", - enum: ['add', 'edit', 'delete', 'list'], - }, - skillId: { - type: 'string', - description: - "The ID of the skill (required for edit/delete). Must be the exact ID from the VFS or list. DO NOT PROVIDE if operation is 'add' or 'list'.", - }, - }, - required: ['operation'], - }, + id: "manage_skill", + name: "manage_skill", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"content":{"type":"string","description":"Markdown instructions for the skill. Required for add, optional for edit."},"description":{"type":"string","description":"Short description of the skill. Required for add, optional for edit."},"name":{"type":"string","description":"Skill name in kebab-case (e.g. 'my-skill'). Required for add, optional for edit."},"operation":{"type":"string","description":"The operation to perform: 'add', 'edit', 'list', or 'delete'","enum":["add","edit","delete","list"]},"skillId":{"type":"string","description":"The ID of the skill (required for edit/delete). Must be the exact ID from the VFS or list. DO NOT PROVIDE if operation is 'add' or 'list'."}},"required":["operation"]}, requiresConfirmation: true, - requiredPermission: 'write', -} + requiredPermission: "write", +}; export const MaterializeFile: ToolCatalogEntry = { - id: 'materialize_file', - name: 'materialize_file', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - fileName: { - type: 'string', - description: 'The name of the uploaded file to materialize (e.g. "report.pdf")', - }, - knowledgeBaseId: { - type: 'string', - description: - 'ID of an existing knowledge base to add the file to (only used with operation "knowledge_base"). If omitted, a new KB is created.', - }, - operation: { - type: 'string', - description: - 'What to do with the file. "save" promotes it to files/. "import" imports a workflow JSON. "table" converts CSV/TSV/JSON to a table. "knowledge_base" saves and adds to a KB. Defaults to "save".', - enum: ['save', 'import', 'table', 'knowledge_base'], - default: 'save', - }, - tableName: { - type: 'string', - description: - 'Custom name for the table (only used with operation "table"). Defaults to the file name without extension.', - }, - }, - required: ['fileName'], - }, - requiredPermission: 'write', -} + id: "materialize_file", + name: "materialize_file", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"fileName":{"type":"string","description":"The name of the uploaded file to materialize (e.g. \"report.pdf\")"},"knowledgeBaseId":{"type":"string","description":"ID of an existing knowledge base to add the file to (only used with operation \"knowledge_base\"). If omitted, a new KB is created."},"operation":{"type":"string","description":"What to do with the file. \"save\" promotes it to files/. \"import\" imports a workflow JSON. \"table\" converts CSV/TSV/JSON to a table. \"knowledge_base\" saves and adds to a KB. Defaults to \"save\".","enum":["save","import","table","knowledge_base"],"default":"save"},"tableName":{"type":"string","description":"Custom name for the table (only used with operation \"table\"). Defaults to the file name without extension."}},"required":["fileName"]}, + requiredPermission: "write", +}; export const MoveFolder: ToolCatalogEntry = { - id: 'move_folder', - name: 'move_folder', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - folderId: { type: 'string', description: 'The folder ID to move.' }, - parentId: { - type: 'string', - description: - 'Target parent folder ID. Omit or pass empty string to move to workspace root.', - }, - }, - required: ['folderId'], - }, - requiredPermission: 'write', -} + id: "move_folder", + name: "move_folder", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"folderId":{"type":"string","description":"The folder ID to move."},"parentId":{"type":"string","description":"Target parent folder ID. Omit or pass empty string to move to workspace root."}},"required":["folderId"]}, + requiredPermission: "write", +}; export const MoveWorkflow: ToolCatalogEntry = { - id: 'move_workflow', - name: 'move_workflow', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - folderId: { - type: 'string', - description: 'Target folder ID. Omit or pass empty string to move to workspace root.', - }, - workflowId: { type: 'string', description: 'The workflow ID to move.' }, - }, - required: ['workflowId'], - }, - requiredPermission: 'write', -} + id: "move_workflow", + name: "move_workflow", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"folderId":{"type":"string","description":"Target folder ID. Omit or pass empty string to move to workspace root."},"workflowId":{"type":"string","description":"The workflow ID to move."}},"required":["workflowId"]}, + requiredPermission: "write", +}; export const OauthGetAuthLink: ToolCatalogEntry = { - id: 'oauth_get_auth_link', - name: 'oauth_get_auth_link', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - providerName: { - type: 'string', - description: - "The name of the OAuth provider to connect (e.g., 'Slack', 'Gmail', 'Google Calendar', 'GitHub')", - }, - }, - required: ['providerName'], - }, -} + id: "oauth_get_auth_link", + name: "oauth_get_auth_link", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"providerName":{"type":"string","description":"The name of the OAuth provider to connect (e.g., 'Slack', 'Gmail', 'Google Calendar', 'GitHub')"}},"required":["providerName"]}, +}; export const OauthRequestAccess: ToolCatalogEntry = { - id: 'oauth_request_access', - name: 'oauth_request_access', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - providerName: { - type: 'string', - description: - "The name of the OAuth provider to connect (e.g., 'Slack', 'Gmail', 'Google Calendar')", - }, - }, - required: ['providerName'], - }, + id: "oauth_request_access", + name: "oauth_request_access", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"providerName":{"type":"string","description":"The name of the OAuth provider to connect (e.g., 'Slack', 'Gmail', 'Google Calendar')"}},"required":["providerName"]}, requiresConfirmation: true, -} +}; export const OpenResource: ToolCatalogEntry = { - id: 'open_resource', - name: 'open_resource', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - id: { type: 'string', description: 'The resource ID to open.' }, - type: { - type: 'string', - description: 'The resource type to open.', - enum: ['workflow', 'table', 'knowledgebase', 'file'], - }, - }, - required: ['type', 'id'], - }, -} + id: "open_resource", + name: "open_resource", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"id":{"type":"string","description":"The resource ID to open."},"type":{"type":"string","description":"The resource type to open.","enum":["workflow","table","knowledgebase","file"]}},"required":["type","id"]}, +}; export const Read: ToolCatalogEntry = { - id: 'read', - name: 'read', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - outputTable: { - type: 'string', - description: - 'Table ID to import the file contents into (CSV/JSON). All existing rows are replaced. Example: "tbl_abc123"', - }, - path: { - type: 'string', - description: "Path to the file to read (e.g. 'workflows/My Workflow/state.json').", - }, - }, - required: ['path'], - }, -} + id: "read", + name: "read", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"limit":{"type":"number","description":"Maximum number of lines to read."},"offset":{"type":"number","description":"Line offset to start reading from (0-indexed)."},"outputTable":{"type":"string","description":"Table ID to import the file contents into (CSV/JSON). All existing rows are replaced. Example: \"tbl_abc123\""},"path":{"type":"string","description":"Path to the file to read (e.g. 'workflows/My Workflow/state.json')."}},"required":["path"]}, +}; export const Redeploy: ToolCatalogEntry = { - id: 'redeploy', - name: 'redeploy', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - workflowId: { - type: 'string', - description: 'Workflow ID to redeploy (required in workspace context)', - }, - }, - }, + id: "redeploy", + name: "redeploy", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"workflowId":{"type":"string","description":"Workflow ID to redeploy (required in workspace context)"}}}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const RenameFile: ToolCatalogEntry = { - id: 'rename_file', - name: 'rename_file', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - fileId: { type: 'string', description: 'Canonical workspace file ID of the file to rename.' }, - newName: { - type: 'string', - description: - 'New filename including extension, e.g. "draft_v2.md". Must not contain slashes.', - }, - }, - required: ['fileId', 'newName'], - }, - resultSchema: { - type: 'object', - properties: { - data: { type: 'object', description: 'Contains id and the new name.' }, - message: { type: 'string', description: 'Human-readable outcome.' }, - success: { type: 'boolean', description: 'Whether the rename succeeded.' }, - }, - required: ['success', 'message'], - }, - requiredPermission: 'write', -} + id: "rename_file", + name: "rename_file", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"fileId":{"type":"string","description":"Canonical workspace file ID of the file to rename."},"newName":{"type":"string","description":"New filename including extension, e.g. \"draft_v2.md\". Must not contain slashes."}},"required":["fileId","newName"]}, + resultSchema: {"type":"object","properties":{"data":{"type":"object","description":"Contains id and the new name."},"message":{"type":"string","description":"Human-readable outcome."},"success":{"type":"boolean","description":"Whether the rename succeeded."}},"required":["success","message"]}, + requiredPermission: "write", +}; export const RenameWorkflow: ToolCatalogEntry = { - id: 'rename_workflow', - name: 'rename_workflow', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - name: { type: 'string', description: 'The new name for the workflow.' }, - workflowId: { type: 'string', description: 'The workflow ID to rename.' }, - }, - required: ['workflowId', 'name'], - }, - requiredPermission: 'write', -} + id: "rename_workflow", + name: "rename_workflow", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"name":{"type":"string","description":"The new name for the workflow."},"workflowId":{"type":"string","description":"The workflow ID to rename."}},"required":["workflowId","name"]}, + requiredPermission: "write", +}; export const Research: ToolCatalogEntry = { - id: 'research', - name: 'research', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { topic: { description: 'The topic to research.', type: 'string' } }, - required: ['topic'], - type: 'object', - }, - subagentId: 'research', + id: "research", + name: "research", + executor: "subagent", + mode: "async", + parameters: {"properties":{"topic":{"description":"The topic to research.","type":"string"}},"required":["topic"],"type":"object"}, + subagentId: "research", internal: true, -} +}; export const Respond: ToolCatalogEntry = { - id: 'respond', - name: 'respond', - executor: 'sim', - mode: 'async', - parameters: { - additionalProperties: true, - properties: { - output: { - description: - 'The result — facts, status, VFS paths to persisted data, whatever the caller needs to act on.', - type: 'string', - }, - success: { description: 'Whether the task completed successfully', type: 'boolean' }, - type: { description: 'Optional logical result type override', type: 'string' }, - }, - required: ['output', 'success'], - type: 'object', - }, + id: "respond", + name: "respond", + executor: "sim", + mode: "async", + parameters: {"additionalProperties":true,"properties":{"output":{"description":"The result — facts, status, VFS paths to persisted data, whatever the caller needs to act on.","type":"string"},"success":{"description":"Whether the task completed successfully","type":"boolean"},"type":{"description":"Optional logical result type override","type":"string"}},"required":["output","success"],"type":"object"}, internal: true, hidden: true, -} +}; export const RevertToVersion: ToolCatalogEntry = { - id: 'revert_to_version', - name: 'revert_to_version', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - version: { type: 'number', description: 'The deployment version number to revert to' }, - workflowId: { type: 'string', description: 'The workflow ID' }, - }, - required: ['workflowId', 'version'], - }, + id: "revert_to_version", + name: "revert_to_version", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"version":{"type":"number","description":"The deployment version number to revert to"},"workflowId":{"type":"string","description":"The workflow ID"}},"required":["workflowId","version"]}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const Run: ToolCatalogEntry = { - id: 'run', - name: 'run', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { - context: { - description: 'Pre-gathered context: workflow state, block IDs, input requirements.', - type: 'string', - }, - request: { description: 'What to run or what logs to check.', type: 'string' }, - }, - required: ['request'], - type: 'object', - }, - subagentId: 'run', + id: "run", + name: "run", + executor: "subagent", + mode: "async", + parameters: {"properties":{"context":{"description":"Pre-gathered context: workflow state, block IDs, input requirements.","type":"string"},"request":{"description":"What to run or what logs to check.","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "run", internal: true, -} +}; export const RunBlock: ToolCatalogEntry = { - id: 'run_block', - name: 'run_block', - executor: 'client', - mode: 'async', - parameters: { - type: 'object', - properties: { - blockId: { type: 'string', description: 'The block ID to run in isolation.' }, - executionId: { - type: 'string', - description: - 'Optional execution ID to load the snapshot from. Uses latest execution if omitted.', - }, - useDeployedState: { - type: 'boolean', - description: - 'When true, runs the deployed version instead of the live draft. Default: false (draft).', - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to run. If not provided, uses the current workflow in context.', - }, - workflow_input: { - type: 'object', - description: 'JSON object with key-value mappings where each key is an input field name', - }, - }, - required: ['blockId'], - }, + id: "run_block", + name: "run_block", + executor: "client", + mode: "async", + parameters: {"type":"object","properties":{"blockId":{"type":"string","description":"The block ID to run in isolation."},"executionId":{"type":"string","description":"Optional execution ID to load the snapshot from. Uses latest execution if omitted."},"useDeployedState":{"type":"boolean","description":"When true, runs the deployed version instead of the live draft. Default: false (draft)."},"workflowId":{"type":"string","description":"Optional workflow ID to run. If not provided, uses the current workflow in context."},"workflow_input":{"type":"object","description":"JSON object with key-value mappings where each key is an input field name"}},"required":["blockId"]}, clientExecutable: true, requiresConfirmation: true, -} +}; export const RunFromBlock: ToolCatalogEntry = { - id: 'run_from_block', - name: 'run_from_block', - executor: 'client', - mode: 'async', - parameters: { - type: 'object', - properties: { - executionId: { - type: 'string', - description: - 'Optional execution ID to load the snapshot from. Uses latest execution if omitted.', - }, - startBlockId: { type: 'string', description: 'The block ID to start execution from.' }, - useDeployedState: { - type: 'boolean', - description: - 'When true, runs the deployed version instead of the live draft. Default: false (draft).', - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to run. If not provided, uses the current workflow in context.', - }, - workflow_input: { - type: 'object', - description: 'JSON object with key-value mappings where each key is an input field name', - }, - }, - required: ['startBlockId'], - }, + id: "run_from_block", + name: "run_from_block", + executor: "client", + mode: "async", + parameters: {"type":"object","properties":{"executionId":{"type":"string","description":"Optional execution ID to load the snapshot from. Uses latest execution if omitted."},"startBlockId":{"type":"string","description":"The block ID to start execution from."},"useDeployedState":{"type":"boolean","description":"When true, runs the deployed version instead of the live draft. Default: false (draft)."},"workflowId":{"type":"string","description":"Optional workflow ID to run. If not provided, uses the current workflow in context."},"workflow_input":{"type":"object","description":"JSON object with key-value mappings where each key is an input field name"}},"required":["startBlockId"]}, clientExecutable: true, requiresConfirmation: true, -} +}; export const RunWorkflow: ToolCatalogEntry = { - id: 'run_workflow', - name: 'run_workflow', - executor: 'client', - mode: 'async', - parameters: { - type: 'object', - properties: { - useDeployedState: { - type: 'boolean', - description: - 'When true, runs the deployed version instead of the live draft. Default: false (draft).', - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to run. If not provided, uses the current workflow in context.', - }, - workflow_input: { - type: 'object', - description: 'JSON object with key-value mappings where each key is an input field name', - }, - }, - required: ['workflow_input'], - }, + id: "run_workflow", + name: "run_workflow", + executor: "client", + mode: "async", + parameters: {"type":"object","properties":{"useDeployedState":{"type":"boolean","description":"When true, runs the deployed version instead of the live draft. Default: false (draft)."},"workflowId":{"type":"string","description":"Optional workflow ID to run. If not provided, uses the current workflow in context."},"workflow_input":{"type":"object","description":"JSON object with key-value mappings where each key is an input field name"}},"required":["workflow_input"]}, clientExecutable: true, requiresConfirmation: true, -} +}; export const RunWorkflowUntilBlock: ToolCatalogEntry = { - id: 'run_workflow_until_block', - name: 'run_workflow_until_block', - executor: 'client', - mode: 'async', - parameters: { - type: 'object', - properties: { - stopAfterBlockId: { - type: 'string', - description: 'The block ID to stop after. Execution halts once this block completes.', - }, - useDeployedState: { - type: 'boolean', - description: - 'When true, runs the deployed version instead of the live draft. Default: false (draft).', - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to run. If not provided, uses the current workflow in context.', - }, - workflow_input: { - type: 'object', - description: 'JSON object with key-value mappings where each key is an input field name', - }, - }, - required: ['stopAfterBlockId'], - }, + id: "run_workflow_until_block", + name: "run_workflow_until_block", + executor: "client", + mode: "async", + parameters: {"type":"object","properties":{"stopAfterBlockId":{"type":"string","description":"The block ID to stop after. Execution halts once this block completes."},"useDeployedState":{"type":"boolean","description":"When true, runs the deployed version instead of the live draft. Default: false (draft)."},"workflowId":{"type":"string","description":"Optional workflow ID to run. If not provided, uses the current workflow in context."},"workflow_input":{"type":"object","description":"JSON object with key-value mappings where each key is an input field name"}},"required":["stopAfterBlockId"]}, clientExecutable: true, requiresConfirmation: true, -} +}; export const ScrapePage: ToolCatalogEntry = { - id: 'scrape_page', - name: 'scrape_page', - executor: 'go', - mode: 'sync', - parameters: { - type: 'object', - properties: { - include_links: { - type: 'boolean', - description: 'Extract all links from the page (default false)', - }, - url: { type: 'string', description: 'The URL to scrape (must include https://)' }, - wait_for: { - type: 'string', - description: 'CSS selector to wait for before scraping (for JS-heavy pages)', - }, - }, - required: ['url'], - }, -} + id: "scrape_page", + name: "scrape_page", + executor: "go", + mode: "sync", + parameters: {"type":"object","properties":{"include_links":{"type":"boolean","description":"Extract all links from the page (default false)"},"url":{"type":"string","description":"The URL to scrape (must include https://)"},"wait_for":{"type":"string","description":"CSS selector to wait for before scraping (for JS-heavy pages)"}},"required":["url"]}, +}; export const SearchDocumentation: ToolCatalogEntry = { - id: 'search_documentation', - name: 'search_documentation', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - query: { type: 'string', description: 'The search query' }, - topK: { type: 'number', description: 'Number of results (max 10)' }, - }, - required: ['query'], - }, -} + id: "search_documentation", + name: "search_documentation", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"query":{"type":"string","description":"The search query"},"topK":{"type":"number","description":"Number of results (max 10)"}},"required":["query"]}, +}; export const SearchLibraryDocs: ToolCatalogEntry = { - id: 'search_library_docs', - name: 'search_library_docs', - executor: 'go', - mode: 'sync', - parameters: { - type: 'object', - properties: { - library_name: { - type: 'string', - description: "Name of the library to search for (e.g., 'nextjs', 'stripe', 'langchain')", - }, - query: { - type: 'string', - description: 'The question or topic to find documentation for - be specific', - }, - version: { type: 'string', description: "Specific version (optional, e.g., '14', 'v2')" }, - }, - required: ['library_name', 'query'], - }, -} + id: "search_library_docs", + name: "search_library_docs", + executor: "go", + mode: "sync", + parameters: {"type":"object","properties":{"library_name":{"type":"string","description":"Name of the library to search for (e.g., 'nextjs', 'stripe', 'langchain')"},"query":{"type":"string","description":"The question or topic to find documentation for - be specific"},"version":{"type":"string","description":"Specific version (optional, e.g., '14', 'v2')"}},"required":["library_name","query"]}, +}; export const SearchOnline: ToolCatalogEntry = { - id: 'search_online', - name: 'search_online', - executor: 'go', - mode: 'sync', - parameters: { - type: 'object', - properties: { - category: { - type: 'string', - description: 'Filter by category', - enum: [ - 'news', - 'tweet', - 'github', - 'paper', - 'company', - 'research paper', - 'linkedin profile', - 'pdf', - 'personal site', - ], - }, - include_text: { type: 'boolean', description: 'Include page text content (default true)' }, - num_results: { type: 'number', description: 'Number of results (default 10, max 25)' }, - query: { type: 'string', description: 'Natural language search query' }, - }, - required: ['query'], - }, -} + id: "search_online", + name: "search_online", + executor: "go", + mode: "sync", + parameters: {"type":"object","properties":{"category":{"type":"string","description":"Filter by category","enum":["news","tweet","github","paper","company","research paper","linkedin profile","pdf","personal site"]},"include_text":{"type":"boolean","description":"Include page text content (default true)"},"num_results":{"type":"number","description":"Number of results (default 10, max 25)"},"query":{"type":"string","description":"Natural language search query"}},"required":["query"]}, +}; export const SearchPatterns: ToolCatalogEntry = { - id: 'search_patterns', - name: 'search_patterns', - executor: 'go', - mode: 'sync', - parameters: { - type: 'object', - properties: { - limit: { - type: 'integer', - description: 'Maximum number of unique pattern examples to return (defaults to 3).', - }, - queries: { - type: 'array', - description: - 'Up to 3 descriptive strings explaining the workflow pattern(s) you need. Focus on intent and desired outcomes.', - items: { - type: 'string', - description: 'Example: "how to automate wealthbox meeting notes into follow-up tasks"', - }, - }, - }, - required: ['queries'], - }, -} + id: "search_patterns", + name: "search_patterns", + executor: "go", + mode: "sync", + parameters: {"type":"object","properties":{"limit":{"type":"integer","description":"Maximum number of unique pattern examples to return (defaults to 3)."},"queries":{"type":"array","description":"Up to 3 descriptive strings explaining the workflow pattern(s) you need. Focus on intent and desired outcomes.","items":{"type":"string","description":"Example: \"how to automate wealthbox meeting notes into follow-up tasks\""}}},"required":["queries"]}, +}; export const SetEnvironmentVariables: ToolCatalogEntry = { - id: 'set_environment_variables', - name: 'set_environment_variables', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - variables: { - type: 'array', - description: 'List of env vars to set', - items: { - type: 'object', - properties: { - name: { type: 'string', description: 'Variable name' }, - value: { type: 'string', description: 'Variable value' }, - }, - required: ['name', 'value'], - }, - }, - }, - required: ['variables'], - }, + id: "set_environment_variables", + name: "set_environment_variables", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"variables":{"type":"array","description":"List of env vars to set","items":{"type":"object","properties":{"name":{"type":"string","description":"Variable name"},"value":{"type":"string","description":"Variable value"}},"required":["name","value"]}}},"required":["variables"]}, requiresConfirmation: true, - requiredPermission: 'write', -} + requiredPermission: "write", +}; export const SetGlobalWorkflowVariables: ToolCatalogEntry = { - id: 'set_global_workflow_variables', - name: 'set_global_workflow_variables', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - operations: { - type: 'array', - description: 'List of operations to apply', - items: { - type: 'object', - properties: { - name: { type: 'string' }, - operation: { type: 'string', enum: ['add', 'delete', 'edit'] }, - type: { type: 'string', enum: ['plain', 'number', 'boolean', 'array', 'object'] }, - value: { type: 'string' }, - }, - required: ['operation', 'name', 'type', 'value'], - }, - }, - workflowId: { - type: 'string', - description: 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - required: ['operations'], - }, + id: "set_global_workflow_variables", + name: "set_global_workflow_variables", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"operations":{"type":"array","description":"List of operations to apply","items":{"type":"object","properties":{"name":{"type":"string"},"operation":{"type":"string","enum":["add","delete","edit"]},"type":{"type":"string","enum":["plain","number","boolean","array","object"]},"value":{"type":"string"}},"required":["operation","name","type","value"]}},"workflowId":{"type":"string","description":"Optional workflow ID. If not provided, uses the current workflow in context."}},"required":["operations"]}, requiresConfirmation: true, - requiredPermission: 'write', -} + requiredPermission: "write", +}; export const Superagent: ToolCatalogEntry = { - id: 'superagent', - name: 'superagent', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { - task: { - description: - "A single sentence — the agent has full conversation context. Do NOT pre-read credentials or look up configs. Example: 'send the email we discussed' or 'check my calendar for tomorrow'.", - type: 'string', - }, - }, - required: ['task'], - type: 'object', - }, - subagentId: 'superagent', + id: "superagent", + name: "superagent", + executor: "subagent", + mode: "async", + parameters: {"properties":{"task":{"description":"A single sentence — the agent has full conversation context. Do NOT pre-read credentials or look up configs. Example: 'send the email we discussed' or 'check my calendar for tomorrow'.","type":"string"}},"required":["task"],"type":"object"}, + subagentId: "superagent", internal: true, -} +}; export const Table: ToolCatalogEntry = { - id: 'table', - name: 'table', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { request: { description: 'What table action is needed.', type: 'string' } }, - required: ['request'], - type: 'object', - }, - subagentId: 'table', + id: "table", + name: "table", + executor: "subagent", + mode: "async", + parameters: {"properties":{"request":{"description":"What table action is needed.","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "table", internal: true, -} +}; export const ToolSearchToolRegex: ToolCatalogEntry = { - id: 'tool_search_tool_regex', - name: 'tool_search_tool_regex', - executor: 'sim', - mode: 'async', - parameters: { - properties: { - case_insensitive: { - description: 'Whether the regex should be case-insensitive (default true).', - type: 'boolean', - }, - max_results: { - description: 'Maximum number of tools to return (optional).', - type: 'integer', - }, - pattern: { - description: 'Regular expression to match tool names or descriptions.', - type: 'string', - }, - }, - required: ['pattern'], - type: 'object', - }, -} + id: "tool_search_tool_regex", + name: "tool_search_tool_regex", + executor: "sim", + mode: "async", + parameters: {"properties":{"case_insensitive":{"description":"Whether the regex should be case-insensitive (default true).","type":"boolean"},"max_results":{"description":"Maximum number of tools to return (optional).","type":"integer"},"pattern":{"description":"Regular expression to match tool names or descriptions.","type":"string"}},"required":["pattern"],"type":"object"}, +}; export const UpdateJobHistory: ToolCatalogEntry = { - id: 'update_job_history', - name: 'update_job_history', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - jobId: { type: 'string', description: 'The job ID.' }, - summary: { - type: 'string', - description: - "A concise summary of what was done this run (e.g., 'Sent follow-up emails to 3 leads: Alice, Bob, Carol').", - }, - }, - required: ['jobId', 'summary'], - }, -} + id: "update_job_history", + name: "update_job_history", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"jobId":{"type":"string","description":"The job ID."},"summary":{"type":"string","description":"A concise summary of what was done this run (e.g., 'Sent follow-up emails to 3 leads: Alice, Bob, Carol')."}},"required":["jobId","summary"]}, +}; export const UpdateWorkspaceMcpServer: ToolCatalogEntry = { - id: 'update_workspace_mcp_server', - name: 'update_workspace_mcp_server', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - description: { type: 'string', description: 'New description for the server' }, - isPublic: { type: 'boolean', description: 'Whether the server is publicly accessible' }, - name: { type: 'string', description: 'New name for the server' }, - serverId: { type: 'string', description: 'Required: the MCP server ID to update' }, - }, - required: ['serverId'], - }, + id: "update_workspace_mcp_server", + name: "update_workspace_mcp_server", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"description":{"type":"string","description":"New description for the server"},"isPublic":{"type":"boolean","description":"Whether the server is publicly accessible"},"name":{"type":"string","description":"New name for the server"},"serverId":{"type":"string","description":"Required: the MCP server ID to update"}},"required":["serverId"]}, requiresConfirmation: true, - requiredPermission: 'admin', -} + requiredPermission: "admin", +}; export const UserMemory: ToolCatalogEntry = { - id: 'user_memory', - name: 'user_memory', - executor: 'go', - mode: 'sync', - parameters: { - type: 'object', - properties: { - confidence: { - type: 'number', - description: 'Confidence level 0-1 (default 1.0 for explicit, 0.8 for inferred)', - }, - correct_value: { - type: 'string', - description: "The correct value to replace the wrong one (for 'correct' operation)", - }, - key: { - type: 'string', - description: "Unique key for the memory (e.g., 'preferred_model', 'slack_credential')", - }, - limit: { type: 'number', description: 'Number of results for search (default 10)' }, - memory_type: { - type: 'string', - description: "Type of memory: 'preference', 'entity', 'history', or 'correction'", - enum: ['preference', 'entity', 'history', 'correction'], - }, - operation: { - type: 'string', - description: "Operation: 'add', 'search', 'delete', 'correct', or 'list'", - enum: ['add', 'search', 'delete', 'correct', 'list'], - }, - query: { type: 'string', description: 'Search query to find relevant memories' }, - source: { - type: 'string', - description: "Source: 'explicit' (user told you) or 'inferred' (you observed)", - enum: ['explicit', 'inferred'], - }, - value: { type: 'string', description: 'Value to remember' }, - }, - required: ['operation'], - }, -} + id: "user_memory", + name: "user_memory", + executor: "go", + mode: "sync", + parameters: {"type":"object","properties":{"confidence":{"type":"number","description":"Confidence level 0-1 (default 1.0 for explicit, 0.8 for inferred)"},"correct_value":{"type":"string","description":"The correct value to replace the wrong one (for 'correct' operation)"},"key":{"type":"string","description":"Unique key for the memory (e.g., 'preferred_model', 'slack_credential')"},"limit":{"type":"number","description":"Number of results for search (default 10)"},"memory_type":{"type":"string","description":"Type of memory: 'preference', 'entity', 'history', or 'correction'","enum":["preference","entity","history","correction"]},"operation":{"type":"string","description":"Operation: 'add', 'search', 'delete', 'correct', or 'list'","enum":["add","search","delete","correct","list"]},"query":{"type":"string","description":"Search query to find relevant memories"},"source":{"type":"string","description":"Source: 'explicit' (user told you) or 'inferred' (you observed)","enum":["explicit","inferred"]},"value":{"type":"string","description":"Value to remember"}},"required":["operation"]}, +}; export const UserTable: ToolCatalogEntry = { - id: 'user_table', - name: 'user_table', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - args: { - type: 'object', - description: 'Arguments for the operation', - properties: { - column: { - type: 'object', - description: 'Column definition for add_column: { name, type, unique?, position? }', - }, - columnName: { - type: 'string', - description: - 'Column name (required for rename_column, update_column; use columnNames array for batch delete_column)', - }, - columnNames: { - type: 'array', - description: - 'Array of column names to delete at once (for delete_column). Preferred over columnName when deleting multiple columns.', - }, - data: { - type: 'object', - description: 'Row data as key-value pairs (required for insert_row, update_row)', - }, - description: { type: 'string', description: "Table description (optional for 'create')" }, - fileId: { - type: 'string', - description: - 'Canonical workspace file ID for create_from_file/import_file. Discover via read("files/{name}/meta.json") or glob("files/by-id/*/meta.json").', - }, - filePath: { - type: 'string', - description: - 'Legacy workspace file reference for create_from_file/import_file. Prefer fileId.', - }, - filter: { - type: 'object', - description: - 'MongoDB-style filter for query_rows, update_rows_by_filter, delete_rows_by_filter', - }, - limit: { - type: 'number', - description: 'Maximum rows to return or affect (optional, default 100)', - }, - name: { type: 'string', description: "Table name (required for 'create')" }, - newName: { type: 'string', description: 'New column name (required for rename_column)' }, - newType: { - type: 'string', - description: - 'New column type (optional for update_column). Types: string, number, boolean, date, json', - }, - offset: { - type: 'number', - description: 'Number of rows to skip (optional for query_rows, default 0)', - }, - outputFormat: { - type: 'string', - description: - 'Explicit format override for outputPath. Usually unnecessary — the file extension determines the format automatically. Only use this to force a different format than what the extension implies.', - enum: ['json', 'csv', 'txt', 'md', 'html'], - }, - outputPath: { - type: 'string', - description: - 'Pipe query_rows results directly to a NEW workspace file. The format is auto-inferred from the file extension: .csv → CSV, .json → JSON, .md → Markdown, etc. Use .csv for tabular exports. Use a flat path like "files/export.csv" — nested paths are not supported.', - }, - rowId: { - type: 'string', - description: 'Row ID (required for get_row, update_row, delete_row)', - }, - rowIds: { - type: 'array', - description: 'Array of row IDs to delete (for batch_delete_rows)', - }, - rows: { - type: 'array', - description: 'Array of row data objects (required for batch_insert_rows)', - }, - schema: { - type: 'object', - description: - "Table schema with columns array (required for 'create'). Each column: { name, type, unique? }", - }, - sort: { - type: 'object', - description: - "Sort specification as { field: 'asc' | 'desc' } (optional for query_rows)", - }, - tableId: { - type: 'string', - description: "Table ID (required for most operations except 'create')", - }, - unique: { - type: 'boolean', - description: 'Set column unique constraint (optional for update_column)', - }, - updates: { - type: 'array', - description: - 'Array of per-row updates: [{ rowId, data: { col: val } }] (for batch_update_rows)', - }, - values: { - type: 'object', - description: - 'Map of rowId to value for single-column batch update: { "rowId1": val1, "rowId2": val2 } (for batch_update_rows with columnName)', - }, - }, - }, - operation: { - type: 'string', - description: 'The operation to perform', - enum: [ - 'create', - 'create_from_file', - 'import_file', - 'get', - 'get_schema', - 'delete', - 'insert_row', - 'batch_insert_rows', - 'get_row', - 'query_rows', - 'update_row', - 'delete_row', - 'update_rows_by_filter', - 'delete_rows_by_filter', - 'batch_update_rows', - 'batch_delete_rows', - 'add_column', - 'rename_column', - 'delete_column', - 'update_column', - ], - }, - }, - required: ['operation', 'args'], - }, - resultSchema: { - type: 'object', - properties: { - data: { type: 'object', description: 'Operation-specific result payload.' }, - message: { type: 'string', description: 'Human-readable outcome summary.' }, - success: { type: 'boolean', description: 'Whether the operation succeeded.' }, - }, - required: ['success', 'message'], - }, + id: "user_table", + name: "user_table", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"args":{"type":"object","description":"Arguments for the operation","properties":{"column":{"type":"object","description":"Column definition for add_column: { name, type, unique?, position? }"},"columnName":{"type":"string","description":"Column name (required for rename_column, update_column; use columnNames array for batch delete_column)"},"columnNames":{"type":"array","description":"Array of column names to delete at once (for delete_column). Preferred over columnName when deleting multiple columns."},"data":{"type":"object","description":"Row data as key-value pairs (required for insert_row, update_row)"},"description":{"type":"string","description":"Table description (optional for 'create')"},"fileId":{"type":"string","description":"Canonical workspace file ID for create_from_file/import_file. Discover via read(\"files/{name}/meta.json\") or glob(\"files/by-id/*/meta.json\")."},"filePath":{"type":"string","description":"Legacy workspace file reference for create_from_file/import_file. Prefer fileId."},"filter":{"type":"object","description":"MongoDB-style filter for query_rows, update_rows_by_filter, delete_rows_by_filter"},"limit":{"type":"number","description":"Maximum rows to return or affect (optional, default 100)"},"name":{"type":"string","description":"Table name (required for 'create')"},"newName":{"type":"string","description":"New column name (required for rename_column)"},"newType":{"type":"string","description":"New column type (optional for update_column). Types: string, number, boolean, date, json"},"offset":{"type":"number","description":"Number of rows to skip (optional for query_rows, default 0)"},"outputFormat":{"type":"string","description":"Explicit format override for outputPath. Usually unnecessary — the file extension determines the format automatically. Only use this to force a different format than what the extension implies.","enum":["json","csv","txt","md","html"]},"outputPath":{"type":"string","description":"Pipe query_rows results directly to a NEW workspace file. The format is auto-inferred from the file extension: .csv → CSV, .json → JSON, .md → Markdown, etc. Use .csv for tabular exports. Use a flat path like \"files/export.csv\" — nested paths are not supported."},"rowId":{"type":"string","description":"Row ID (required for get_row, update_row, delete_row)"},"rowIds":{"type":"array","description":"Array of row IDs to delete (for batch_delete_rows)"},"rows":{"type":"array","description":"Array of row data objects (required for batch_insert_rows)"},"schema":{"type":"object","description":"Table schema with columns array (required for 'create'). Each column: { name, type, unique? }"},"sort":{"type":"object","description":"Sort specification as { field: 'asc' | 'desc' } (optional for query_rows)"},"tableId":{"type":"string","description":"Table ID (required for most operations except 'create')"},"unique":{"type":"boolean","description":"Set column unique constraint (optional for update_column)"},"updates":{"type":"array","description":"Array of per-row updates: [{ rowId, data: { col: val } }] (for batch_update_rows)"},"values":{"type":"object","description":"Map of rowId to value for single-column batch update: { \"rowId1\": val1, \"rowId2\": val2 } (for batch_update_rows with columnName)"}}},"operation":{"type":"string","description":"The operation to perform","enum":["create","create_from_file","import_file","get","get_schema","delete","insert_row","batch_insert_rows","get_row","query_rows","update_row","delete_row","update_rows_by_filter","delete_rows_by_filter","batch_update_rows","batch_delete_rows","add_column","rename_column","delete_column","update_column"]}},"required":["operation","args"]}, + resultSchema: {"type":"object","properties":{"data":{"type":"object","description":"Operation-specific result payload."},"message":{"type":"string","description":"Human-readable outcome summary."},"success":{"type":"boolean","description":"Whether the operation succeeded."}},"required":["success","message"]}, requiresConfirmation: true, -} +}; export const Workflow: ToolCatalogEntry = { - id: 'workflow', - name: 'workflow', - executor: 'subagent', - mode: 'async', - parameters: { - properties: { - request: { - description: - "A single sentence — the agent has full conversation context and VFS access. Do NOT look up IDs or pre-read data; the workflow agent does its own research. Example: 'move all the return letter workflows into a folder called Letters'.", - type: 'string', - }, - }, - required: ['request'], - type: 'object', - }, - subagentId: 'workflow', + id: "workflow", + name: "workflow", + executor: "subagent", + mode: "async", + parameters: {"properties":{"request":{"description":"A single sentence — the agent has full conversation context and VFS access. Do NOT look up IDs or pre-read data; the workflow agent does its own research. Example: 'move all the return letter workflows into a folder called Letters'.","type":"string"}},"required":["request"],"type":"object"}, + subagentId: "workflow", internal: true, -} +}; export const WorkspaceFile: ToolCatalogEntry = { - id: 'workspace_file', - name: 'workspace_file', - executor: 'sim', - mode: 'async', - parameters: { - type: 'object', - properties: { - operation: { - type: 'string', - description: 'The file operation to perform.', - enum: ['create', 'append', 'update', 'patch', 'rename', 'delete'], - }, - target: { - type: 'object', - description: - 'Explicit file target. Use kind=new_file + fileName for create. Use kind=file_id + fileId for append, update, patch, rename, and delete. Emit target keys in this order: kind, fileId, fileName.', - properties: { - kind: { - type: 'string', - description: 'How the file target is identified.', - enum: ['new_file', 'file_id'], - }, - fileId: { - type: 'string', - description: 'Canonical existing workspace file ID. Required when target.kind=file_id.', - }, - fileName: { - type: 'string', - description: - 'Plain workspace filename including extension, e.g. "main.py" or "report.docx". Required when target.kind=new_file.', - }, - }, - required: ['kind'], - }, - title: { - type: 'string', - description: - 'Optional short UI label for create/append chunks, e.g. "Chapter 1" or "Slide 3".', - }, - contentType: { - type: 'string', - description: - 'Optional MIME type override. Usually omit and let the system infer from the target file extension.', - enum: [ - 'text/markdown', - 'text/html', - 'text/plain', - 'application/json', - 'text/csv', - 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/pdf', - ], - }, - edit: { - type: 'object', - description: - 'Patch metadata. Use strategy=search_replace for exact text replacement, or strategy=anchored for line-based inserts/replacements/deletions. Emit edit keys in this order: strategy, search, replace, replaceAll, mode, occurrence, before_anchor, after_anchor, anchor, start_anchor, end_anchor, content.', - properties: { - strategy: { - type: 'string', - description: 'Patch strategy.', - enum: ['search_replace', 'anchored'], - }, - search: { - type: 'string', - description: - 'Exact text to find when strategy=search_replace. Must match exactly once unless replaceAll=true.', - }, - replace: { - type: 'string', - description: 'Replacement text when strategy=search_replace.', - }, - replaceAll: { - type: 'boolean', - description: - 'When true and strategy=search_replace, replace every match instead of requiring a unique single match.', - }, - mode: { - type: 'string', - description: 'Anchored edit mode when strategy=anchored.', - enum: ['replace_between', 'insert_after', 'delete_between'], - }, - occurrence: { - type: 'number', - description: '1-based occurrence for repeated anchor lines. Optional; defaults to 1.', - }, - before_anchor: { - type: 'string', - description: - 'Boundary line kept before inserted replacement content. Required for mode=replace_between.', - }, - after_anchor: { - type: 'string', - description: - 'Boundary line kept after inserted replacement content. Required for mode=replace_between.', - }, - anchor: { - type: 'string', - description: - 'Anchor line after which new content is inserted. Required for mode=insert_after.', - }, - start_anchor: { - type: 'string', - description: 'First line to delete. Required for mode=delete_between.', - }, - end_anchor: { - type: 'string', - description: 'First line to keep after deletion. Required for mode=delete_between.', - }, - content: { - type: 'string', - description: - 'Inserted or replacement content for anchored edits. Not used for delete_between.', - }, - }, - }, - newName: { - type: 'string', - description: 'New file name for rename. Must be a plain workspace filename like "main.py".', - }, - content: { - type: 'string', - description: - 'File content for create, append, or update. For .pptx/.docx/.pdf this must be JavaScript source code for the corresponding generator runtime.', - }, - }, - required: ['operation', 'target'], - }, - resultSchema: { - type: 'object', - properties: { - data: { - type: 'object', - description: - 'Optional operation metadata such as file id, file name, size, and content type.', - }, - message: { type: 'string', description: 'Human-readable summary of the outcome.' }, - success: { type: 'boolean', description: 'Whether the file operation succeeded.' }, - }, - required: ['success', 'message'], - }, - requiredPermission: 'write', -} + id: "workspace_file", + name: "workspace_file", + executor: "sim", + mode: "async", + parameters: {"type":"object","properties":{"operation":{"type":"string","description":"The file operation to perform.","enum":["append","update","patch","rename","delete"]},"target":{"type":"object","description":"Explicit file target. Use kind=file_id + fileId for all operations. Emit target keys in this order: kind, fileId, fileName.","properties":{"kind":{"type":"string","description":"How the file target is identified.","enum":["new_file","file_id"]},"fileId":{"type":"string","description":"Canonical existing workspace file ID. Required when target.kind=file_id."},"fileName":{"type":"string","description":"Plain workspace filename including extension, e.g. \"main.py\" or \"report.docx\". Required when target.kind=new_file."}},"required":["kind"]},"title":{"type":"string","description":"Optional short UI label for create/append chunks, e.g. \"Chapter 1\" or \"Slide 3\"."},"contentType":{"type":"string","description":"Optional MIME type override. Usually omit and let the system infer from the target file extension.","enum":["text/markdown","text/html","text/plain","application/json","text/csv","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/pdf"]},"edit":{"type":"object","description":"Patch metadata. Use strategy=search_replace for exact text replacement, or strategy=anchored for line-based inserts/replacements/deletions. Emit edit keys in this order: strategy, search, replace, replaceAll, mode, occurrence, before_anchor, after_anchor, anchor, start_anchor, end_anchor, content.","properties":{"strategy":{"type":"string","description":"Patch strategy.","enum":["search_replace","anchored"]},"search":{"type":"string","description":"Exact text to find when strategy=search_replace. Must match exactly once unless replaceAll=true."},"replace":{"type":"string","description":"Replacement text when strategy=search_replace."},"replaceAll":{"type":"boolean","description":"When true and strategy=search_replace, replace every match instead of requiring a unique single match."},"mode":{"type":"string","description":"Anchored edit mode when strategy=anchored.","enum":["replace_between","insert_after","delete_between"]},"occurrence":{"type":"number","description":"1-based occurrence for repeated anchor lines. Optional; defaults to 1."},"before_anchor":{"type":"string","description":"Boundary line kept before inserted replacement content. Required for mode=replace_between."},"after_anchor":{"type":"string","description":"Boundary line kept after inserted replacement content. Required for mode=replace_between."},"anchor":{"type":"string","description":"Anchor line after which new content is inserted. Required for mode=insert_after."},"start_anchor":{"type":"string","description":"First line to delete. Required for mode=delete_between."},"end_anchor":{"type":"string","description":"First line to keep after deletion. Required for mode=delete_between."},"content":{"type":"string","description":"Inserted or replacement content for anchored edits. Not used for delete_between."}}},"newName":{"type":"string","description":"New file name for rename. Must be a plain workspace filename like \"main.py\"."},"content":{"type":"string","description":"File content for append or update. For .pptx/.docx/.pdf this must be JavaScript source code for the corresponding generator runtime."}},"required":["operation","target"]}, + resultSchema: {"type":"object","properties":{"data":{"type":"object","description":"Optional operation metadata such as file id, file name, size, and content type."},"message":{"type":"string","description":"Human-readable summary of the outcome."},"success":{"type":"boolean","description":"Whether the file operation succeeded."}},"required":["success","message"]}, + requiredPermission: "write", +}; export const TOOL_CATALOG: Record = { [Agent.id]: Agent, @@ -2793,4 +866,4 @@ export const TOOL_CATALOG: Record = { [UserTable.id]: UserTable, [Workflow.id]: Workflow, [WorkspaceFile.id]: WorkspaceFile, -} +}; diff --git a/apps/sim/lib/copilot/generated/tool-schemas-v1.ts b/apps/sim/lib/copilot/generated/tool-schemas-v1.ts index 028964cb4a..6771173efa 100644 --- a/apps/sim/lib/copilot/generated/tool-schemas-v1.ts +++ b/apps/sim/lib/copilot/generated/tool-schemas-v1.ts @@ -5,2477 +5,2718 @@ export type JsonSchema = unknown export interface ToolRuntimeSchemaEntry { - parameters?: JsonSchema - resultSchema?: JsonSchema + parameters?: JsonSchema; + resultSchema?: JsonSchema; } export const TOOL_RUNTIME_SCHEMAS: Record = { - agent: { + ["agent"]: { parameters: { - properties: { - request: { - description: 'What tool/skill/MCP action is needed.', - type: 'string', - }, + "properties": { + "request": { + "description": "What tool/skill/MCP action is needed.", + "type": "string" + } }, - required: ['request'], - type: 'object', + "required": [ + "request" + ], + "type": "object" }, resultSchema: undefined, }, - auth: { + ["auth"]: { parameters: { - properties: { - request: { - description: 'What authentication/credential action is needed.', - type: 'string', - }, + "properties": { + "request": { + "description": "What authentication/credential action is needed.", + "type": "string" + } }, - required: ['request'], - type: 'object', + "required": [ + "request" + ], + "type": "object" }, resultSchema: undefined, }, - check_deployment_status: { + ["check_deployment_status"]: { parameters: { - type: 'object', - properties: { - workflowId: { - type: 'string', - description: 'Workflow ID to check (defaults to current workflow)', - }, - }, + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Workflow ID to check (defaults to current workflow)" + } + } }, resultSchema: undefined, }, - complete_job: { + ["complete_job"]: { parameters: { - type: 'object', - properties: { - jobId: { - type: 'string', - description: 'The ID of the job to mark as completed.', - }, + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "The ID of the job to mark as completed." + } }, - required: ['jobId'], + "required": [ + "jobId" + ] }, resultSchema: undefined, }, - context_write: { + ["context_write"]: { parameters: { - type: 'object', - properties: { - content: { - type: 'string', - description: 'Full content to write to the file (replaces existing content)', - }, - file_path: { - type: 'string', - description: "Path of the file to write (e.g. 'SESSION.md')", + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Full content to write to the file (replaces existing content)" }, + "file_path": { + "type": "string", + "description": "Path of the file to write (e.g. 'SESSION.md')" + } }, - required: ['file_path', 'content'], + "required": [ + "file_path", + "content" + ] }, resultSchema: undefined, }, - crawl_website: { + ["crawl_website"]: { parameters: { - type: 'object', - properties: { - exclude_paths: { - type: 'array', - description: 'Skip URLs matching these patterns', - items: { - type: 'string', - }, + "type": "object", + "properties": { + "exclude_paths": { + "type": "array", + "description": "Skip URLs matching these patterns", + "items": { + "type": "string" + } }, - include_paths: { - type: 'array', - description: 'Only crawl URLs matching these patterns', - items: { - type: 'string', - }, + "include_paths": { + "type": "array", + "description": "Only crawl URLs matching these patterns", + "items": { + "type": "string" + } }, - limit: { - type: 'number', - description: 'Maximum pages to crawl (default 10, max 50)', + "limit": { + "type": "number", + "description": "Maximum pages to crawl (default 10, max 50)" }, - max_depth: { - type: 'number', - description: 'How deep to follow links (default 2)', - }, - url: { - type: 'string', - description: 'Starting URL to crawl from', + "max_depth": { + "type": "number", + "description": "How deep to follow links (default 2)" }, + "url": { + "type": "string", + "description": "Starting URL to crawl from" + } }, - required: ['url'], + "required": [ + "url" + ] }, resultSchema: undefined, }, - create_file: { + ["create_file"]: { parameters: { - type: 'object', - properties: { - contentType: { - type: 'string', - description: - 'Optional MIME type override. Usually omit and let the system infer from the file extension.', - }, - fileName: { - type: 'string', - description: - 'Plain workspace filename including extension, e.g. "main.py" or "report.md". Must not contain slashes.', + "type": "object", + "properties": { + "contentType": { + "type": "string", + "description": "Optional MIME type override. Usually omit and let the system infer from the file extension." }, + "fileName": { + "type": "string", + "description": "Plain workspace filename including extension, e.g. \"main.py\" or \"report.md\". Must not contain slashes." + } }, - required: ['fileName'], + "required": [ + "fileName" + ] }, resultSchema: { - type: 'object', - properties: { - data: { - type: 'object', - description: 'Contains id (the fileId) and name.', + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Contains id (the fileId) and name." }, - message: { - type: 'string', - description: 'Human-readable outcome.', - }, - success: { - type: 'boolean', - description: 'Whether the file was created.', + "message": { + "type": "string", + "description": "Human-readable outcome." }, + "success": { + "type": "boolean", + "description": "Whether the file was created." + } }, - required: ['success', 'message'], + "required": [ + "success", + "message" + ] }, }, - create_folder: { + ["create_folder"]: { parameters: { - type: 'object', - properties: { - name: { - type: 'string', - description: 'Folder name.', + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Folder name." }, - parentId: { - type: 'string', - description: 'Optional parent folder ID.', - }, - workspaceId: { - type: 'string', - description: 'Optional workspace ID.', + "parentId": { + "type": "string", + "description": "Optional parent folder ID." }, + "workspaceId": { + "type": "string", + "description": "Optional workspace ID." + } }, - required: ['name'], + "required": [ + "name" + ] }, resultSchema: undefined, }, - create_job: { + ["create_job"]: { parameters: { - type: 'object', - properties: { - cron: { - type: 'string', - description: - "Cron expression for recurring jobs (e.g., '*/5 * * * *' for every 5 minutes, '0 9 * * *' for daily at 9 AM). Omit for one-time jobs.", + "type": "object", + "properties": { + "cron": { + "type": "string", + "description": "Cron expression for recurring jobs (e.g., '*/5 * * * *' for every 5 minutes, '0 9 * * *' for daily at 9 AM). Omit for one-time jobs." }, - lifecycle: { - type: 'string', - description: - "'persistent' (default) or 'until_complete'. Until_complete jobs stop when complete_job is called after the success condition is met.", - enum: ['persistent', 'until_complete'], + "lifecycle": { + "type": "string", + "description": "'persistent' (default) or 'until_complete'. Until_complete jobs stop when complete_job is called after the success condition is met.", + "enum": [ + "persistent", + "until_complete" + ] }, - maxRuns: { - type: 'integer', - description: - 'Maximum number of executions before the job auto-completes. Safety limit to prevent runaway polling.', + "maxRuns": { + "type": "integer", + "description": "Maximum number of executions before the job auto-completes. Safety limit to prevent runaway polling." }, - prompt: { - type: 'string', - description: - 'The prompt to execute when the job fires. This is sent to the Mothership as a user message.', + "prompt": { + "type": "string", + "description": "The prompt to execute when the job fires. This is sent to the Mothership as a user message." }, - successCondition: { - type: 'string', - description: - "What must happen for the job to be considered complete. Used with until_complete lifecycle (e.g., 'John has replied to the partnership email').", + "successCondition": { + "type": "string", + "description": "What must happen for the job to be considered complete. Used with until_complete lifecycle (e.g., 'John has replied to the partnership email')." }, - time: { - type: 'string', - description: - "ISO 8601 datetime for one-time execution or as the start time for a cron schedule (e.g., '2026-03-06T09:00:00'). Include timezone offset or use the timezone parameter.", + "time": { + "type": "string", + "description": "ISO 8601 datetime for one-time execution or as the start time for a cron schedule (e.g., '2026-03-06T09:00:00'). Include timezone offset or use the timezone parameter." }, - timezone: { - type: 'string', - description: - "IANA timezone for the schedule (e.g., 'America/New_York', 'Europe/London'). Defaults to UTC.", - }, - title: { - type: 'string', - description: - "A short, descriptive title for the job (e.g., 'Email Poller', 'Daily Report'). Used as the display name.", + "timezone": { + "type": "string", + "description": "IANA timezone for the schedule (e.g., 'America/New_York', 'Europe/London'). Defaults to UTC." }, + "title": { + "type": "string", + "description": "A short, descriptive title for the job (e.g., 'Email Poller', 'Daily Report'). Used as the display name." + } }, - required: ['title', 'prompt'], + "required": [ + "title", + "prompt" + ] }, resultSchema: undefined, }, - create_workflow: { + ["create_workflow"]: { parameters: { - type: 'object', - properties: { - description: { - type: 'string', - description: 'Optional workflow description.', + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Optional workflow description." }, - folderId: { - type: 'string', - description: 'Optional folder ID.', + "folderId": { + "type": "string", + "description": "Optional folder ID." }, - name: { - type: 'string', - description: 'Workflow name.', - }, - workspaceId: { - type: 'string', - description: 'Optional workspace ID.', + "name": { + "type": "string", + "description": "Workflow name." }, + "workspaceId": { + "type": "string", + "description": "Optional workspace ID." + } }, - required: ['name'], + "required": [ + "name" + ] }, resultSchema: undefined, }, - create_workspace_mcp_server: { + ["create_workspace_mcp_server"]: { parameters: { - type: 'object', - properties: { - description: { - type: 'string', - description: 'Optional description for the server', + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Optional description for the server" }, - name: { - type: 'string', - description: 'Required: server name', - }, - workspaceId: { - type: 'string', - description: 'Workspace ID (defaults to current workspace)', + "name": { + "type": "string", + "description": "Required: server name" }, + "workspaceId": { + "type": "string", + "description": "Workspace ID (defaults to current workspace)" + } }, - required: ['name'], + "required": [ + "name" + ] }, resultSchema: undefined, }, - debug: { + ["debug"]: { parameters: { - properties: { - context: { - description: - 'Pre-gathered context: workflow state JSON, block schemas, error logs. The debug agent will skip re-reading anything included here.', - type: 'string', - }, - request: { - description: - 'What to debug. Include error messages, block IDs, and any context about the failure.', - type: 'string', + "properties": { + "context": { + "description": "Pre-gathered context: workflow state JSON, block schemas, error logs. The debug agent will skip re-reading anything included here.", + "type": "string" }, + "request": { + "description": "What to debug. Include error messages, block IDs, and any context about the failure.", + "type": "string" + } }, - required: ['request'], - type: 'object', + "required": [ + "request" + ], + "type": "object" }, resultSchema: undefined, }, - delete_file: { + ["delete_file"]: { parameters: { - type: 'object', - properties: { - fileId: { - type: 'string', - description: 'Canonical workspace file ID of the file to delete.', - }, + "type": "object", + "properties": { + "fileId": { + "type": "string", + "description": "Canonical workspace file ID of the file to delete." + } }, - required: ['fileId'], + "required": [ + "fileId" + ] }, resultSchema: { - type: 'object', - properties: { - message: { - type: 'string', - description: 'Human-readable outcome.', - }, - success: { - type: 'boolean', - description: 'Whether the delete succeeded.', + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable outcome." }, + "success": { + "type": "boolean", + "description": "Whether the delete succeeded." + } }, - required: ['success', 'message'], + "required": [ + "success", + "message" + ] }, }, - delete_folder: { + ["delete_folder"]: { parameters: { - type: 'object', - properties: { - folderId: { - type: 'string', - description: 'The folder ID to delete.', - }, + "type": "object", + "properties": { + "folderId": { + "type": "string", + "description": "The folder ID to delete." + } }, - required: ['folderId'], + "required": [ + "folderId" + ] }, resultSchema: undefined, }, - delete_workflow: { + ["delete_workflow"]: { parameters: { - type: 'object', - properties: { - workflowId: { - type: 'string', - description: 'The workflow ID to delete.', - }, + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "The workflow ID to delete." + } }, - required: ['workflowId'], + "required": [ + "workflowId" + ] }, resultSchema: undefined, }, - delete_workspace_mcp_server: { + ["delete_workspace_mcp_server"]: { parameters: { - type: 'object', - properties: { - serverId: { - type: 'string', - description: 'Required: the MCP server ID to delete', - }, + "type": "object", + "properties": { + "serverId": { + "type": "string", + "description": "Required: the MCP server ID to delete" + } }, - required: ['serverId'], + "required": [ + "serverId" + ] }, resultSchema: undefined, }, - deploy: { + ["deploy"]: { parameters: { - properties: { - request: { - description: - 'Detailed deployment instructions. Include deployment type (api/chat) and ALL user-specified options: identifier, title, description, authType, password, allowedEmails, welcomeMessage, outputConfigs (block outputs to display).', - type: 'string', - }, + "properties": { + "request": { + "description": "Detailed deployment instructions. Include deployment type (api/chat) and ALL user-specified options: identifier, title, description, authType, password, allowedEmails, welcomeMessage, outputConfigs (block outputs to display).", + "type": "string" + } }, - required: ['request'], - type: 'object', + "required": [ + "request" + ], + "type": "object" }, resultSchema: undefined, }, - deploy_api: { + ["deploy_api"]: { parameters: { - type: 'object', - properties: { - action: { - type: 'string', - description: 'Whether to deploy or undeploy the API endpoint', - enum: ['deploy', 'undeploy'], - default: 'deploy', - }, - workflowId: { - type: 'string', - description: 'Workflow ID to deploy (required in workspace context)', - }, - }, - }, - resultSchema: undefined, - }, - deploy_chat: { - parameters: { - type: 'object', - properties: { - action: { - type: 'string', - description: 'Whether to deploy or undeploy the chat interface', - enum: ['deploy', 'undeploy'], - default: 'deploy', - }, - allowedEmails: { - type: 'array', - description: 'List of allowed emails/domains for email or SSO auth', - items: { - type: 'string', - }, - }, - authType: { - type: 'string', - description: 'Authentication type: public, password, email, or sso', - enum: ['public', 'password', 'email', 'sso'], - default: 'public', - }, - description: { - type: 'string', - description: 'Optional description for the chat', - }, - identifier: { - type: 'string', - description: 'URL slug for the chat (lowercase letters, numbers, hyphens only)', - }, - outputConfigs: { - type: 'array', - description: 'Output configurations specifying which block outputs to display in chat', - items: { - type: 'object', - properties: { - blockId: { - type: 'string', - description: 'The block UUID', - }, - path: { - type: 'string', - description: "The output path (e.g. 'response', 'response.content')", - }, - }, - required: ['blockId', 'path'], - }, - }, - password: { - type: 'string', - description: 'Password for password-protected chats', - }, - title: { - type: 'string', - description: 'Display title for the chat interface', - }, - welcomeMessage: { - type: 'string', - description: 'Welcome message shown to users', - }, - workflowId: { - type: 'string', - description: 'Workflow ID to deploy (required in workspace context)', - }, - }, - }, - resultSchema: undefined, - }, - deploy_mcp: { - parameters: { - type: 'object', - properties: { - parameterDescriptions: { - type: 'array', - description: 'Array of parameter descriptions for the tool', - items: { - type: 'object', - properties: { - description: { - type: 'string', - description: 'Parameter description', - }, - name: { - type: 'string', - description: 'Parameter name', - }, - }, - required: ['name', 'description'], - }, - }, - serverId: { - type: 'string', - description: 'Required: server ID from list_workspace_mcp_servers', - }, - toolDescription: { - type: 'string', - description: 'Description for the MCP tool', - }, - toolName: { - type: 'string', - description: 'Name for the MCP tool (defaults to workflow name)', - }, - workflowId: { - type: 'string', - description: 'Workflow ID (defaults to active workflow)', - }, - }, - required: ['serverId'], - }, - resultSchema: undefined, - }, - download_to_workspace_file: { - parameters: { - type: 'object', - properties: { - fileName: { - type: 'string', - description: - 'Optional workspace file name to save as. If omitted, the name is inferred from the response or URL.', - }, - url: { - type: 'string', - description: - 'Direct URL of the file to download, such as an image CDN URL ending in .png or .jpg', - }, - }, - required: ['url'], - }, - resultSchema: undefined, - }, - edit_workflow: { - parameters: { - type: 'object', - properties: { - operations: { - type: 'array', - description: 'Array of edit operations', - items: { - type: 'object', - properties: { - block_id: { - type: 'string', - description: - 'Block ID for the operation. For add operations, this will be the desired ID for the new block.', - }, - operation_type: { - type: 'string', - description: 'Type of operation to perform', - enum: ['add', 'edit', 'delete', 'insert_into_subflow', 'extract_from_subflow'], - }, - params: { - type: 'object', - description: - 'Parameters for the operation. \nFor edit: {"inputs": {"temperature": 0.5}} NOT {"subBlocks": {"temperature": {"value": 0.5}}}\nFor add: {"type": "agent", "name": "My Agent", "inputs": {"model": "gpt-4o"}}\nFor delete: {} (empty object)', - }, - }, - required: ['operation_type', 'block_id', 'params'], - }, - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to edit. If not provided, uses the current workflow in context.', - }, - }, - required: ['operations'], - }, - resultSchema: undefined, - }, - file: { - parameters: { - type: 'object', - }, - resultSchema: undefined, - }, - function_execute: { - parameters: { - type: 'object', - properties: { - code: { - type: 'string', - description: - 'Code to execute. For JS: raw statements auto-wrapped in async context. For Python: full script. For shell: bash script with access to pre-installed CLI tools and workspace env vars as $VAR_NAME.', - }, - inputFiles: { - type: 'array', - description: - 'Canonical workspace file IDs to mount in the sandbox. Discover IDs via read("files/{name}/meta.json") or glob("files/by-id/*/meta.json"). Mounted path: /home/user/files/{fileId}/{originalName}. Example: ["wf_123"]', - items: { - type: 'string', - }, - }, - inputTables: { - type: 'array', - description: - 'Table IDs to mount as CSV files in the sandbox. Each table appears at /home/user/tables/{tableId}.csv with a header row. Example: ["tbl_abc123"]', - items: { - type: 'string', - }, - }, - language: { - type: 'string', - description: 'Execution language.', - enum: ['javascript', 'python', 'shell'], - }, - outputFormat: { - type: 'string', - description: - 'Format for outputPath. Determines how the code result is serialized. If omitted, inferred from outputPath file extension.', - enum: ['json', 'csv', 'txt', 'md', 'html'], - }, - outputMimeType: { - type: 'string', - description: - 'MIME type for outputSandboxPath export. Required for binary files: image/png, image/jpeg, application/pdf, etc. Omit for text files.', - }, - outputPath: { - type: 'string', - description: - 'Pipe output directly to a NEW workspace file instead of returning in context. ALWAYS use this instead of a separate workspace_file write call. Use a flat path like "files/result.json" — nested paths are not supported.', - }, - outputSandboxPath: { - type: 'string', - description: - 'Path to a file created inside the sandbox that should be exported to the workspace. Use together with outputPath.', - }, - outputTable: { - type: 'string', - description: - 'Table ID to overwrite with the code\'s return value. Code MUST return an array of objects where keys match column names. All existing rows are replaced. Example: "tbl_abc123"', - }, - }, - required: ['code'], - }, - resultSchema: undefined, - }, - generate_api_key: { - parameters: { - type: 'object', - properties: { - name: { - type: 'string', - description: - "A descriptive name for the API key (e.g., 'production-key', 'dev-testing').", - }, - workspaceId: { - type: 'string', - description: "Optional workspace ID. Defaults to user's default workspace.", - }, - }, - required: ['name'], - }, - resultSchema: undefined, - }, - generate_image: { - parameters: { - type: 'object', - properties: { - aspectRatio: { - type: 'string', - description: 'Aspect ratio for the generated image.', - enum: ['1:1', '16:9', '9:16', '4:3', '3:4'], - }, - fileName: { - type: 'string', - description: - 'Output file name. Defaults to "generated-image.png". Workspace files are flat, so pass a plain file name, not a nested path.', - }, - overwriteFileId: { - type: 'string', - description: - 'If provided, overwrites the existing workspace file with this ID instead of creating a new file. Use this when the user asks to update or redo a previously generated image. The file ID is returned by previous generate_image or generate_visualization calls (fileId field), or can be found via read("files/by-id/{fileId}/meta.json").', - }, - prompt: { - type: 'string', - description: - 'Detailed text description of the image to generate, or editing instructions when used with editFileId.', - }, - referenceFileIds: { - type: 'array', - description: - 'File IDs of workspace images to include as context for the generation. All images are sent alongside the prompt. Use for: editing a single image (1 file), compositing multiple images together (2+ files), style transfer, face swapping, etc. Order matters — list the primary/base image first.', - items: { - type: 'string', - }, - }, - }, - required: ['prompt'], - }, - resultSchema: undefined, - }, - generate_visualization: { - parameters: { - type: 'object', - properties: { - code: { - type: 'string', - description: - "Python code that generates a visualization using matplotlib. MUST call plt.savefig('/home/user/output.png', dpi=150, bbox_inches='tight') to produce output.", - }, - fileName: { - type: 'string', - description: - 'Output file name. Defaults to "chart.png". Workspace files are flat, so pass a plain file name, not a nested path.', - }, - inputFiles: { - type: 'array', - description: - 'Canonical workspace file IDs to mount in the sandbox. Discover IDs via read("files/{name}/meta.json") or glob("files/by-id/*/meta.json"). Mounted path: /home/user/files/{fileId}/{originalName}.', - items: { - type: 'string', - }, - }, - inputTables: { - type: 'array', - description: - "Table IDs to mount as CSV files in the sandbox. Each table appears at /home/user/tables/{tableId}.csv with a header row. Read with pandas: pd.read_csv('/home/user/tables/tbl_xxx.csv')", - items: { - type: 'string', - }, - }, - overwriteFileId: { - type: 'string', - description: - 'If provided, overwrites the existing workspace file with this ID instead of creating a new file. Use this when the user asks to update or redo a previously generated chart. The file ID is returned by previous generate_visualization or generate_image calls (fileId field), or can be found via read("files/by-id/{fileId}/meta.json").', - }, - }, - required: ['code'], - }, - resultSchema: undefined, - }, - get_block_outputs: { - parameters: { - type: 'object', - properties: { - blockIds: { - type: 'array', - description: - 'Optional array of block UUIDs. If provided, returns outputs only for those blocks. If not provided, returns outputs for all blocks in the workflow.', - items: { - type: 'string', - }, - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - }, - resultSchema: undefined, - }, - get_block_upstream_references: { - parameters: { - type: 'object', - properties: { - blockIds: { - type: 'array', - description: - 'Required array of block UUIDs (minimum 1). Returns what each block can reference based on its position in the workflow graph.', - items: { - type: 'string', - }, - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - required: ['blockIds'], - }, - resultSchema: undefined, - }, - get_deployed_workflow_state: { - parameters: { - type: 'object', - properties: { - workflowId: { - type: 'string', - description: - 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - }, - resultSchema: undefined, - }, - get_deployment_version: { - parameters: { - type: 'object', - properties: { - version: { - type: 'number', - description: 'The deployment version number', - }, - workflowId: { - type: 'string', - description: 'The workflow ID', - }, - }, - required: ['workflowId', 'version'], - }, - resultSchema: undefined, - }, - get_execution_summary: { - parameters: { - type: 'object', - properties: { - limit: { - type: 'number', - description: 'Max number of executions to return (default: 10, max: 20).', - }, - status: { - type: 'string', - description: "Filter by status: 'success', 'error', or 'all' (default: 'all').", - enum: ['success', 'error', 'all'], - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID. If omitted, returns executions across all workflows in the workspace.', - }, - workspaceId: { - type: 'string', - description: 'Workspace ID to scope executions to.', - }, - }, - required: ['workspaceId'], - }, - resultSchema: undefined, - }, - get_job_logs: { - parameters: { - type: 'object', - properties: { - executionId: { - type: 'string', - description: 'Optional execution ID for a specific run.', - }, - includeDetails: { - type: 'boolean', - description: 'Include tool calls, outputs, and cost details.', - }, - jobId: { - type: 'string', - description: 'The job (schedule) ID to get logs for.', - }, - limit: { - type: 'number', - description: 'Max number of entries (default: 3, max: 5)', - }, - }, - required: ['jobId'], - }, - resultSchema: undefined, - }, - get_page_contents: { - parameters: { - type: 'object', - properties: { - include_highlights: { - type: 'boolean', - description: 'Include key highlights (default false)', - }, - include_summary: { - type: 'boolean', - description: 'Include AI-generated summary (default false)', - }, - include_text: { - type: 'boolean', - description: 'Include full page text (default true)', - }, - urls: { - type: 'array', - description: 'URLs to get content from (max 10)', - items: { - type: 'string', - }, - }, - }, - required: ['urls'], - }, - resultSchema: undefined, - }, - get_platform_actions: { - parameters: { - type: 'object', - properties: {}, - }, - resultSchema: undefined, - }, - get_workflow_data: { - parameters: { - type: 'object', - properties: { - data_type: { - type: 'string', - description: 'The type of workflow data to retrieve', - enum: ['global_variables', 'custom_tools', 'mcp_tools', 'files'], - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - required: ['data_type'], - }, - resultSchema: undefined, - }, - get_workflow_logs: { - parameters: { - type: 'object', - properties: { - executionId: { - type: 'string', - description: - 'Optional execution ID to get logs for a specific execution. Use with get_execution_summary to find execution IDs first.', - }, - includeDetails: { - type: 'boolean', - description: 'Include detailed info', - }, - limit: { - type: 'number', - description: 'Max number of entries (hard limit: 3)', - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID. If not provided, uses the current workflow in context.', - }, - }, - }, - resultSchema: undefined, - }, - glob: { - parameters: { - type: 'object', - properties: { - pattern: { - type: 'string', - description: - 'Glob pattern to match file paths. Supports * (any segment) and ** (any depth).', - }, - }, - required: ['pattern'], - }, - resultSchema: undefined, - }, - grep: { - parameters: { - type: 'object', - properties: { - context: { - type: 'number', - description: - "Number of lines to show before and after each match. Only applies to output_mode 'content'.", - }, - ignoreCase: { - type: 'boolean', - description: 'Case insensitive search (default false).', - }, - lineNumbers: { - type: 'boolean', - description: - "Include line numbers in output (default true). Only applies to output_mode 'content'.", - }, - maxResults: { - type: 'number', - description: 'Maximum number of matches to return (default 50).', - }, - output_mode: { - type: 'string', - description: - "Output mode: 'content' shows matching lines (default), 'files_with_matches' shows only file paths, 'count' shows match counts per file.", - enum: ['content', 'files_with_matches', 'count'], - }, - path: { - type: 'string', - description: - "Optional path prefix to scope the search (e.g. 'workflows/', 'environment/', 'internal/', 'components/blocks/').", - }, - pattern: { - type: 'string', - description: 'Regex pattern to search for in file contents.', - }, - }, - required: ['pattern'], - }, - resultSchema: undefined, - }, - job: { - parameters: { - properties: { - request: { - description: 'What job action is needed.', - type: 'string', - }, - }, - required: ['request'], - type: 'object', - }, - resultSchema: undefined, - }, - knowledge: { - parameters: { - properties: { - request: { - description: 'What knowledge base action is needed.', - type: 'string', - }, - }, - required: ['request'], - type: 'object', - }, - resultSchema: undefined, - }, - knowledge_base: { - parameters: { - type: 'object', - properties: { - args: { - type: 'object', - description: 'Arguments for the operation', - properties: { - apiKey: { - type: 'string', - description: - 'API key for API-key-based connectors (required when connector auth mode is apiKey)', - }, - chunkingConfig: { - type: 'object', - description: "Chunking configuration (optional for 'create')", - properties: { - maxSize: { - type: 'number', - description: 'Maximum chunk size (100-4000, default: 1024)', - default: 1024, - }, - minSize: { - type: 'number', - description: 'Minimum chunk size (1-2000, default: 1)', - default: 1, - }, - overlap: { - type: 'number', - description: 'Overlap between chunks (0-500, default: 200)', - default: 200, - }, - }, - }, - connectorId: { - type: 'string', - description: - 'Connector ID (required for update_connector, delete_connector, sync_connector)', - }, - connectorStatus: { - type: 'string', - description: 'Connector status (optional for update_connector)', - enum: ['active', 'paused'], - }, - connectorType: { - type: 'string', - description: - "Connector type from registry, e.g. 'confluence', 'google_drive', 'notion' (required for add_connector). Read knowledgebases/connectors/{type}.json for the config schema.", - }, - credentialId: { - type: 'string', - description: - 'OAuth credential ID from environment/credentials.json (required for OAuth connectors)', - }, - description: { - type: 'string', - description: "Description of the knowledge base (optional for 'create')", - }, - disabledTagIds: { - type: 'array', - description: - 'Tag definition IDs to opt out of (optional for add_connector). See tagDefinitions in the connector schema.', - }, - documentId: { - type: 'string', - description: 'Document ID (required for delete_document, update_document)', - }, - enabled: { - type: 'boolean', - description: 'Enable/disable a document (optional for update_document)', - }, - fileId: { - type: 'string', - description: - 'Canonical workspace file ID to add as a document (preferred for add_file). Discover via read("files/{name}/meta.json") or glob("files/by-id/*/meta.json").', - }, - filePath: { - type: 'string', - description: 'Legacy workspace file reference for add_file. Prefer fileId.', - }, - filename: { - type: 'string', - description: 'New filename for a document (optional for update_document)', - }, - knowledgeBaseId: { - type: 'string', - description: - 'Knowledge base ID (required for get, query, add_file, list_tags, create_tag, get_tag_usage)', - }, - name: { - type: 'string', - description: "Name of the knowledge base (required for 'create')", - }, - query: { - type: 'string', - description: "Search query text (required for 'query')", - }, - sourceConfig: { - type: 'object', - description: - 'Connector-specific configuration matching the configFields in knowledgebases/connectors/{type}.json', - }, - syncIntervalMinutes: { - type: 'number', - description: - 'Sync interval in minutes: 60 (hourly), 360 (6h), 1440 (daily), 10080 (weekly), 0 (manual only). Default: 1440', - default: 1440, - }, - tagDefinitionId: { - type: 'string', - description: 'Tag definition ID (required for update_tag, delete_tag)', - }, - tagDisplayName: { - type: 'string', - description: - 'Display name for the tag (required for create_tag, optional for update_tag)', - }, - tagFieldType: { - type: 'string', - description: - 'Field type: text, number, date, boolean (optional for create_tag, defaults to text)', - enum: ['text', 'number', 'date', 'boolean'], - }, - topK: { - type: 'number', - description: 'Number of results to return (1-50, default: 5)', - default: 5, - }, - workspaceId: { - type: 'string', - description: "Workspace ID (required for 'create', optional filter for 'list')", - }, - }, - }, - operation: { - type: 'string', - description: 'The operation to perform', - enum: [ - 'create', - 'get', - 'query', - 'add_file', - 'update', - 'delete', - 'delete_document', - 'update_document', - 'list_tags', - 'create_tag', - 'update_tag', - 'delete_tag', - 'get_tag_usage', - 'add_connector', - 'update_connector', - 'delete_connector', - 'sync_connector', + "type": "object", + "properties": { + "action": { + "type": "string", + "description": "Whether to deploy or undeploy the API endpoint", + "enum": [ + "deploy", + "undeploy" ], + "default": "deploy" }, + "workflowId": { + "type": "string", + "description": "Workflow ID to deploy (required in workspace context)" + } + } + }, + resultSchema: undefined, + }, + ["deploy_chat"]: { + parameters: { + "type": "object", + "properties": { + "action": { + "type": "string", + "description": "Whether to deploy or undeploy the chat interface", + "enum": [ + "deploy", + "undeploy" + ], + "default": "deploy" + }, + "allowedEmails": { + "type": "array", + "description": "List of allowed emails/domains for email or SSO auth", + "items": { + "type": "string" + } + }, + "authType": { + "type": "string", + "description": "Authentication type: public, password, email, or sso", + "enum": [ + "public", + "password", + "email", + "sso" + ], + "default": "public" + }, + "description": { + "type": "string", + "description": "Optional description for the chat" + }, + "identifier": { + "type": "string", + "description": "URL slug for the chat (lowercase letters, numbers, hyphens only)" + }, + "outputConfigs": { + "type": "array", + "description": "Output configurations specifying which block outputs to display in chat", + "items": { + "type": "object", + "properties": { + "blockId": { + "type": "string", + "description": "The block UUID" + }, + "path": { + "type": "string", + "description": "The output path (e.g. 'response', 'response.content')" + } + }, + "required": [ + "blockId", + "path" + ] + } + }, + "password": { + "type": "string", + "description": "Password for password-protected chats" + }, + "title": { + "type": "string", + "description": "Display title for the chat interface" + }, + "welcomeMessage": { + "type": "string", + "description": "Welcome message shown to users" + }, + "workflowId": { + "type": "string", + "description": "Workflow ID to deploy (required in workspace context)" + } + } + }, + resultSchema: undefined, + }, + ["deploy_mcp"]: { + parameters: { + "type": "object", + "properties": { + "parameterDescriptions": { + "type": "array", + "description": "Array of parameter descriptions for the tool", + "items": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Parameter description" + }, + "name": { + "type": "string", + "description": "Parameter name" + } + }, + "required": [ + "name", + "description" + ] + } + }, + "serverId": { + "type": "string", + "description": "Required: server ID from list_workspace_mcp_servers" + }, + "toolDescription": { + "type": "string", + "description": "Description for the MCP tool" + }, + "toolName": { + "type": "string", + "description": "Name for the MCP tool (defaults to workflow name)" + }, + "workflowId": { + "type": "string", + "description": "Workflow ID (defaults to active workflow)" + } }, - required: ['operation', 'args'], + "required": [ + "serverId" + ] + }, + resultSchema: undefined, + }, + ["download_to_workspace_file"]: { + parameters: { + "type": "object", + "properties": { + "fileName": { + "type": "string", + "description": "Optional workspace file name to save as. If omitted, the name is inferred from the response or URL." + }, + "url": { + "type": "string", + "description": "Direct URL of the file to download, such as an image CDN URL ending in .png or .jpg" + } + }, + "required": [ + "url" + ] + }, + resultSchema: undefined, + }, + ["edit_workflow"]: { + parameters: { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of edit operations", + "items": { + "type": "object", + "properties": { + "block_id": { + "type": "string", + "description": "Block ID for the operation. For add operations, this will be the desired ID for the new block." + }, + "operation_type": { + "type": "string", + "description": "Type of operation to perform", + "enum": [ + "add", + "edit", + "delete", + "insert_into_subflow", + "extract_from_subflow" + ] + }, + "params": { + "type": "object", + "description": "Parameters for the operation. \nFor edit: {\"inputs\": {\"temperature\": 0.5}} NOT {\"subBlocks\": {\"temperature\": {\"value\": 0.5}}}\nFor add: {\"type\": \"agent\", \"name\": \"My Agent\", \"inputs\": {\"model\": \"gpt-4o\"}}\nFor delete: {} (empty object)" + } + }, + "required": [ + "operation_type", + "block_id", + "params" + ] + } + }, + "workflowId": { + "type": "string", + "description": "Optional workflow ID to edit. If not provided, uses the current workflow in context." + } + }, + "required": [ + "operations" + ] + }, + resultSchema: undefined, + }, + ["file"]: { + parameters: { + "type": "object" + }, + resultSchema: undefined, + }, + ["function_execute"]: { + parameters: { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code to execute. For JS: raw statements auto-wrapped in async context. For Python: full script. For shell: bash script with access to pre-installed CLI tools and workspace env vars as $VAR_NAME." + }, + "inputFiles": { + "type": "array", + "description": "Canonical workspace file IDs to mount in the sandbox. Discover IDs via read(\"files/{name}/meta.json\") or glob(\"files/by-id/*/meta.json\"). Mounted path: /home/user/files/{fileId}/{originalName}. Example: [\"wf_123\"]", + "items": { + "type": "string" + } + }, + "inputTables": { + "type": "array", + "description": "Table IDs to mount as CSV files in the sandbox. Each table appears at /home/user/tables/{tableId}.csv with a header row. Example: [\"tbl_abc123\"]", + "items": { + "type": "string" + } + }, + "language": { + "type": "string", + "description": "Execution language.", + "enum": [ + "javascript", + "python", + "shell" + ] + }, + "outputFormat": { + "type": "string", + "description": "Format for outputPath. Determines how the code result is serialized. If omitted, inferred from outputPath file extension.", + "enum": [ + "json", + "csv", + "txt", + "md", + "html" + ] + }, + "outputMimeType": { + "type": "string", + "description": "MIME type for outputSandboxPath export. Required for binary files: image/png, image/jpeg, application/pdf, etc. Omit for text files." + }, + "outputPath": { + "type": "string", + "description": "Pipe output directly to a NEW workspace file instead of returning in context. ALWAYS use this instead of a separate workspace_file write call. Use a flat path like \"files/result.json\" — nested paths are not supported." + }, + "outputSandboxPath": { + "type": "string", + "description": "Path to a file created inside the sandbox that should be exported to the workspace. Use together with outputPath." + }, + "outputTable": { + "type": "string", + "description": "Table ID to overwrite with the code's return value. Code MUST return an array of objects where keys match column names. All existing rows are replaced. Example: \"tbl_abc123\"" + } + }, + "required": [ + "code" + ] + }, + resultSchema: undefined, + }, + ["generate_api_key"]: { + parameters: { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A descriptive name for the API key (e.g., 'production-key', 'dev-testing')." + }, + "workspaceId": { + "type": "string", + "description": "Optional workspace ID. Defaults to user's default workspace." + } + }, + "required": [ + "name" + ] + }, + resultSchema: undefined, + }, + ["generate_image"]: { + parameters: { + "type": "object", + "properties": { + "aspectRatio": { + "type": "string", + "description": "Aspect ratio for the generated image.", + "enum": [ + "1:1", + "16:9", + "9:16", + "4:3", + "3:4" + ] + }, + "fileName": { + "type": "string", + "description": "Output file name. Defaults to \"generated-image.png\". Workspace files are flat, so pass a plain file name, not a nested path." + }, + "overwriteFileId": { + "type": "string", + "description": "If provided, overwrites the existing workspace file with this ID instead of creating a new file. Use this when the user asks to update or redo a previously generated image. The file ID is returned by previous generate_image or generate_visualization calls (fileId field), or can be found via read(\"files/by-id/{fileId}/meta.json\")." + }, + "prompt": { + "type": "string", + "description": "Detailed text description of the image to generate, or editing instructions when used with editFileId." + }, + "referenceFileIds": { + "type": "array", + "description": "File IDs of workspace images to include as context for the generation. All images are sent alongside the prompt. Use for: editing a single image (1 file), compositing multiple images together (2+ files), style transfer, face swapping, etc. Order matters — list the primary/base image first.", + "items": { + "type": "string" + } + } + }, + "required": [ + "prompt" + ] + }, + resultSchema: undefined, + }, + ["generate_visualization"]: { + parameters: { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Python code that generates a visualization using matplotlib. MUST call plt.savefig('/home/user/output.png', dpi=150, bbox_inches='tight') to produce output." + }, + "fileName": { + "type": "string", + "description": "Output file name. Defaults to \"chart.png\". Workspace files are flat, so pass a plain file name, not a nested path." + }, + "inputFiles": { + "type": "array", + "description": "Canonical workspace file IDs to mount in the sandbox. Discover IDs via read(\"files/{name}/meta.json\") or glob(\"files/by-id/*/meta.json\"). Mounted path: /home/user/files/{fileId}/{originalName}.", + "items": { + "type": "string" + } + }, + "inputTables": { + "type": "array", + "description": "Table IDs to mount as CSV files in the sandbox. Each table appears at /home/user/tables/{tableId}.csv with a header row. Read with pandas: pd.read_csv('/home/user/tables/tbl_xxx.csv')", + "items": { + "type": "string" + } + }, + "overwriteFileId": { + "type": "string", + "description": "If provided, overwrites the existing workspace file with this ID instead of creating a new file. Use this when the user asks to update or redo a previously generated chart. The file ID is returned by previous generate_visualization or generate_image calls (fileId field), or can be found via read(\"files/by-id/{fileId}/meta.json\")." + } + }, + "required": [ + "code" + ] + }, + resultSchema: undefined, + }, + ["get_block_outputs"]: { + parameters: { + "type": "object", + "properties": { + "blockIds": { + "type": "array", + "description": "Optional array of block UUIDs. If provided, returns outputs only for those blocks. If not provided, returns outputs for all blocks in the workflow.", + "items": { + "type": "string" + } + }, + "workflowId": { + "type": "string", + "description": "Optional workflow ID. If not provided, uses the current workflow in context." + } + } + }, + resultSchema: undefined, + }, + ["get_block_upstream_references"]: { + parameters: { + "type": "object", + "properties": { + "blockIds": { + "type": "array", + "description": "Required array of block UUIDs (minimum 1). Returns what each block can reference based on its position in the workflow graph.", + "items": { + "type": "string" + } + }, + "workflowId": { + "type": "string", + "description": "Optional workflow ID. If not provided, uses the current workflow in context." + } + }, + "required": [ + "blockIds" + ] + }, + resultSchema: undefined, + }, + ["get_deployed_workflow_state"]: { + parameters: { + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Optional workflow ID. If not provided, uses the current workflow in context." + } + } + }, + resultSchema: undefined, + }, + ["get_deployment_version"]: { + parameters: { + "type": "object", + "properties": { + "version": { + "type": "number", + "description": "The deployment version number" + }, + "workflowId": { + "type": "string", + "description": "The workflow ID" + } + }, + "required": [ + "workflowId", + "version" + ] + }, + resultSchema: undefined, + }, + ["get_execution_summary"]: { + parameters: { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Max number of executions to return (default: 10, max: 20)." + }, + "status": { + "type": "string", + "description": "Filter by status: 'success', 'error', or 'all' (default: 'all').", + "enum": [ + "success", + "error", + "all" + ] + }, + "workflowId": { + "type": "string", + "description": "Optional workflow ID. If omitted, returns executions across all workflows in the workspace." + }, + "workspaceId": { + "type": "string", + "description": "Workspace ID to scope executions to." + } + }, + "required": [ + "workspaceId" + ] + }, + resultSchema: undefined, + }, + ["get_job_logs"]: { + parameters: { + "type": "object", + "properties": { + "executionId": { + "type": "string", + "description": "Optional execution ID for a specific run." + }, + "includeDetails": { + "type": "boolean", + "description": "Include tool calls, outputs, and cost details." + }, + "jobId": { + "type": "string", + "description": "The job (schedule) ID to get logs for." + }, + "limit": { + "type": "number", + "description": "Max number of entries (default: 3, max: 5)" + } + }, + "required": [ + "jobId" + ] + }, + resultSchema: undefined, + }, + ["get_page_contents"]: { + parameters: { + "type": "object", + "properties": { + "include_highlights": { + "type": "boolean", + "description": "Include key highlights (default false)" + }, + "include_summary": { + "type": "boolean", + "description": "Include AI-generated summary (default false)" + }, + "include_text": { + "type": "boolean", + "description": "Include full page text (default true)" + }, + "urls": { + "type": "array", + "description": "URLs to get content from (max 10)", + "items": { + "type": "string" + } + } + }, + "required": [ + "urls" + ] + }, + resultSchema: undefined, + }, + ["get_platform_actions"]: { + parameters: { + "type": "object", + "properties": {} + }, + resultSchema: undefined, + }, + ["get_workflow_data"]: { + parameters: { + "type": "object", + "properties": { + "data_type": { + "type": "string", + "description": "The type of workflow data to retrieve", + "enum": [ + "global_variables", + "custom_tools", + "mcp_tools", + "files" + ] + }, + "workflowId": { + "type": "string", + "description": "Optional workflow ID. If not provided, uses the current workflow in context." + } + }, + "required": [ + "data_type" + ] + }, + resultSchema: undefined, + }, + ["get_workflow_logs"]: { + parameters: { + "type": "object", + "properties": { + "executionId": { + "type": "string", + "description": "Optional execution ID to get logs for a specific execution. Use with get_execution_summary to find execution IDs first." + }, + "includeDetails": { + "type": "boolean", + "description": "Include detailed info" + }, + "limit": { + "type": "number", + "description": "Max number of entries (hard limit: 3)" + }, + "workflowId": { + "type": "string", + "description": "Optional workflow ID. If not provided, uses the current workflow in context." + } + } + }, + resultSchema: undefined, + }, + ["glob"]: { + parameters: { + "type": "object", + "properties": { + "pattern": { + "type": "string", + "description": "Glob pattern to match file paths. Supports * (any segment) and ** (any depth)." + }, + "title": { + "type": "string", + "description": "Short human-readable label shown in the UI while this search runs (e.g. 'Finding workflow configs', 'Listing knowledge bases')." + } + }, + "required": [ + "pattern" + ] + }, + resultSchema: undefined, + }, + ["grep"]: { + parameters: { + "type": "object", + "properties": { + "context": { + "type": "number", + "description": "Number of lines to show before and after each match. Only applies to output_mode 'content'." + }, + "ignoreCase": { + "type": "boolean", + "description": "Case insensitive search (default false)." + }, + "lineNumbers": { + "type": "boolean", + "description": "Include line numbers in output (default true). Only applies to output_mode 'content'." + }, + "maxResults": { + "type": "number", + "description": "Maximum number of matches to return (default 50)." + }, + "output_mode": { + "type": "string", + "description": "Output mode: 'content' shows matching lines (default), 'files_with_matches' shows only file paths, 'count' shows match counts per file.", + "enum": [ + "content", + "files_with_matches", + "count" + ] + }, + "path": { + "type": "string", + "description": "Optional path prefix to scope the search (e.g. 'workflows/', 'environment/', 'internal/', 'components/blocks/')." + }, + "pattern": { + "type": "string", + "description": "Regex pattern to search for in file contents." + }, + "title": { + "type": "string", + "description": "Short human-readable label shown in the UI while this search runs (e.g. 'Searching Slack integrations', 'Finding deployed workflows')." + } + }, + "required": [ + "pattern" + ] + }, + resultSchema: undefined, + }, + ["job"]: { + parameters: { + "properties": { + "request": { + "description": "What job action is needed.", + "type": "string" + } + }, + "required": [ + "request" + ], + "type": "object" + }, + resultSchema: undefined, + }, + ["knowledge"]: { + parameters: { + "properties": { + "request": { + "description": "What knowledge base action is needed.", + "type": "string" + } + }, + "required": [ + "request" + ], + "type": "object" + }, + resultSchema: undefined, + }, + ["knowledge_base"]: { + parameters: { + "type": "object", + "properties": { + "args": { + "type": "object", + "description": "Arguments for the operation", + "properties": { + "apiKey": { + "type": "string", + "description": "API key for API-key-based connectors (required when connector auth mode is apiKey)" + }, + "chunkingConfig": { + "type": "object", + "description": "Chunking configuration (optional for 'create')", + "properties": { + "maxSize": { + "type": "number", + "description": "Maximum chunk size (100-4000, default: 1024)", + "default": 1024 + }, + "minSize": { + "type": "number", + "description": "Minimum chunk size (1-2000, default: 1)", + "default": 1 + }, + "overlap": { + "type": "number", + "description": "Overlap between chunks (0-500, default: 200)", + "default": 200 + } + } + }, + "connectorId": { + "type": "string", + "description": "Connector ID (required for update_connector, delete_connector, sync_connector)" + }, + "connectorStatus": { + "type": "string", + "description": "Connector status (optional for update_connector)", + "enum": [ + "active", + "paused" + ] + }, + "connectorType": { + "type": "string", + "description": "Connector type from registry, e.g. 'confluence', 'google_drive', 'notion' (required for add_connector). Read knowledgebases/connectors/{type}.json for the config schema." + }, + "credentialId": { + "type": "string", + "description": "OAuth credential ID from environment/credentials.json (required for OAuth connectors)" + }, + "description": { + "type": "string", + "description": "Description of the knowledge base (optional for 'create')" + }, + "disabledTagIds": { + "type": "array", + "description": "Tag definition IDs to opt out of (optional for add_connector). See tagDefinitions in the connector schema." + }, + "documentId": { + "type": "string", + "description": "Document ID (required for delete_document, update_document)" + }, + "enabled": { + "type": "boolean", + "description": "Enable/disable a document (optional for update_document)" + }, + "fileId": { + "type": "string", + "description": "Canonical workspace file ID to add as a document (preferred for add_file). Discover via read(\"files/{name}/meta.json\") or glob(\"files/by-id/*/meta.json\")." + }, + "filePath": { + "type": "string", + "description": "Legacy workspace file reference for add_file. Prefer fileId." + }, + "filename": { + "type": "string", + "description": "New filename for a document (optional for update_document)" + }, + "knowledgeBaseId": { + "type": "string", + "description": "Knowledge base ID (required for get, query, add_file, list_tags, create_tag, get_tag_usage)" + }, + "name": { + "type": "string", + "description": "Name of the knowledge base (required for 'create')" + }, + "query": { + "type": "string", + "description": "Search query text (required for 'query')" + }, + "sourceConfig": { + "type": "object", + "description": "Connector-specific configuration matching the configFields in knowledgebases/connectors/{type}.json" + }, + "syncIntervalMinutes": { + "type": "number", + "description": "Sync interval in minutes: 60 (hourly), 360 (6h), 1440 (daily), 10080 (weekly), 0 (manual only). Default: 1440", + "default": 1440 + }, + "tagDefinitionId": { + "type": "string", + "description": "Tag definition ID (required for update_tag, delete_tag)" + }, + "tagDisplayName": { + "type": "string", + "description": "Display name for the tag (required for create_tag, optional for update_tag)" + }, + "tagFieldType": { + "type": "string", + "description": "Field type: text, number, date, boolean (optional for create_tag, defaults to text)", + "enum": [ + "text", + "number", + "date", + "boolean" + ] + }, + "topK": { + "type": "number", + "description": "Number of results to return (1-50, default: 5)", + "default": 5 + }, + "workspaceId": { + "type": "string", + "description": "Workspace ID (required for 'create', optional filter for 'list')" + } + } + }, + "operation": { + "type": "string", + "description": "The operation to perform", + "enum": [ + "create", + "get", + "query", + "add_file", + "update", + "delete", + "delete_document", + "update_document", + "list_tags", + "create_tag", + "update_tag", + "delete_tag", + "get_tag_usage", + "add_connector", + "update_connector", + "delete_connector", + "sync_connector" + ] + } + }, + "required": [ + "operation", + "args" + ] }, resultSchema: { - type: 'object', - properties: { - data: { - type: 'object', - description: 'Operation-specific result payload.', + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Operation-specific result payload." }, - message: { - type: 'string', - description: 'Human-readable outcome summary.', - }, - success: { - type: 'boolean', - description: 'Whether the operation succeeded.', + "message": { + "type": "string", + "description": "Human-readable outcome summary." }, + "success": { + "type": "boolean", + "description": "Whether the operation succeeded." + } }, - required: ['success', 'message'], + "required": [ + "success", + "message" + ] }, }, - list_folders: { + ["list_folders"]: { parameters: { - type: 'object', - properties: { - workspaceId: { - type: 'string', - description: 'Optional workspace ID to list folders for.', - }, - }, + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "Optional workspace ID to list folders for." + } + } }, resultSchema: undefined, }, - list_user_workspaces: { + ["list_user_workspaces"]: { parameters: { - type: 'object', - properties: {}, + "type": "object", + "properties": {} }, resultSchema: undefined, }, - list_workspace_mcp_servers: { + ["list_workspace_mcp_servers"]: { parameters: { - type: 'object', - properties: { - workspaceId: { - type: 'string', - description: 'Workspace ID (defaults to current workspace)', + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "Workspace ID (defaults to current workspace)" + } + } + }, + resultSchema: undefined, + }, + ["manage_credential"]: { + parameters: { + "type": "object", + "properties": { + "credentialId": { + "type": "string", + "description": "The credential ID (from environment/credentials.json)" }, + "displayName": { + "type": "string", + "description": "New display name (required for rename)" + }, + "operation": { + "type": "string", + "description": "The operation to perform", + "enum": [ + "rename", + "delete" + ] + } }, + "required": [ + "operation", + "credentialId" + ] }, resultSchema: undefined, }, - manage_credential: { + ["manage_custom_tool"]: { parameters: { - type: 'object', - properties: { - credentialId: { - type: 'string', - description: 'The credential ID (from environment/credentials.json)', + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The JavaScript code that executes when the tool is called (required for add). Parameters from schema are available as variables. Function body only - no signature or wrapping braces." }, - displayName: { - type: 'string', - description: 'New display name (required for rename)', + "operation": { + "type": "string", + "description": "The operation to perform: 'add', 'edit', 'list', or 'delete'", + "enum": [ + "add", + "edit", + "delete", + "list" + ] }, - operation: { - type: 'string', - description: 'The operation to perform', - enum: ['rename', 'delete'], - }, - }, - required: ['operation', 'credentialId'], - }, - resultSchema: undefined, - }, - manage_custom_tool: { - parameters: { - type: 'object', - properties: { - code: { - type: 'string', - description: - 'The JavaScript code that executes when the tool is called (required for add). Parameters from schema are available as variables. Function body only - no signature or wrapping braces.', - }, - operation: { - type: 'string', - description: "The operation to perform: 'add', 'edit', 'list', or 'delete'", - enum: ['add', 'edit', 'delete', 'list'], - }, - schema: { - type: 'object', - description: 'The tool schema in OpenAI function calling format (required for add).', - properties: { - function: { - type: 'object', - description: 'The function definition', - properties: { - description: { - type: 'string', - description: 'What the function does', + "schema": { + "type": "object", + "description": "The tool schema in OpenAI function calling format (required for add).", + "properties": { + "function": { + "type": "object", + "description": "The function definition", + "properties": { + "description": { + "type": "string", + "description": "What the function does" }, - name: { - type: 'string', - description: 'The function name (camelCase)', + "name": { + "type": "string", + "description": "The function name (camelCase)" }, - parameters: { - type: 'object', - description: 'The function parameters schema', - properties: { - properties: { - type: 'object', - description: 'Parameter definitions as key-value pairs', + "parameters": { + "type": "object", + "description": "The function parameters schema", + "properties": { + "properties": { + "type": "object", + "description": "Parameter definitions as key-value pairs" }, - required: { - type: 'array', - description: 'Array of required parameter names', - items: { - type: 'string', - }, - }, - type: { - type: 'string', - description: "Must be 'object'", + "required": { + "type": "array", + "description": "Array of required parameter names", + "items": { + "type": "string" + } }, + "type": { + "type": "string", + "description": "Must be 'object'" + } }, - required: ['type', 'properties'], - }, + "required": [ + "type", + "properties" + ] + } }, - required: ['name', 'parameters'], - }, - type: { - type: 'string', - description: "Must be 'function'", + "required": [ + "name", + "parameters" + ] }, + "type": { + "type": "string", + "description": "Must be 'function'" + } }, - required: ['type', 'function'], - }, - toolId: { - type: 'string', - description: - "The ID of the custom tool (required for edit/delete). Must be the exact toolId from the get_workflow_data custom tool response - do not guess or construct it. DO NOT PROVIDE THE TOOL ID IF THE OPERATION IS 'ADD'.", + "required": [ + "type", + "function" + ] }, + "toolId": { + "type": "string", + "description": "The ID of the custom tool (required for edit/delete). Must be the exact toolId from the get_workflow_data custom tool response - do not guess or construct it. DO NOT PROVIDE THE TOOL ID IF THE OPERATION IS 'ADD'." + } }, - required: ['operation'], + "required": [ + "operation" + ] }, resultSchema: undefined, }, - manage_job: { + ["manage_job"]: { parameters: { - type: 'object', - properties: { - args: { - type: 'object', - description: - 'Operation-specific arguments. For create: {title, prompt, cron?, time?, timezone?, lifecycle?, successCondition?, maxRuns?}. For get/delete: {jobId}. For update: {jobId, title?, prompt?, cron?, timezone?, status?, lifecycle?, successCondition?, maxRuns?}. For list: no args needed.', - properties: { - cron: { - type: 'string', - description: 'Cron expression for recurring jobs', + "type": "object", + "properties": { + "args": { + "type": "object", + "description": "Operation-specific arguments. For create: {title, prompt, cron?, time?, timezone?, lifecycle?, successCondition?, maxRuns?}. For get/delete: {jobId}. For update: {jobId, title?, prompt?, cron?, timezone?, status?, lifecycle?, successCondition?, maxRuns?}. For list: no args needed.", + "properties": { + "cron": { + "type": "string", + "description": "Cron expression for recurring jobs" }, - jobId: { - type: 'string', - description: 'Job ID (required for get, update, delete)', + "jobId": { + "type": "string", + "description": "Job ID (required for get, update, delete)" }, - lifecycle: { - type: 'string', - description: - "'persistent' (default) or 'until_complete'. Until_complete jobs stop when complete_job is called.", + "lifecycle": { + "type": "string", + "description": "'persistent' (default) or 'until_complete'. Until_complete jobs stop when complete_job is called." }, - maxRuns: { - type: 'integer', - description: 'Max executions before auto-completing. Safety limit.', + "maxRuns": { + "type": "integer", + "description": "Max executions before auto-completing. Safety limit." }, - prompt: { - type: 'string', - description: 'The prompt to execute when the job fires', + "prompt": { + "type": "string", + "description": "The prompt to execute when the job fires" }, - status: { - type: 'string', - description: 'Job status: active, paused', + "status": { + "type": "string", + "description": "Job status: active, paused" }, - successCondition: { - type: 'string', - description: - 'What must happen for the job to be considered complete (until_complete lifecycle).', + "successCondition": { + "type": "string", + "description": "What must happen for the job to be considered complete (until_complete lifecycle)." }, - time: { - type: 'string', - description: 'ISO 8601 datetime for one-time jobs or cron start time', + "time": { + "type": "string", + "description": "ISO 8601 datetime for one-time jobs or cron start time" }, - timezone: { - type: 'string', - description: 'IANA timezone (e.g. America/New_York). Defaults to UTC.', + "timezone": { + "type": "string", + "description": "IANA timezone (e.g. America/New_York). Defaults to UTC." }, - title: { - type: 'string', - description: "Short descriptive title for the job (e.g. 'Email Poller')", - }, - }, - }, - operation: { - type: 'string', - description: 'The operation to perform: create, list, get, update, delete', - enum: ['create', 'list', 'get', 'update', 'delete'], + "title": { + "type": "string", + "description": "Short descriptive title for the job (e.g. 'Email Poller')" + } + } }, + "operation": { + "type": "string", + "description": "The operation to perform: create, list, get, update, delete", + "enum": [ + "create", + "list", + "get", + "update", + "delete" + ] + } }, - required: ['operation'], + "required": [ + "operation" + ] }, resultSchema: undefined, }, - manage_mcp_tool: { + ["manage_mcp_tool"]: { parameters: { - type: 'object', - properties: { - config: { - type: 'object', - description: 'Required for add and edit. The MCP server configuration.', - properties: { - enabled: { - type: 'boolean', - description: 'Whether the server is enabled (default: true)', + "type": "object", + "properties": { + "config": { + "type": "object", + "description": "Required for add and edit. The MCP server configuration.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the server is enabled (default: true)" }, - headers: { - type: 'object', - description: 'Optional HTTP headers to send with requests (key-value pairs)', + "headers": { + "type": "object", + "description": "Optional HTTP headers to send with requests (key-value pairs)" }, - name: { - type: 'string', - description: 'Display name for the MCP server', + "name": { + "type": "string", + "description": "Display name for the MCP server" }, - timeout: { - type: 'number', - description: 'Request timeout in milliseconds (default: 30000)', + "timeout": { + "type": "number", + "description": "Request timeout in milliseconds (default: 30000)" }, - transport: { - type: 'string', - description: "Transport protocol: 'streamable-http' or 'sse'", - enum: ['streamable-http', 'sse'], - default: 'streamable-http', + "transport": { + "type": "string", + "description": "Transport protocol: 'streamable-http' or 'sse'", + "enum": [ + "streamable-http", + "sse" + ], + "default": "streamable-http" }, - url: { - type: 'string', - description: 'The MCP server endpoint URL (required for add)', - }, - }, + "url": { + "type": "string", + "description": "The MCP server endpoint URL (required for add)" + } + } }, - operation: { - type: 'string', - description: "The operation to perform: 'add', 'edit', 'list', or 'delete'", - enum: ['add', 'edit', 'delete', 'list'], - }, - serverId: { - type: 'string', - description: - "Required for edit and delete. The database ID of the MCP server. DO NOT PROVIDE if operation is 'add' or 'list'.", + "operation": { + "type": "string", + "description": "The operation to perform: 'add', 'edit', 'list', or 'delete'", + "enum": [ + "add", + "edit", + "delete", + "list" + ] }, + "serverId": { + "type": "string", + "description": "Required for edit and delete. The database ID of the MCP server. DO NOT PROVIDE if operation is 'add' or 'list'." + } }, - required: ['operation'], + "required": [ + "operation" + ] }, resultSchema: undefined, }, - manage_skill: { + ["manage_skill"]: { parameters: { - type: 'object', - properties: { - content: { - type: 'string', - description: 'Markdown instructions for the skill. Required for add, optional for edit.', + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Markdown instructions for the skill. Required for add, optional for edit." }, - description: { - type: 'string', - description: 'Short description of the skill. Required for add, optional for edit.', + "description": { + "type": "string", + "description": "Short description of the skill. Required for add, optional for edit." }, - name: { - type: 'string', - description: - "Skill name in kebab-case (e.g. 'my-skill'). Required for add, optional for edit.", + "name": { + "type": "string", + "description": "Skill name in kebab-case (e.g. 'my-skill'). Required for add, optional for edit." }, - operation: { - type: 'string', - description: "The operation to perform: 'add', 'edit', 'list', or 'delete'", - enum: ['add', 'edit', 'delete', 'list'], - }, - skillId: { - type: 'string', - description: - "The ID of the skill (required for edit/delete). Must be the exact ID from the VFS or list. DO NOT PROVIDE if operation is 'add' or 'list'.", + "operation": { + "type": "string", + "description": "The operation to perform: 'add', 'edit', 'list', or 'delete'", + "enum": [ + "add", + "edit", + "delete", + "list" + ] }, + "skillId": { + "type": "string", + "description": "The ID of the skill (required for edit/delete). Must be the exact ID from the VFS or list. DO NOT PROVIDE if operation is 'add' or 'list'." + } }, - required: ['operation'], + "required": [ + "operation" + ] }, resultSchema: undefined, }, - materialize_file: { + ["materialize_file"]: { parameters: { - type: 'object', - properties: { - fileName: { - type: 'string', - description: 'The name of the uploaded file to materialize (e.g. "report.pdf")', + "type": "object", + "properties": { + "fileName": { + "type": "string", + "description": "The name of the uploaded file to materialize (e.g. \"report.pdf\")" }, - knowledgeBaseId: { - type: 'string', - description: - 'ID of an existing knowledge base to add the file to (only used with operation "knowledge_base"). If omitted, a new KB is created.', + "knowledgeBaseId": { + "type": "string", + "description": "ID of an existing knowledge base to add the file to (only used with operation \"knowledge_base\"). If omitted, a new KB is created." }, - operation: { - type: 'string', - description: - 'What to do with the file. "save" promotes it to files/. "import" imports a workflow JSON. "table" converts CSV/TSV/JSON to a table. "knowledge_base" saves and adds to a KB. Defaults to "save".', - enum: ['save', 'import', 'table', 'knowledge_base'], - default: 'save', - }, - tableName: { - type: 'string', - description: - 'Custom name for the table (only used with operation "table"). Defaults to the file name without extension.', + "operation": { + "type": "string", + "description": "What to do with the file. \"save\" promotes it to files/. \"import\" imports a workflow JSON. \"table\" converts CSV/TSV/JSON to a table. \"knowledge_base\" saves and adds to a KB. Defaults to \"save\".", + "enum": [ + "save", + "import", + "table", + "knowledge_base" + ], + "default": "save" }, + "tableName": { + "type": "string", + "description": "Custom name for the table (only used with operation \"table\"). Defaults to the file name without extension." + } }, - required: ['fileName'], + "required": [ + "fileName" + ] }, resultSchema: undefined, }, - move_folder: { + ["move_folder"]: { parameters: { - type: 'object', - properties: { - folderId: { - type: 'string', - description: 'The folder ID to move.', - }, - parentId: { - type: 'string', - description: - 'Target parent folder ID. Omit or pass empty string to move to workspace root.', + "type": "object", + "properties": { + "folderId": { + "type": "string", + "description": "The folder ID to move." }, + "parentId": { + "type": "string", + "description": "Target parent folder ID. Omit or pass empty string to move to workspace root." + } }, - required: ['folderId'], + "required": [ + "folderId" + ] }, resultSchema: undefined, }, - move_workflow: { + ["move_workflow"]: { parameters: { - type: 'object', - properties: { - folderId: { - type: 'string', - description: 'Target folder ID. Omit or pass empty string to move to workspace root.', - }, - workflowId: { - type: 'string', - description: 'The workflow ID to move.', + "type": "object", + "properties": { + "folderId": { + "type": "string", + "description": "Target folder ID. Omit or pass empty string to move to workspace root." }, + "workflowId": { + "type": "string", + "description": "The workflow ID to move." + } }, - required: ['workflowId'], + "required": [ + "workflowId" + ] }, resultSchema: undefined, }, - oauth_get_auth_link: { + ["oauth_get_auth_link"]: { parameters: { - type: 'object', - properties: { - providerName: { - type: 'string', - description: - "The name of the OAuth provider to connect (e.g., 'Slack', 'Gmail', 'Google Calendar', 'GitHub')", - }, + "type": "object", + "properties": { + "providerName": { + "type": "string", + "description": "The name of the OAuth provider to connect (e.g., 'Slack', 'Gmail', 'Google Calendar', 'GitHub')" + } }, - required: ['providerName'], + "required": [ + "providerName" + ] }, resultSchema: undefined, }, - oauth_request_access: { + ["oauth_request_access"]: { parameters: { - type: 'object', - properties: { - providerName: { - type: 'string', - description: - "The name of the OAuth provider to connect (e.g., 'Slack', 'Gmail', 'Google Calendar')", - }, + "type": "object", + "properties": { + "providerName": { + "type": "string", + "description": "The name of the OAuth provider to connect (e.g., 'Slack', 'Gmail', 'Google Calendar')" + } }, - required: ['providerName'], + "required": [ + "providerName" + ] }, resultSchema: undefined, }, - open_resource: { + ["open_resource"]: { parameters: { - type: 'object', - properties: { - id: { - type: 'string', - description: 'The resource ID to open.', - }, - type: { - type: 'string', - description: 'The resource type to open.', - enum: ['workflow', 'table', 'knowledgebase', 'file'], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The resource ID to open." }, + "type": { + "type": "string", + "description": "The resource type to open.", + "enum": [ + "workflow", + "table", + "knowledgebase", + "file" + ] + } }, - required: ['type', 'id'], + "required": [ + "type", + "id" + ] }, resultSchema: undefined, }, - read: { + ["read"]: { parameters: { - type: 'object', - properties: { - outputTable: { - type: 'string', - description: - 'Table ID to import the file contents into (CSV/JSON). All existing rows are replaced. Example: "tbl_abc123"', + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of lines to read." }, - path: { - type: 'string', - description: "Path to the file to read (e.g. 'workflows/My Workflow/state.json').", + "offset": { + "type": "number", + "description": "Line offset to start reading from (0-indexed)." }, + "outputTable": { + "type": "string", + "description": "Table ID to import the file contents into (CSV/JSON). All existing rows are replaced. Example: \"tbl_abc123\"" + }, + "path": { + "type": "string", + "description": "Path to the file to read (e.g. 'workflows/My Workflow/state.json')." + } }, - required: ['path'], + "required": [ + "path" + ] }, resultSchema: undefined, }, - redeploy: { + ["redeploy"]: { parameters: { - type: 'object', - properties: { - workflowId: { - type: 'string', - description: 'Workflow ID to redeploy (required in workspace context)', - }, - }, + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Workflow ID to redeploy (required in workspace context)" + } + } }, resultSchema: undefined, }, - rename_file: { + ["rename_file"]: { parameters: { - type: 'object', - properties: { - fileId: { - type: 'string', - description: 'Canonical workspace file ID of the file to rename.', - }, - newName: { - type: 'string', - description: - 'New filename including extension, e.g. "draft_v2.md". Must not contain slashes.', + "type": "object", + "properties": { + "fileId": { + "type": "string", + "description": "Canonical workspace file ID of the file to rename." }, + "newName": { + "type": "string", + "description": "New filename including extension, e.g. \"draft_v2.md\". Must not contain slashes." + } }, - required: ['fileId', 'newName'], + "required": [ + "fileId", + "newName" + ] }, resultSchema: { - type: 'object', - properties: { - data: { - type: 'object', - description: 'Contains id and the new name.', + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Contains id and the new name." }, - message: { - type: 'string', - description: 'Human-readable outcome.', - }, - success: { - type: 'boolean', - description: 'Whether the rename succeeded.', + "message": { + "type": "string", + "description": "Human-readable outcome." }, + "success": { + "type": "boolean", + "description": "Whether the rename succeeded." + } }, - required: ['success', 'message'], + "required": [ + "success", + "message" + ] }, }, - rename_workflow: { + ["rename_workflow"]: { parameters: { - type: 'object', - properties: { - name: { - type: 'string', - description: 'The new name for the workflow.', - }, - workflowId: { - type: 'string', - description: 'The workflow ID to rename.', + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The new name for the workflow." }, + "workflowId": { + "type": "string", + "description": "The workflow ID to rename." + } }, - required: ['workflowId', 'name'], + "required": [ + "workflowId", + "name" + ] }, resultSchema: undefined, }, - research: { + ["research"]: { parameters: { - properties: { - topic: { - description: 'The topic to research.', - type: 'string', - }, + "properties": { + "topic": { + "description": "The topic to research.", + "type": "string" + } }, - required: ['topic'], - type: 'object', + "required": [ + "topic" + ], + "type": "object" }, resultSchema: undefined, }, - respond: { + ["respond"]: { parameters: { - additionalProperties: true, - properties: { - output: { - description: - 'The result — facts, status, VFS paths to persisted data, whatever the caller needs to act on.', - type: 'string', + "additionalProperties": true, + "properties": { + "output": { + "description": "The result — facts, status, VFS paths to persisted data, whatever the caller needs to act on.", + "type": "string" }, - success: { - description: 'Whether the task completed successfully', - type: 'boolean', - }, - type: { - description: 'Optional logical result type override', - type: 'string', + "success": { + "description": "Whether the task completed successfully", + "type": "boolean" }, + "type": { + "description": "Optional logical result type override", + "type": "string" + } }, - required: ['output', 'success'], - type: 'object', + "required": [ + "output", + "success" + ], + "type": "object" }, resultSchema: undefined, }, - revert_to_version: { + ["revert_to_version"]: { parameters: { - type: 'object', - properties: { - version: { - type: 'number', - description: 'The deployment version number to revert to', - }, - workflowId: { - type: 'string', - description: 'The workflow ID', + "type": "object", + "properties": { + "version": { + "type": "number", + "description": "The deployment version number to revert to" }, + "workflowId": { + "type": "string", + "description": "The workflow ID" + } }, - required: ['workflowId', 'version'], + "required": [ + "workflowId", + "version" + ] }, resultSchema: undefined, }, - run: { + ["run"]: { parameters: { - properties: { - context: { - description: 'Pre-gathered context: workflow state, block IDs, input requirements.', - type: 'string', - }, - request: { - description: 'What to run or what logs to check.', - type: 'string', + "properties": { + "context": { + "description": "Pre-gathered context: workflow state, block IDs, input requirements.", + "type": "string" }, + "request": { + "description": "What to run or what logs to check.", + "type": "string" + } }, - required: ['request'], - type: 'object', + "required": [ + "request" + ], + "type": "object" }, resultSchema: undefined, }, - run_block: { + ["run_block"]: { parameters: { - type: 'object', - properties: { - blockId: { - type: 'string', - description: 'The block ID to run in isolation.', + "type": "object", + "properties": { + "blockId": { + "type": "string", + "description": "The block ID to run in isolation." }, - executionId: { - type: 'string', - description: - 'Optional execution ID to load the snapshot from. Uses latest execution if omitted.', + "executionId": { + "type": "string", + "description": "Optional execution ID to load the snapshot from. Uses latest execution if omitted." }, - useDeployedState: { - type: 'boolean', - description: - 'When true, runs the deployed version instead of the live draft. Default: false (draft).', + "useDeployedState": { + "type": "boolean", + "description": "When true, runs the deployed version instead of the live draft. Default: false (draft)." }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to run. If not provided, uses the current workflow in context.', - }, - workflow_input: { - type: 'object', - description: 'JSON object with key-value mappings where each key is an input field name', + "workflowId": { + "type": "string", + "description": "Optional workflow ID to run. If not provided, uses the current workflow in context." }, + "workflow_input": { + "type": "object", + "description": "JSON object with key-value mappings where each key is an input field name" + } }, - required: ['blockId'], + "required": [ + "blockId" + ] }, resultSchema: undefined, }, - run_from_block: { + ["run_from_block"]: { parameters: { - type: 'object', - properties: { - executionId: { - type: 'string', - description: - 'Optional execution ID to load the snapshot from. Uses latest execution if omitted.', + "type": "object", + "properties": { + "executionId": { + "type": "string", + "description": "Optional execution ID to load the snapshot from. Uses latest execution if omitted." }, - startBlockId: { - type: 'string', - description: 'The block ID to start execution from.', + "startBlockId": { + "type": "string", + "description": "The block ID to start execution from." }, - useDeployedState: { - type: 'boolean', - description: - 'When true, runs the deployed version instead of the live draft. Default: false (draft).', + "useDeployedState": { + "type": "boolean", + "description": "When true, runs the deployed version instead of the live draft. Default: false (draft)." }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to run. If not provided, uses the current workflow in context.', - }, - workflow_input: { - type: 'object', - description: 'JSON object with key-value mappings where each key is an input field name', + "workflowId": { + "type": "string", + "description": "Optional workflow ID to run. If not provided, uses the current workflow in context." }, + "workflow_input": { + "type": "object", + "description": "JSON object with key-value mappings where each key is an input field name" + } }, - required: ['startBlockId'], + "required": [ + "startBlockId" + ] }, resultSchema: undefined, }, - run_workflow: { + ["run_workflow"]: { parameters: { - type: 'object', - properties: { - useDeployedState: { - type: 'boolean', - description: - 'When true, runs the deployed version instead of the live draft. Default: false (draft).', + "type": "object", + "properties": { + "useDeployedState": { + "type": "boolean", + "description": "When true, runs the deployed version instead of the live draft. Default: false (draft)." }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to run. If not provided, uses the current workflow in context.', - }, - workflow_input: { - type: 'object', - description: 'JSON object with key-value mappings where each key is an input field name', + "workflowId": { + "type": "string", + "description": "Optional workflow ID to run. If not provided, uses the current workflow in context." }, + "workflow_input": { + "type": "object", + "description": "JSON object with key-value mappings where each key is an input field name" + } }, - required: ['workflow_input'], + "required": [ + "workflow_input" + ] }, resultSchema: undefined, }, - run_workflow_until_block: { + ["run_workflow_until_block"]: { parameters: { - type: 'object', - properties: { - stopAfterBlockId: { - type: 'string', - description: 'The block ID to stop after. Execution halts once this block completes.', + "type": "object", + "properties": { + "stopAfterBlockId": { + "type": "string", + "description": "The block ID to stop after. Execution halts once this block completes." }, - useDeployedState: { - type: 'boolean', - description: - 'When true, runs the deployed version instead of the live draft. Default: false (draft).', + "useDeployedState": { + "type": "boolean", + "description": "When true, runs the deployed version instead of the live draft. Default: false (draft)." }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID to run. If not provided, uses the current workflow in context.', - }, - workflow_input: { - type: 'object', - description: 'JSON object with key-value mappings where each key is an input field name', + "workflowId": { + "type": "string", + "description": "Optional workflow ID to run. If not provided, uses the current workflow in context." }, + "workflow_input": { + "type": "object", + "description": "JSON object with key-value mappings where each key is an input field name" + } }, - required: ['stopAfterBlockId'], + "required": [ + "stopAfterBlockId" + ] }, resultSchema: undefined, }, - scrape_page: { + ["scrape_page"]: { parameters: { - type: 'object', - properties: { - include_links: { - type: 'boolean', - description: 'Extract all links from the page (default false)', + "type": "object", + "properties": { + "include_links": { + "type": "boolean", + "description": "Extract all links from the page (default false)" }, - url: { - type: 'string', - description: 'The URL to scrape (must include https://)', - }, - wait_for: { - type: 'string', - description: 'CSS selector to wait for before scraping (for JS-heavy pages)', + "url": { + "type": "string", + "description": "The URL to scrape (must include https://)" }, + "wait_for": { + "type": "string", + "description": "CSS selector to wait for before scraping (for JS-heavy pages)" + } }, - required: ['url'], + "required": [ + "url" + ] }, resultSchema: undefined, }, - search_documentation: { + ["search_documentation"]: { parameters: { - type: 'object', - properties: { - query: { - type: 'string', - description: 'The search query', - }, - topK: { - type: 'number', - description: 'Number of results (max 10)', + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The search query" }, + "topK": { + "type": "number", + "description": "Number of results (max 10)" + } }, - required: ['query'], + "required": [ + "query" + ] }, resultSchema: undefined, }, - search_library_docs: { + ["search_library_docs"]: { parameters: { - type: 'object', - properties: { - library_name: { - type: 'string', - description: "Name of the library to search for (e.g., 'nextjs', 'stripe', 'langchain')", + "type": "object", + "properties": { + "library_name": { + "type": "string", + "description": "Name of the library to search for (e.g., 'nextjs', 'stripe', 'langchain')" }, - query: { - type: 'string', - description: 'The question or topic to find documentation for - be specific', - }, - version: { - type: 'string', - description: "Specific version (optional, e.g., '14', 'v2')", + "query": { + "type": "string", + "description": "The question or topic to find documentation for - be specific" }, + "version": { + "type": "string", + "description": "Specific version (optional, e.g., '14', 'v2')" + } }, - required: ['library_name', 'query'], + "required": [ + "library_name", + "query" + ] }, resultSchema: undefined, }, - search_online: { + ["search_online"]: { parameters: { - type: 'object', - properties: { - category: { - type: 'string', - description: 'Filter by category', - enum: [ - 'news', - 'tweet', - 'github', - 'paper', - 'company', - 'research paper', - 'linkedin profile', - 'pdf', - 'personal site', - ], + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Filter by category", + "enum": [ + "news", + "tweet", + "github", + "paper", + "company", + "research paper", + "linkedin profile", + "pdf", + "personal site" + ] }, - include_text: { - type: 'boolean', - description: 'Include page text content (default true)', + "include_text": { + "type": "boolean", + "description": "Include page text content (default true)" }, - num_results: { - type: 'number', - description: 'Number of results (default 10, max 25)', - }, - query: { - type: 'string', - description: 'Natural language search query', + "num_results": { + "type": "number", + "description": "Number of results (default 10, max 25)" }, + "query": { + "type": "string", + "description": "Natural language search query" + } }, - required: ['query'], + "required": [ + "query" + ] }, resultSchema: undefined, }, - search_patterns: { + ["search_patterns"]: { parameters: { - type: 'object', - properties: { - limit: { - type: 'integer', - description: 'Maximum number of unique pattern examples to return (defaults to 3).', - }, - queries: { - type: 'array', - description: - 'Up to 3 descriptive strings explaining the workflow pattern(s) you need. Focus on intent and desired outcomes.', - items: { - type: 'string', - description: 'Example: "how to automate wealthbox meeting notes into follow-up tasks"', - }, + "type": "object", + "properties": { + "limit": { + "type": "integer", + "description": "Maximum number of unique pattern examples to return (defaults to 3)." }, + "queries": { + "type": "array", + "description": "Up to 3 descriptive strings explaining the workflow pattern(s) you need. Focus on intent and desired outcomes.", + "items": { + "type": "string", + "description": "Example: \"how to automate wealthbox meeting notes into follow-up tasks\"" + } + } }, - required: ['queries'], + "required": [ + "queries" + ] }, resultSchema: undefined, }, - set_environment_variables: { + ["set_environment_variables"]: { parameters: { - type: 'object', - properties: { - variables: { - type: 'array', - description: 'List of env vars to set', - items: { - type: 'object', - properties: { - name: { - type: 'string', - description: 'Variable name', + "type": "object", + "properties": { + "variables": { + "type": "array", + "description": "List of env vars to set", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Variable name" }, - value: { - type: 'string', - description: 'Variable value', + "value": { + "type": "string", + "description": "Variable value" + } + }, + "required": [ + "name", + "value" + ] + } + } + }, + "required": [ + "variables" + ] + }, + resultSchema: undefined, + }, + ["set_global_workflow_variables"]: { + parameters: { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "List of operations to apply", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - }, - required: ['name', 'value'], - }, - }, - }, - required: ['variables'], - }, - resultSchema: undefined, - }, - set_global_workflow_variables: { - parameters: { - type: 'object', - properties: { - operations: { - type: 'array', - description: 'List of operations to apply', - items: { - type: 'object', - properties: { - name: { - type: 'string', + "operation": { + "type": "string", + "enum": [ + "add", + "delete", + "edit" + ] }, - operation: { - type: 'string', - enum: ['add', 'delete', 'edit'], - }, - type: { - type: 'string', - enum: ['plain', 'number', 'boolean', 'array', 'object'], - }, - value: { - type: 'string', + "type": { + "type": "string", + "enum": [ + "plain", + "number", + "boolean", + "array", + "object" + ] }, + "value": { + "type": "string" + } }, - required: ['operation', 'name', 'type', 'value'], - }, - }, - workflowId: { - type: 'string', - description: - 'Optional workflow ID. If not provided, uses the current workflow in context.', + "required": [ + "operation", + "name", + "type", + "value" + ] + } }, + "workflowId": { + "type": "string", + "description": "Optional workflow ID. If not provided, uses the current workflow in context." + } }, - required: ['operations'], + "required": [ + "operations" + ] }, resultSchema: undefined, }, - superagent: { + ["superagent"]: { parameters: { - properties: { - task: { - description: - "A single sentence — the agent has full conversation context. Do NOT pre-read credentials or look up configs. Example: 'send the email we discussed' or 'check my calendar for tomorrow'.", - type: 'string', - }, + "properties": { + "task": { + "description": "A single sentence — the agent has full conversation context. Do NOT pre-read credentials or look up configs. Example: 'send the email we discussed' or 'check my calendar for tomorrow'.", + "type": "string" + } }, - required: ['task'], - type: 'object', + "required": [ + "task" + ], + "type": "object" }, resultSchema: undefined, }, - table: { + ["table"]: { parameters: { - properties: { - request: { - description: 'What table action is needed.', - type: 'string', - }, + "properties": { + "request": { + "description": "What table action is needed.", + "type": "string" + } }, - required: ['request'], - type: 'object', + "required": [ + "request" + ], + "type": "object" }, resultSchema: undefined, }, - tool_search_tool_regex: { + ["tool_search_tool_regex"]: { parameters: { - properties: { - case_insensitive: { - description: 'Whether the regex should be case-insensitive (default true).', - type: 'boolean', + "properties": { + "case_insensitive": { + "description": "Whether the regex should be case-insensitive (default true).", + "type": "boolean" }, - max_results: { - description: 'Maximum number of tools to return (optional).', - type: 'integer', - }, - pattern: { - description: 'Regular expression to match tool names or descriptions.', - type: 'string', + "max_results": { + "description": "Maximum number of tools to return (optional).", + "type": "integer" }, + "pattern": { + "description": "Regular expression to match tool names or descriptions.", + "type": "string" + } }, - required: ['pattern'], - type: 'object', + "required": [ + "pattern" + ], + "type": "object" }, resultSchema: undefined, }, - update_job_history: { + ["update_job_history"]: { parameters: { - type: 'object', - properties: { - jobId: { - type: 'string', - description: 'The job ID.', - }, - summary: { - type: 'string', - description: - "A concise summary of what was done this run (e.g., 'Sent follow-up emails to 3 leads: Alice, Bob, Carol').", + "type": "object", + "properties": { + "jobId": { + "type": "string", + "description": "The job ID." }, + "summary": { + "type": "string", + "description": "A concise summary of what was done this run (e.g., 'Sent follow-up emails to 3 leads: Alice, Bob, Carol')." + } }, - required: ['jobId', 'summary'], + "required": [ + "jobId", + "summary" + ] }, resultSchema: undefined, }, - update_workspace_mcp_server: { + ["update_workspace_mcp_server"]: { parameters: { - type: 'object', - properties: { - description: { - type: 'string', - description: 'New description for the server', + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "New description for the server" }, - isPublic: { - type: 'boolean', - description: 'Whether the server is publicly accessible', + "isPublic": { + "type": "boolean", + "description": "Whether the server is publicly accessible" }, - name: { - type: 'string', - description: 'New name for the server', - }, - serverId: { - type: 'string', - description: 'Required: the MCP server ID to update', + "name": { + "type": "string", + "description": "New name for the server" }, + "serverId": { + "type": "string", + "description": "Required: the MCP server ID to update" + } }, - required: ['serverId'], + "required": [ + "serverId" + ] }, resultSchema: undefined, }, - user_memory: { + ["user_memory"]: { parameters: { - type: 'object', - properties: { - confidence: { - type: 'number', - description: 'Confidence level 0-1 (default 1.0 for explicit, 0.8 for inferred)', + "type": "object", + "properties": { + "confidence": { + "type": "number", + "description": "Confidence level 0-1 (default 1.0 for explicit, 0.8 for inferred)" }, - correct_value: { - type: 'string', - description: "The correct value to replace the wrong one (for 'correct' operation)", + "correct_value": { + "type": "string", + "description": "The correct value to replace the wrong one (for 'correct' operation)" }, - key: { - type: 'string', - description: "Unique key for the memory (e.g., 'preferred_model', 'slack_credential')", + "key": { + "type": "string", + "description": "Unique key for the memory (e.g., 'preferred_model', 'slack_credential')" }, - limit: { - type: 'number', - description: 'Number of results for search (default 10)', + "limit": { + "type": "number", + "description": "Number of results for search (default 10)" }, - memory_type: { - type: 'string', - description: "Type of memory: 'preference', 'entity', 'history', or 'correction'", - enum: ['preference', 'entity', 'history', 'correction'], + "memory_type": { + "type": "string", + "description": "Type of memory: 'preference', 'entity', 'history', or 'correction'", + "enum": [ + "preference", + "entity", + "history", + "correction" + ] }, - operation: { - type: 'string', - description: "Operation: 'add', 'search', 'delete', 'correct', or 'list'", - enum: ['add', 'search', 'delete', 'correct', 'list'], + "operation": { + "type": "string", + "description": "Operation: 'add', 'search', 'delete', 'correct', or 'list'", + "enum": [ + "add", + "search", + "delete", + "correct", + "list" + ] }, - query: { - type: 'string', - description: 'Search query to find relevant memories', + "query": { + "type": "string", + "description": "Search query to find relevant memories" }, - source: { - type: 'string', - description: "Source: 'explicit' (user told you) or 'inferred' (you observed)", - enum: ['explicit', 'inferred'], - }, - value: { - type: 'string', - description: 'Value to remember', + "source": { + "type": "string", + "description": "Source: 'explicit' (user told you) or 'inferred' (you observed)", + "enum": [ + "explicit", + "inferred" + ] }, + "value": { + "type": "string", + "description": "Value to remember" + } }, - required: ['operation'], + "required": [ + "operation" + ] }, resultSchema: undefined, }, - user_table: { + ["user_table"]: { parameters: { - type: 'object', - properties: { - args: { - type: 'object', - description: 'Arguments for the operation', - properties: { - column: { - type: 'object', - description: 'Column definition for add_column: { name, type, unique?, position? }', + "type": "object", + "properties": { + "args": { + "type": "object", + "description": "Arguments for the operation", + "properties": { + "column": { + "type": "object", + "description": "Column definition for add_column: { name, type, unique?, position? }" }, - columnName: { - type: 'string', - description: - 'Column name (required for rename_column, update_column; use columnNames array for batch delete_column)', + "columnName": { + "type": "string", + "description": "Column name (required for rename_column, update_column; use columnNames array for batch delete_column)" }, - columnNames: { - type: 'array', - description: - 'Array of column names to delete at once (for delete_column). Preferred over columnName when deleting multiple columns.', + "columnNames": { + "type": "array", + "description": "Array of column names to delete at once (for delete_column). Preferred over columnName when deleting multiple columns." }, - data: { - type: 'object', - description: 'Row data as key-value pairs (required for insert_row, update_row)', + "data": { + "type": "object", + "description": "Row data as key-value pairs (required for insert_row, update_row)" }, - description: { - type: 'string', - description: "Table description (optional for 'create')", + "description": { + "type": "string", + "description": "Table description (optional for 'create')" }, - fileId: { - type: 'string', - description: - 'Canonical workspace file ID for create_from_file/import_file. Discover via read("files/{name}/meta.json") or glob("files/by-id/*/meta.json").', + "fileId": { + "type": "string", + "description": "Canonical workspace file ID for create_from_file/import_file. Discover via read(\"files/{name}/meta.json\") or glob(\"files/by-id/*/meta.json\")." }, - filePath: { - type: 'string', - description: - 'Legacy workspace file reference for create_from_file/import_file. Prefer fileId.', + "filePath": { + "type": "string", + "description": "Legacy workspace file reference for create_from_file/import_file. Prefer fileId." }, - filter: { - type: 'object', - description: - 'MongoDB-style filter for query_rows, update_rows_by_filter, delete_rows_by_filter', + "filter": { + "type": "object", + "description": "MongoDB-style filter for query_rows, update_rows_by_filter, delete_rows_by_filter" }, - limit: { - type: 'number', - description: 'Maximum rows to return or affect (optional, default 100)', + "limit": { + "type": "number", + "description": "Maximum rows to return or affect (optional, default 100)" }, - name: { - type: 'string', - description: "Table name (required for 'create')", + "name": { + "type": "string", + "description": "Table name (required for 'create')" }, - newName: { - type: 'string', - description: 'New column name (required for rename_column)', + "newName": { + "type": "string", + "description": "New column name (required for rename_column)" }, - newType: { - type: 'string', - description: - 'New column type (optional for update_column). Types: string, number, boolean, date, json', + "newType": { + "type": "string", + "description": "New column type (optional for update_column). Types: string, number, boolean, date, json" }, - offset: { - type: 'number', - description: 'Number of rows to skip (optional for query_rows, default 0)', + "offset": { + "type": "number", + "description": "Number of rows to skip (optional for query_rows, default 0)" }, - outputFormat: { - type: 'string', - description: - 'Explicit format override for outputPath. Usually unnecessary — the file extension determines the format automatically. Only use this to force a different format than what the extension implies.', - enum: ['json', 'csv', 'txt', 'md', 'html'], + "outputFormat": { + "type": "string", + "description": "Explicit format override for outputPath. Usually unnecessary — the file extension determines the format automatically. Only use this to force a different format than what the extension implies.", + "enum": [ + "json", + "csv", + "txt", + "md", + "html" + ] }, - outputPath: { - type: 'string', - description: - 'Pipe query_rows results directly to a NEW workspace file. The format is auto-inferred from the file extension: .csv → CSV, .json → JSON, .md → Markdown, etc. Use .csv for tabular exports. Use a flat path like "files/export.csv" — nested paths are not supported.', + "outputPath": { + "type": "string", + "description": "Pipe query_rows results directly to a NEW workspace file. The format is auto-inferred from the file extension: .csv → CSV, .json → JSON, .md → Markdown, etc. Use .csv for tabular exports. Use a flat path like \"files/export.csv\" — nested paths are not supported." }, - rowId: { - type: 'string', - description: 'Row ID (required for get_row, update_row, delete_row)', + "rowId": { + "type": "string", + "description": "Row ID (required for get_row, update_row, delete_row)" }, - rowIds: { - type: 'array', - description: 'Array of row IDs to delete (for batch_delete_rows)', + "rowIds": { + "type": "array", + "description": "Array of row IDs to delete (for batch_delete_rows)" }, - rows: { - type: 'array', - description: 'Array of row data objects (required for batch_insert_rows)', + "rows": { + "type": "array", + "description": "Array of row data objects (required for batch_insert_rows)" }, - schema: { - type: 'object', - description: - "Table schema with columns array (required for 'create'). Each column: { name, type, unique? }", + "schema": { + "type": "object", + "description": "Table schema with columns array (required for 'create'). Each column: { name, type, unique? }" }, - sort: { - type: 'object', - description: - "Sort specification as { field: 'asc' | 'desc' } (optional for query_rows)", + "sort": { + "type": "object", + "description": "Sort specification as { field: 'asc' | 'desc' } (optional for query_rows)" }, - tableId: { - type: 'string', - description: "Table ID (required for most operations except 'create')", + "tableId": { + "type": "string", + "description": "Table ID (required for most operations except 'create')" }, - unique: { - type: 'boolean', - description: 'Set column unique constraint (optional for update_column)', + "unique": { + "type": "boolean", + "description": "Set column unique constraint (optional for update_column)" }, - updates: { - type: 'array', - description: - 'Array of per-row updates: [{ rowId, data: { col: val } }] (for batch_update_rows)', + "updates": { + "type": "array", + "description": "Array of per-row updates: [{ rowId, data: { col: val } }] (for batch_update_rows)" }, - values: { - type: 'object', - description: - 'Map of rowId to value for single-column batch update: { "rowId1": val1, "rowId2": val2 } (for batch_update_rows with columnName)', - }, - }, - }, - operation: { - type: 'string', - description: 'The operation to perform', - enum: [ - 'create', - 'create_from_file', - 'import_file', - 'get', - 'get_schema', - 'delete', - 'insert_row', - 'batch_insert_rows', - 'get_row', - 'query_rows', - 'update_row', - 'delete_row', - 'update_rows_by_filter', - 'delete_rows_by_filter', - 'batch_update_rows', - 'batch_delete_rows', - 'add_column', - 'rename_column', - 'delete_column', - 'update_column', - ], + "values": { + "type": "object", + "description": "Map of rowId to value for single-column batch update: { \"rowId1\": val1, \"rowId2\": val2 } (for batch_update_rows with columnName)" + } + } }, + "operation": { + "type": "string", + "description": "The operation to perform", + "enum": [ + "create", + "create_from_file", + "import_file", + "get", + "get_schema", + "delete", + "insert_row", + "batch_insert_rows", + "get_row", + "query_rows", + "update_row", + "delete_row", + "update_rows_by_filter", + "delete_rows_by_filter", + "batch_update_rows", + "batch_delete_rows", + "add_column", + "rename_column", + "delete_column", + "update_column" + ] + } }, - required: ['operation', 'args'], + "required": [ + "operation", + "args" + ] }, resultSchema: { - type: 'object', - properties: { - data: { - type: 'object', - description: 'Operation-specific result payload.', + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Operation-specific result payload." }, - message: { - type: 'string', - description: 'Human-readable outcome summary.', - }, - success: { - type: 'boolean', - description: 'Whether the operation succeeded.', + "message": { + "type": "string", + "description": "Human-readable outcome summary." }, + "success": { + "type": "boolean", + "description": "Whether the operation succeeded." + } }, - required: ['success', 'message'], + "required": [ + "success", + "message" + ] }, }, - workflow: { + ["workflow"]: { parameters: { - properties: { - request: { - description: - "A single sentence — the agent has full conversation context and VFS access. Do NOT look up IDs or pre-read data; the workflow agent does its own research. Example: 'move all the return letter workflows into a folder called Letters'.", - type: 'string', - }, + "properties": { + "request": { + "description": "A single sentence — the agent has full conversation context and VFS access. Do NOT look up IDs or pre-read data; the workflow agent does its own research. Example: 'move all the return letter workflows into a folder called Letters'.", + "type": "string" + } }, - required: ['request'], - type: 'object', + "required": [ + "request" + ], + "type": "object" }, resultSchema: undefined, }, - workspace_file: { + ["workspace_file"]: { parameters: { - type: 'object', - properties: { - operation: { - type: 'string', - description: 'The file operation to perform.', - enum: ['create', 'append', 'update', 'patch', 'rename', 'delete'], + "type": "object", + "properties": { + "operation": { + "type": "string", + "description": "The file operation to perform.", + "enum": [ + "append", + "update", + "patch", + "rename", + "delete" + ] }, - target: { - type: 'object', - description: - 'Explicit file target. Use kind=new_file + fileName for create. Use kind=file_id + fileId for append, update, patch, rename, and delete. Emit target keys in this order: kind, fileId, fileName.', - properties: { - kind: { - type: 'string', - description: 'How the file target is identified.', - enum: ['new_file', 'file_id'], + "target": { + "type": "object", + "description": "Explicit file target. Use kind=file_id + fileId for all operations. Emit target keys in this order: kind, fileId, fileName.", + "properties": { + "kind": { + "type": "string", + "description": "How the file target is identified.", + "enum": [ + "new_file", + "file_id" + ] }, - fileId: { - type: 'string', - description: - 'Canonical existing workspace file ID. Required when target.kind=file_id.', - }, - fileName: { - type: 'string', - description: - 'Plain workspace filename including extension, e.g. "main.py" or "report.docx". Required when target.kind=new_file.', + "fileId": { + "type": "string", + "description": "Canonical existing workspace file ID. Required when target.kind=file_id." }, + "fileName": { + "type": "string", + "description": "Plain workspace filename including extension, e.g. \"main.py\" or \"report.docx\". Required when target.kind=new_file." + } }, - required: ['kind'], + "required": [ + "kind" + ] }, - title: { - type: 'string', - description: - 'Optional short UI label for create/append chunks, e.g. "Chapter 1" or "Slide 3".', + "title": { + "type": "string", + "description": "Optional short UI label for create/append chunks, e.g. \"Chapter 1\" or \"Slide 3\"." }, - contentType: { - type: 'string', - description: - 'Optional MIME type override. Usually omit and let the system infer from the target file extension.', - enum: [ - 'text/markdown', - 'text/html', - 'text/plain', - 'application/json', - 'text/csv', - 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/pdf', - ], + "contentType": { + "type": "string", + "description": "Optional MIME type override. Usually omit and let the system infer from the target file extension.", + "enum": [ + "text/markdown", + "text/html", + "text/plain", + "application/json", + "text/csv", + "application/vnd.openxmlformats-officedocument.presentationml.presentation", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "application/pdf" + ] }, - edit: { - type: 'object', - description: - 'Patch metadata. Use strategy=search_replace for exact text replacement, or strategy=anchored for line-based inserts/replacements/deletions. Emit edit keys in this order: strategy, search, replace, replaceAll, mode, occurrence, before_anchor, after_anchor, anchor, start_anchor, end_anchor, content.', - properties: { - strategy: { - type: 'string', - description: 'Patch strategy.', - enum: ['search_replace', 'anchored'], + "edit": { + "type": "object", + "description": "Patch metadata. Use strategy=search_replace for exact text replacement, or strategy=anchored for line-based inserts/replacements/deletions. Emit edit keys in this order: strategy, search, replace, replaceAll, mode, occurrence, before_anchor, after_anchor, anchor, start_anchor, end_anchor, content.", + "properties": { + "strategy": { + "type": "string", + "description": "Patch strategy.", + "enum": [ + "search_replace", + "anchored" + ] }, - search: { - type: 'string', - description: - 'Exact text to find when strategy=search_replace. Must match exactly once unless replaceAll=true.', + "search": { + "type": "string", + "description": "Exact text to find when strategy=search_replace. Must match exactly once unless replaceAll=true." }, - replace: { - type: 'string', - description: 'Replacement text when strategy=search_replace.', + "replace": { + "type": "string", + "description": "Replacement text when strategy=search_replace." }, - replaceAll: { - type: 'boolean', - description: - 'When true and strategy=search_replace, replace every match instead of requiring a unique single match.', + "replaceAll": { + "type": "boolean", + "description": "When true and strategy=search_replace, replace every match instead of requiring a unique single match." }, - mode: { - type: 'string', - description: 'Anchored edit mode when strategy=anchored.', - enum: ['replace_between', 'insert_after', 'delete_between'], + "mode": { + "type": "string", + "description": "Anchored edit mode when strategy=anchored.", + "enum": [ + "replace_between", + "insert_after", + "delete_between" + ] }, - occurrence: { - type: 'number', - description: '1-based occurrence for repeated anchor lines. Optional; defaults to 1.', + "occurrence": { + "type": "number", + "description": "1-based occurrence for repeated anchor lines. Optional; defaults to 1." }, - before_anchor: { - type: 'string', - description: - 'Boundary line kept before inserted replacement content. Required for mode=replace_between.', + "before_anchor": { + "type": "string", + "description": "Boundary line kept before inserted replacement content. Required for mode=replace_between." }, - after_anchor: { - type: 'string', - description: - 'Boundary line kept after inserted replacement content. Required for mode=replace_between.', + "after_anchor": { + "type": "string", + "description": "Boundary line kept after inserted replacement content. Required for mode=replace_between." }, - anchor: { - type: 'string', - description: - 'Anchor line after which new content is inserted. Required for mode=insert_after.', + "anchor": { + "type": "string", + "description": "Anchor line after which new content is inserted. Required for mode=insert_after." }, - start_anchor: { - type: 'string', - description: 'First line to delete. Required for mode=delete_between.', + "start_anchor": { + "type": "string", + "description": "First line to delete. Required for mode=delete_between." }, - end_anchor: { - type: 'string', - description: 'First line to keep after deletion. Required for mode=delete_between.', + "end_anchor": { + "type": "string", + "description": "First line to keep after deletion. Required for mode=delete_between." }, - content: { - type: 'string', - description: - 'Inserted or replacement content for anchored edits. Not used for delete_between.', - }, - }, + "content": { + "type": "string", + "description": "Inserted or replacement content for anchored edits. Not used for delete_between." + } + } }, - newName: { - type: 'string', - description: - 'New file name for rename. Must be a plain workspace filename like "main.py".', - }, - content: { - type: 'string', - description: - 'File content for create, append, or update. For .pptx/.docx/.pdf this must be JavaScript source code for the corresponding generator runtime.', + "newName": { + "type": "string", + "description": "New file name for rename. Must be a plain workspace filename like \"main.py\"." }, + "content": { + "type": "string", + "description": "File content for append or update. For .pptx/.docx/.pdf this must be JavaScript source code for the corresponding generator runtime." + } }, - required: ['operation', 'target'], + "required": [ + "operation", + "target" + ] }, resultSchema: { - type: 'object', - properties: { - data: { - type: 'object', - description: - 'Optional operation metadata such as file id, file name, size, and content type.', + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Optional operation metadata such as file id, file name, size, and content type." }, - message: { - type: 'string', - description: 'Human-readable summary of the outcome.', - }, - success: { - type: 'boolean', - description: 'Whether the file operation succeeded.', + "message": { + "type": "string", + "description": "Human-readable summary of the outcome." }, + "success": { + "type": "boolean", + "description": "Whether the file operation succeeded." + } }, - required: ['success', 'message'], + "required": [ + "success", + "message" + ] }, }, } diff --git a/apps/sim/lib/copilot/request/go/stream.ts b/apps/sim/lib/copilot/request/go/stream.ts index 3d313c1dbf..f8a407d3f2 100644 --- a/apps/sim/lib/copilot/request/go/stream.ts +++ b/apps/sim/lib/copilot/request/go/stream.ts @@ -415,6 +415,7 @@ export async function runStreamLoop( toolName: 'workspace_file', previewPhase: 'file_preview_content', content: streamedContent, + contentMode: 'snapshot', }, ...(streamEvent.scope ? { scope: streamEvent.scope } : {}), })