{"openapi":"3.1.0","info":{"title":"Fine Structure API","version":"1.0.0","summary":"Build, edit, validate and publish complete web applications with AI.","description":"Fine Structure is an AI software-building platform: it generates complete applications, runs autonomous AI agent teams, and maintains a business brain over your data.\n\nGetting started is self-serve: sign up free at https://finestructure.ai (free tier included, no credit card), then create an API/MCP token at https://finestructure.ai/api-keys and pass it as `Authorization: Bearer fse2_mcp_<token>`.\n\nEvery operation below is also available as an MCP tool via the JSON-RPC endpoint POST /api/mcp (Streamable HTTP transport).","termsOfService":"https://finestructure.ai/terms","contact":{"name":"Fine Structure support","email":"support@finestructure.ai","url":"https://finestructure.ai/contact"}},"servers":[{"url":"https://finestructure.ai","description":"Production"}],"tags":[{"name":"tools","description":"Per-tool REST operations (one per Fine Structure tool)"},{"name":"bridge","description":"Generic call-by-name REST bridge"},{"name":"mcp","description":"Model Context Protocol (JSON-RPC 2.0)"},{"name":"discovery","description":"Unauthenticated discovery and health endpoints"}],"paths":{"/api/mcp/tools/{tool_name}":{"post":{"operationId":"call_tool_generic","summary":"Call any Fine Structure tool by name","description":"Generic REST bridge to the Fine Structure tool surface. The request body is the tool's arguments object. Prefer the per-tool operations below, which carry the exact JSON schema for each tool.","tags":["bridge"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"tool_name","in":"path","required":true,"schema":{"type":"string"},"description":"Name of the tool to execute (see the per-tool operations or GET /api/mcp/manifest)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp":{"post":{"operationId":"mcp_jsonrpc","summary":"MCP JSON-RPC 2.0 endpoint (initialize, tools/list, tools/call)","description":"Model Context Protocol endpoint over Streamable HTTP. Supports the methods initialize, tools/list and tools/call per the MCP specification.","tags":["mcp"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"JSON-RPC 2.0 response (success or error object)","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/mcp/manifest":{"get":{"operationId":"get_manifest","summary":"Tool discovery manifest (all tool names, descriptions and JSON schemas)","tags":["discovery"],"security":[],"responses":{"200":{"description":"Manifest with every available tool definition","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/mcp/health":{"get":{"operationId":"health_check","summary":"Service health check","tags":["discovery"],"security":[],"responses":{"200":{"description":"Service is up","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/mcp/tools/create_app":{"post":{"operationId":"create_app","summary":"Create a new application from a natural language prompt","description":"Create a new application from a natural language prompt. The AI generates a complete web app with pages, components, styling, and data models. Returns a job_id - poll get_job_status to track progress. When the job is done, the app is ready.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name for the app (1-100 chars)"},"prompt":{"type":"string","description":"Detailed description of the app to build"},"description":{"type":"string","description":"Optional short description","default":""}},"required":["name","prompt"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/agency_create_client":{"post":{"operationId":"agency_create_client","summary":"Agency mode only","description":"Agency mode only. Create or update a client record for an account-level agent. This does not create a verified Fine Structure user account and does not transfer ownership.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_email":{"type":"string","description":"Client email that will be allowed to claim projects"},"client_full_name":{"type":"string","description":"Optional client display name","default":""},"note":{"type":"string","description":"Optional internal note for the agency","default":""}},"required":["client_email"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/agency_list_clients":{"post":{"operationId":"agency_list_clients","summary":"Agency mode only","description":"Agency mode only. List client records and app handoff status for the authenticated agent.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"include_handoffs":{"type":"boolean","description":"Include claim links status without raw tokens","default":true}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/agency_create_client_app":{"post":{"operationId":"agency_create_client_app","summary":"Agency mode only","description":"Agency mode only. Create a new app owned by the agent, start generation, and create a claim link for the client. Ownership transfers only when the invited client logs in with the same email and accepts the claim link.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_email":{"type":"string","description":"Client email allowed to claim ownership"},"client_full_name":{"type":"string","description":"Optional client display name","default":""},"name":{"type":"string","description":"Name for the app (1-100 chars)"},"prompt":{"type":"string","description":"Detailed description of the app to build"},"description":{"type":"string","description":"Optional short app description","default":""},"note":{"type":"string","description":"Optional internal client/project note","default":""},"keep_agent_collaborator":{"type":"boolean","description":"After claim, invite the agent back as an editor collaborator","default":true},"claim_expires_in_days":{"type":"integer","description":"Claim link lifetime, 1-90 days","default":14}},"required":["client_email","name","prompt"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/agency_create_claim_link":{"post":{"operationId":"agency_create_claim_link","summary":"Agency mode only","description":"Agency mode only. Create a client claim link for an existing app owned by the agent. The client must log in with the invited email before ownership transfers.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"Existing app ID owned by the agent"},"client_email":{"type":"string","description":"Client email allowed to claim ownership"},"client_full_name":{"type":"string","description":"Optional client display name","default":""},"note":{"type":"string","description":"Optional internal note","default":""},"keep_agent_collaborator":{"type":"boolean","description":"Invite agent as editor after claim","default":true},"claim_expires_in_days":{"type":"integer","description":"Claim link lifetime, 1-90 days","default":14}},"required":["app_id","client_email"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/agency_get_claim_status":{"post":{"operationId":"agency_get_claim_status","summary":"Agency mode only","description":"Agency mode only. Inspect one handoff status without exposing the raw claim token.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handoff_id":{"type":"string","description":"Handoff ID returned by agency_create_claim_link or agency_create_client_app"}},"required":["handoff_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_app":{"post":{"operationId":"update_app","summary":"Update an existing application with a new prompt","description":"Update an existing application with a new prompt. The AI modifies the app based on your instructions. Creates a Saved Version before the update. Returns a job_id - poll get_job_status to track progress.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID to update"},"prompt":{"type":"string","description":"What to change in the app"}},"required":["app_id","prompt"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/publish_app":{"post":{"operationId":"publish_app","summary":"Publish an app - freeze current state and make it live at a URL","description":"Publish an app - freeze current state and make it live at a URL. Also configures whether the public URL is open, app-login gated, private, or inferred from the app.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID to publish"},"access_mode":{"type":"string","enum":["infer","public_open","public_auth","private","keep"],"default":"infer","description":"Live access policy. public_open = anyone can view. public_auth = public URL opens but app login is required. private = published snapshot remains owner/collaborator-only. keep = preserve current visibility/auth settings. infer = choose from existing settings and obvious app structure."},"auth_required":{"type":"boolean","description":"Optional explicit override for generated-app login requirement. Prefer access_mode when possible."},"make_public":{"type":"boolean","description":"Optional explicit override for whether published URLs are publicly reachable. Prefer access_mode when possible."}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_platform_guide":{"post":{"operationId":"get_platform_guide","summary":"Return a machine-readable Fine Structure / FSe2 guide for AI agents","description":"Return a machine-readable Fine Structure / FSe2 guide for AI agents. Call this at the start of an MCP session to learn app files, entities, safe edit workflows, validation, publishing, A/B testing, secrets, and platform rules.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"Optional app ID. If provided, the guide includes a safe app context summary."},"sections":{"type":"array","description":"Optional subset of guide sections to return.","items":{"type":"string","enum":["ab_testing","agency","agents","app_code","checklists","data_model","direct_file_edit","domains","file_model","functions","generation","knowledge","lodging","marketing","media","overview","platform_requests","publishing","saas","safety","sdk","secrets_integrations","security","validation"]}},"task_type":{"type":"string","description":"Optional task hint, for example edit_app, direct_file_edit, seed_data, or publish_app."}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_recommended_workflow":{"post":{"operationId":"get_recommended_workflow","summary":"Return the recommended MCP tool sequence for a task type","description":"Return the recommended MCP tool sequence for a task type. Use this before creating apps, editing files, seeding data, publishing, setting up A/B tests, restoring versions, or configuring secrets/integrations.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"task_type":{"type":"string","description":"The task type to plan.","enum":["ab_test","agency_client_app","backend_function","create_app","direct_file_edit","domain_setup","edit_app","fix_runtime_error","generate_media","inspect_preview","publish_app","saas_setup","schema_change","secrets_integration","security_setup","seed_data","unknown","version_restore"],"default":"unknown"},"goal":{"type":"string","description":"Optional short description of the user's goal.","default":""},"app_id":{"type":"string","description":"Optional app ID. If provided, the workflow includes a safe app context summary."}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_job_status":{"post":{"operationId":"get_job_status","summary":"Poll the status of an async generation job","description":"Poll the status of an async generation job. Use this after create_app or update_app to know when the job is done. Returns status ('running' or 'done'), progress events, and result summary when complete.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","description":"The job_id returned by create_app or update_app"}},"required":["job_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_status":{"post":{"operationId":"get_app_status","summary":"Get app overview: files, published state, URL, active jobs","description":"Get app overview: files, published state, URL, active jobs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_links":{"post":{"operationId":"get_app_links","summary":"Return editor, preview, published path, subdomain, and custom-domain links plus whether each works for anonymous visi...","description":"Return editor, preview, published path, subdomain, and custom-domain links plus whether each works for anonymous visitors, app users, or Studio users based on publish and auth settings.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_app_domains":{"post":{"operationId":"list_app_domains","summary":"List an app's platform path, subdomain, and configured custom domain with verification, SSL, primary-domain, redirect...","description":"List an app's platform path, subdomain, and configured custom domain with verification, SSL, primary-domain, redirect, publish, and login-gating status.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_app_subdomain":{"post":{"operationId":"set_app_subdomain","summary":"Set or clear the app platform subdomain - the '<subdomain>.<base domain>' host Fine Structure already serves the app on","description":"Set or clear the app platform subdomain - the '<subdomain>.<base domain>' host Fine Structure already serves the app on. Runs the same ownership, format, reserved-name and uniqueness checks as the Studio subdomain field because it calls the same model function. Replacing a subdomain takes effect immediately and creates NO redirect: the previous name stops resolving to this app and is released for anyone to claim. Pass an empty subdomain to clear it. For a domain the user owns, use add_custom_domain instead.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"subdomain":{"type":"string","description":"Subdomain label: 3-32 characters, lowercase letters, digits and hyphens, no leading or trailing hyphen, not a reserved platform name. Empty string clears the subdomain."}},"required":["app_id","subdomain"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/check_subdomain_available":{"post":{"operationId":"check_subdomain_available","summary":"Check whether a platform subdomain can be claimed before calling set_app_subdomain","description":"Check whether a platform subdomain can be claimed before calling set_app_subdomain. Returns available plus a status of available, invalid, reserved, taken, current, or empty, with the exact reason. Pass app_id (an app you own) to have that app's own current subdomain reported as 'current' instead of 'taken'.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subdomain":{"type":"string","description":"Subdomain label to check"},"app_id":{"type":"string","description":"Optional ID of an app you own. When supplied, this app's own subdomain reports as 'current' instead of 'taken'."}},"required":["subdomain"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/add_custom_domain":{"post":{"operationId":"add_custom_domain","summary":"Attach or replace the app custom domain through the same Fine Structure Studio custom-domain flow","description":"Attach or replace the app custom domain through the same Fine Structure Studio custom-domain flow. Returns exact DNS verification and routing records for the user to configure at their DNS provider.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Custom domain to connect, for example example.com or app.example.com"}},"required":["app_id","domain"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_domain_verification":{"post":{"operationId":"get_domain_verification","summary":"Return the exact DNS records and instructions required to verify and route the app custom domain","description":"Return the exact DNS records and instructions required to verify and route the app custom domain.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Optional configured custom domain. If omitted, uses the app's current custom domain."}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/check_domain_verification":{"post":{"operationId":"check_domain_verification","summary":"Check Fine Structure custom-domain verification and SSL status for the configured custom domain, then save the latest...","description":"Check Fine Structure custom-domain verification and SSL status for the configured custom domain, then save the latest status.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Optional configured custom domain. If omitted, uses the app's current custom domain."}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_primary_domain":{"post":{"operationId":"set_primary_domain","summary":"Set which app host should be treated as primary for generated links and custom-domain redirects","description":"Set which app host should be treated as primary for generated links and custom-domain redirects.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Primary host, for example example.com, www.example.com, or the app subdomain host."}},"required":["app_id","domain"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/remove_custom_domain":{"post":{"operationId":"remove_custom_domain","summary":"Remove the configured custom domain from the app and clean up the platform-side hostname registration when possible","description":"Remove the configured custom domain from the app and clean up the platform-side hostname registration when possible.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Optional configured custom domain. If omitted, removes the current custom domain."}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_domain_ssl_status":{"post":{"operationId":"get_domain_ssl_status","summary":"Return SSL/certificate status and pending certificate validation DNS records for the app custom domain","description":"Return SSL/certificate status and pending certificate validation DNS records for the app custom domain.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Optional configured custom domain. If omitted, uses the app's current custom domain."}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/configure_domain_redirects":{"post":{"operationId":"configure_domain_redirects","summary":"Configure custom-domain redirect policy: primary domain, optional www/root redirect, and HTTPS enforcement","description":"Configure custom-domain redirect policy: primary domain, optional www/root redirect, and HTTPS enforcement.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"primary_domain":{"type":"string","description":"Canonical primary domain, for example example.com"},"redirect_www":{"type":"boolean","description":"Redirect the www/root counterpart to primary_domain","default":true},"force_https":{"type":"boolean","description":"Redirect HTTP custom-domain requests to HTTPS","default":true}},"required":["app_id","primary_domain"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_apps":{"post":{"operationId":"list_apps","summary":"List owned and accepted Studio-shared applications, newest activity first","description":"List owned and accepted Studio-shared applications, newest activity first. Returns up to `limit` apps per call plus the total count; page with `offset` when the account has more. Accepted editors can edit shared source; viewers can read it. Publishing, records, domains and security administration remain owner-only.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Max apps to return (1-200)","default":50},"offset":{"type":"integer","description":"Apps to skip, for paging","default":0}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_files":{"post":{"operationId":"get_app_files","summary":"Get the file tree for an app with paths and byte sizes","description":"Get the file tree for an app with paths and byte sizes.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/read_app_file":{"post":{"operationId":"read_app_file","summary":"Read one source file from an app's virtual filesystem","description":"Read one source file from an app's virtual filesystem. Paths follow the Fine Structure app file API, documented at https://finestructure.ai/api/mcp/docs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"path":{"type":"string","description":"Virtual file path, for example pages/Home.jsx"},"max_chars":{"type":"integer","description":"Maximum content characters to return","default":200000}},"required":["app_id","path"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/read_app_files":{"post":{"operationId":"read_app_files","summary":"Read several source files from an app's virtual filesystem","description":"Read several source files from an app's virtual filesystem. Paths follow the Fine Structure app file API, documented at https://finestructure.ai/api/mcp/docs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"paths":{"type":"array","items":{"type":"string"},"description":"Virtual file paths to read"},"max_chars_per_file":{"type":"integer","description":"Maximum characters per file","default":100000}},"required":["app_id","paths"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/write_app_file":{"post":{"operationId":"write_app_file","summary":"Create or replace one file in an app's virtual filesystem","description":"Create or replace one file in an app's virtual filesystem. Creates a Saved Version before changing content. Paths and file model follow the Fine Structure app file API, documented at https://finestructure.ai/api/mcp/docs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"path":{"type":"string","description":"Virtual file path"},"content":{"type":"string","description":"Complete file contents"},"file_type":{"type":"string","description":"Optional file type override"}},"required":["app_id","path","content"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/patch_app_file":{"post":{"operationId":"patch_app_file","summary":"Patch one file by replacing exact text","description":"Patch one file by replacing exact text. Safer than full overwrite for targeted edits. Creates a Saved Version before changing content. Paths follow the Fine Structure app file API, documented at https://finestructure.ai/api/mcp/docs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"path":{"type":"string","description":"Virtual file path"},"old_text":{"type":"string","description":"Exact existing text to replace"},"new_text":{"type":"string","description":"Replacement text"},"replace_all":{"type":"boolean","description":"Replace all matches instead of the first match","default":false}},"required":["app_id","path","old_text","new_text"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/rename_app_file":{"post":{"operationId":"rename_app_file","summary":"Rename or move one app source file atomically","description":"Rename or move one app source file atomically. Internally stages an upsert at new_path and a delete at old_path, validates the resulting app state, and creates a Saved Version before applying.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"old_path":{"type":"string","description":"Existing virtual file path to rename"},"new_path":{"type":"string","description":"New virtual file path"},"overwrite":{"type":"boolean","description":"Allow replacing an existing file at new_path","default":false},"force":{"type":"boolean","description":"Apply even if validation reports blocking errors","default":false}},"required":["app_id","old_path","new_path"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_detail":{"post":{"operationId":"get_app_detail","summary":"Deep introspection of an app: entities, pages, settings, integrations, environment variables, and file structure","description":"Deep introspection of an app: entities, pages, settings, integrations, environment variables, and file structure. Use this to understand what an app contains before updating it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_entities":{"post":{"operationId":"get_entities","summary":"Get all entity (data model) schemas for an app, with record counts","description":"Get all entity (data model) schemas for an app, with record counts. Each entity has fields, types, and relationships.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/query_entity":{"post":{"operationId":"query_entity","summary":"Query app data records for one entity with optional exact-match filters","description":"Query app data records for one entity with optional exact-match filters.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name, for example Patient"},"filters":{"type":"object","description":"Exact-match field filters","default":{}},"sort":{"type":"string","description":"Sort field, prefix with - for descending","default":"-created_date"},"limit":{"type":"integer","description":"Max records to return","default":100},"offset":{"type":"integer","description":"Pagination offset","default":0}},"required":["app_id","entity"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/seed_entity":{"post":{"operationId":"seed_entity","summary":"Compatibility tool for starter-record creation","description":"Compatibility tool for starter-record creation. Inserts directly for the authenticated app owner; by default it only seeds an empty entity (skip_if_not_empty).","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"records":{"type":"array","items":{"type":"object"},"description":"Records to insert"},"mode":{"type":"string","enum":["append","skip_if_not_empty"],"description":"append always inserts; skip_if_not_empty inserts only when the entity is empty","default":"skip_if_not_empty"},"reason":{"type":"string","description":"Why these records should be created","default":""}},"required":["app_id","entity","records"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_entity_records":{"post":{"operationId":"create_entity_records","summary":"Create/insert records in one app entity","description":"Create/insert records in one app entity. Executes directly for the authenticated app owner and returns the created record ids.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"records":{"type":"array","items":{"type":"object"},"description":"Records to create"},"reason":{"type":"string","description":"Why these records should be created","default":""},"expected_count":{"type":"integer","description":"Optional safety check; the write aborts if the record count differs"}},"required":["app_id","entity","records"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_entity_record":{"post":{"operationId":"update_entity_record","summary":"Compatibility tool that updates one record by ID","description":"Compatibility tool that updates one record by ID. Executes directly for the authenticated app owner.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"record_id":{"type":"string","description":"Record ID"},"data":{"type":"object","description":"Fields to merge into the record"},"reason":{"type":"string","description":"Why this record should be updated","default":""}},"required":["app_id","entity","record_id","data"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_entity_records":{"post":{"operationId":"update_entity_records","summary":"Update exact records","description":"Update exact records. Select explicit record_ids or exact-match filters and provide shared changes, or provide per-record updates. Executes directly for the authenticated app owner; expected_count aborts the write on a mismatch.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"record_ids":{"type":"array","items":{"type":"string"},"description":"Exact record IDs to update"},"filters":{"oneOf":[{"type":"object"},{"type":"array","items":{"type":"object"}}],"description":"One exact-match selector or a list of exact-match selectors"},"changes":{"type":"object","description":"Shared fields to merge into every selected record"},"updates":{"type":"array","items":{"type":"object","properties":{"record_id":{"type":"string"},"changes":{"type":"object"}},"required":["record_id","changes"]},"description":"Per-record changes; use instead of shared changes"},"reason":{"type":"string","description":"Why these records should be updated","default":""},"expected_count":{"type":"integer","description":"Required match count safety check, when known"}},"required":["app_id","entity"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/delete_entity_records":{"post":{"operationId":"delete_entity_records","summary":"Delete exact records by ID or exact-match filters","description":"Delete exact records by ID or exact-match filters. Executes directly for the authenticated app owner; pass expected_count as a safety check to abort on a mismatch.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"record_ids":{"type":"array","items":{"type":"string"},"description":"Exact record IDs to delete"},"filters":{"oneOf":[{"type":"object"},{"type":"array","items":{"type":"object"}}],"description":"One exact-match selector or a list of exact-match selectors"},"reason":{"type":"string","description":"Why these records should be deleted","default":""},"expected_count":{"type":"integer","description":"Required match count safety check, when known"}},"required":["app_id","entity"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_pages":{"post":{"operationId":"get_pages","summary":"Get all pages in an app with their file paths and sizes","description":"Get all pages in an app with their file paths and sizes.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_errors":{"post":{"operationId":"get_errors","summary":"Get recent runtime errors for an app (last 20)","description":"Get recent runtime errors for an app (last 20). Useful for diagnosing issues before updating.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"limit":{"type":"integer","description":"Max errors to return (default 20)","default":20}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_analytics":{"post":{"operationId":"get_app_analytics","summary":"Traffic analytics for an app's published site over a chosen window: total views, unique visitors, daily series, top p...","description":"Traffic analytics for an app's published site over a chosen window: total views, unique visitors, daily series, top pages, top referrer domains and device split.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"days":{"type":"integer","description":"Window in days (1-90, default 7)","default":7}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_preview_url":{"post":{"operationId":"get_preview_url","summary":"Return editor preview and published/public URLs for an app","description":"Return editor preview and published/public URLs for an app.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_saved_versions":{"post":{"operationId":"list_saved_versions","summary":"List restorable Saved Versions for an app, including versions created by MCP writes","description":"List restorable Saved Versions for an app, including versions created by MCP writes.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/restore_saved_version":{"post":{"operationId":"restore_saved_version","summary":"Compatibility endpoint for full Saved Version restore","description":"Compatibility endpoint for full Saved Version restore. MCP cannot execute this operation because it can replace database records without the dedicated in-chat approval flow. Use list_saved_versions and compare_current_to_version for read-only inspection, then ask the authenticated app owner to restore through the Fine Structure UI.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"snapshot_id":{"type":"string","description":"Saved Version snapshot_id to inspect before restoring in the UI"}},"required":["app_id","snapshot_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_change_set":{"post":{"operationId":"create_change_set","summary":"Create a staged file change set","description":"Create a staged file change set. Add multiple file changes, validate them as one app state, then apply atomically.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"label":{"type":"string","description":"Optional short label"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/add_file_change":{"post":{"operationId":"add_file_change","summary":"Stage one file upsert or delete inside a change set","description":"Stage one file upsert or delete inside a change set. Does not modify the live app until apply_change_set. Paths follow the Fine Structure app file API, documented at https://finestructure.ai/api/mcp/docs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"change_set_id":{"type":"string","description":"Change set ID"},"path":{"type":"string","description":"Virtual file path"},"content":{"type":"string","description":"Complete file contents for upsert","default":""},"file_type":{"type":"string","description":"Optional file type override","default":""},"operation":{"type":"string","enum":["upsert","delete"],"default":"upsert"}},"required":["app_id","change_set_id","path"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/validate_change_set":{"post":{"operationId":"validate_change_set","summary":"Validate current app files plus staged change set files before applying","description":"Validate current app files plus staged change set files before applying.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"change_set_id":{"type":"string","description":"Change set ID"},"include_runtime_errors":{"type":"boolean","default":true}},"required":["app_id","change_set_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/apply_change_set":{"post":{"operationId":"apply_change_set","summary":"Apply a staged change set to the app","description":"Apply a staged change set to the app. Creates a Saved Version before applying. Blocks on validation errors unless force=true.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"change_set_id":{"type":"string","description":"Change set ID"},"force":{"type":"boolean","description":"Apply even if validation has errors","default":false}},"required":["app_id","change_set_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/discard_change_set":{"post":{"operationId":"discard_change_set","summary":"Discard a pending staged change set without changing app files","description":"Discard a pending staged change set without changing app files.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"change_set_id":{"type":"string","description":"Change set ID"}},"required":["app_id","change_set_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/validate_app":{"post":{"operationId":"validate_app","summary":"Run deterministic app checks: syntax, imports, routes/pages, entity schemas, missing entities, and recorded runtime e...","description":"Run deterministic app checks: syntax, imports, routes/pages, entity schemas, missing entities, and recorded runtime errors.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"include_runtime_errors":{"type":"boolean","default":true}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/inspect_preview":{"post":{"operationId":"inspect_preview","summary":"Return server-side preview context: URLs, persisted runtime/network errors, static clickable candidates, pages, and e...","description":"Return server-side preview context: URLs, persisted runtime/network errors, static clickable candidates, pages, and explicit live-browser availability.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"route":{"type":"string","description":"Optional route to inspect","default":""},"auth_as":{"type":"string","description":"Optional auth simulation: anonymous","default":""},"auth_as_role":{"type":"string","description":"Optional app role simulation, e.g. staff/admin/customer","default":""}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_security_context":{"post":{"operationId":"get_app_security_context","summary":"Return safe security context for one owned app: owner id/email, Studio collaborators, generated-app members, route po...","description":"Return safe security context for one owned app: owner id/email, Studio collaborators, generated-app members, route policies, entity policies, function policies, and recent security audit entries. Does not return secrets and does not grant access to other apps.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"audit_limit":{"type":"integer","default":50}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_route_policy":{"post":{"operationId":"set_route_policy","summary":"Create or update a server-owned route policy for a generated app route","description":"Create or update a server-owned route policy for a generated app route.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"route":{"type":"string","description":"Route or wildcard route, e.g. /admin/*"},"require_auth":{"type":"boolean","default":true},"allowed_roles":{"type":"array","items":{"type":"string"},"description":"Allowed app roles"},"redirect_to":{"type":"string","default":"/Login"}},"required":["app_id","route","require_auth","allowed_roles"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_function_policy":{"post":{"operationId":"set_function_policy","summary":"Create or update the server-owned access policy of a backend function (functions/<name>.js)","description":"Create or update the server-owned access policy of a backend function (functions/<name>.js). Without a policy a function answers only to the app owner's Studio token (401 for app visitors and webhooks). Recipes: anonymous checkout step or inbound webhook/IPN -> require_auth=false; signed-in members -> require_auth=true + allowed_roles (e.g. ['authenticated'] or ['admin','staff']); webhook with a shared secret -> require_secret=true + secret_name (an app secret) that the caller sends in secret_header. allowed_hosts fences the function's outbound network to those hosts plus the platform backend; omit it for open egress.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"function":{"type":"string","description":"Function name, e.g. takbull_create (file functions/takbull_create.js)"},"require_auth":{"type":"boolean","default":true,"description":"false = anonymous visitors and external callers may invoke"},"allowed_roles":{"type":"array","items":{"type":"string"},"default":[],"description":"App roles allowed when require_auth is true; 'authenticated' = any signed-in app member"},"require_secret":{"type":"boolean","default":false,"description":"Caller must send a shared secret header (webhooks)"},"secret_name":{"type":"string","default":"","description":"Name of the app secret holding the shared value (set_secret)"},"secret_header":{"type":"string","default":"x-fse2-secret","description":"Header the caller sends the shared secret in"},"allowed_hosts":{"type":"array","items":{"type":"string"},"description":"Outbound egress allow-list of host[:port] entries, e.g. ['api.takbull.co.il']. Omit to keep the stored list; pass [] to open egress again"},"sdk_identity":{"type":"string","enum":["caller","app"],"description":"Whose identity the SDK inside the function uses. 'caller' (default): the function reads data as whoever called it, so an anonymous call sees only what anonymous may read. 'app': the SDK acts as the app owner on THIS app's entities (a checkout or payment IPN that must load/update orders whose read policy is owner/admin/staff); the caller still counts as anonymous for rate limits, audit and X-FSe2-Caller-Type. Owner-only. Omit to keep the stored value"}},"required":["app_id","function","require_auth"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/invoke_function":{"post":{"operationId":"invoke_function","summary":"Run a backend function of an owned app exactly like the HTTP route and return its status and JSON","description":"Run a backend function of an owned app exactly like the HTTP route and return its status and JSON. caller='owner' runs as the app owner; caller='anonymous' first evaluates the function policy as a public visitor and returns the 401/403 decision without running when access would be denied. Use it to verify a function (secrets, outbound calls, policy) before wiring it into the app.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"function":{"type":"string","description":"Function name, e.g. probe"},"params":{"type":"object","description":"JSON body passed to the function","default":{}},"caller":{"type":"string","enum":["owner","anonymous"],"default":"owner"},"headers":{"type":"object","description":"Optional extra request headers to simulate, e.g. a webhook secret header","default":{}}},"required":["app_id","function"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_platform_request":{"post":{"operationId":"create_platform_request","summary":"Open a request to the Fine Structure platform team: a bug, a feature request or a question about the platform itself ...","description":"Open a request to the Fine Structure platform team: a bug, a feature request or a question about the platform itself (not about the user's app). Use it when something in the platform blocks you instead of working around it. Give a reproduction the team can run (invoke_function / curl / the exact tool call and result), what you expected, and how the team will know it is closed. Credential-looking values are redacted. Returns request_id and a Studio URL; the team's replies, status changes and deployments come back through get_platform_request / list_platform_requests. Limits: 20 per account per day, 32 KB.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["bug","feature","question"]},"title":{"type":"string","description":"One line, what is wrong or missing"},"body":{"type":"string","description":"Free text, markdown allowed: context, impact, what you tried"},"app_id":{"type":"string","description":"Optional: the app where it showed up"},"severity":{"type":"string","enum":["blocker","high","normal","low"],"default":"normal"},"reproduction":{"type":"string","description":"Steps, invoke_function calls or curl commands that reproduce it"},"expected":{"type":"string","description":"What should have happened"},"acceptance":{"type":"string","description":"How the team will know it is closed"},"attachments":{"type":"array","items":{"type":"string"},"description":"Optional app file paths or log ids","default":[]}},"required":["type","title","body"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_platform_request":{"post":{"operationId":"get_platform_request","summary":"One platform request with its full history: team replies, status changes (open | triaged | in_progress | needs_info |...","description":"One platform request with its full history: team replies, status changes (open | triaged | in_progress | needs_info | deployed | wont_fix) and what was deployed (commit, time). Pass since=<ISO timestamp> to get only the events after it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string"},"since":{"type":"string","description":"Optional ISO timestamp: only events after it"}},"required":["request_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_platform_requests":{"post":{"operationId":"list_platform_requests","summary":"Your account's platform requests, newest activity first","description":"Your account's platform requests, newest activity first. Call it at the start of a session with since=<the updated_date you last saw> to learn what changed: replies, needs_info questions to answer, deployments with their commit. Filters: app_id, status.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"Optional app filter"},"status":{"type":"string","enum":["open","triaged","in_progress","needs_info","deployed","wont_fix"]},"since":{"type":"string","description":"Optional ISO timestamp: only requests touched after it, each with changes_since"},"limit":{"type":"integer","default":100},"scope":{"type":"string","enum":["mine","all"],"default":"mine","description":"'all' = every account (platform team only)"}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/reply_platform_request":{"post":{"operationId":"reply_platform_request","summary":"Add a reply or a finding to one of your platform requests without opening a new one, e.g","description":"Add a reply or a finding to one of your platform requests without opening a new one, e.g. to answer a needs_info question (that reopens it).","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string"},"body":{"type":"string","description":"The answer or finding (markdown allowed, credentials are redacted)"},"as_team":{"type":"boolean","default":false,"description":"Platform team only: reply as the team (mails the requester)"}},"required":["request_id","body"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_platform_request":{"post":{"operationId":"update_platform_request","summary":"Platform team only: set the status of a request (open | triaged | in_progress | needs_info | deployed | wont_fix), at...","description":"Platform team only: set the status of a request (open | triaged | in_progress | needs_info | deployed | wont_fix), attach the deployed commit and/or reply. deployed and needs_info mail the requester.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string"},"status":{"type":"string","enum":["open","triaged","in_progress","needs_info","deployed","wont_fix"]},"reply":{"type":"string"},"deployed_commit":{"type":"string","description":"Commit hash or tag that shipped it"}},"required":["request_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_entity_policy":{"post":{"operationId":"set_entity_policy","summary":"Replace server-side entity access policy","description":"Replace server-side entity access policy. Optional action rules override read/write roles and can allow public create without public read, update, or delete. Omitting rules replaces any existing action rules with read/write role behavior.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name, e.g. Booking"},"read":{"type":"array","items":{"type":"string"},"description":"Roles allowed to read when rules are omitted"},"write":{"type":"array","items":{"type":"string"},"description":"Roles allowed to write when rules are omitted"},"rules":{"type":"object","description":"Nonempty unconditional action/role rules. No matching rule denies access. Include owner/admin actions explicitly. Record conditions are not supported by this MCP input.","additionalProperties":false,"properties":{"version":{"type":"integer","enum":[1]},"rules":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"actions":{"type":"array","minItems":1,"items":{"type":"string","enum":["create","read","update","delete","write"]}},"subject":{"type":"object","additionalProperties":false,"properties":{"roles":{"type":"array","minItems":1,"items":{"type":"string"}}},"required":["roles"]}},"required":["actions","subject"]}}},"required":["rules"]}},"required":["app_id","entity","read","write"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_app_members":{"post":{"operationId":"list_app_members","summary":"List generated-app runtime users/members for an app","description":"List generated-app runtime users/members for an app. This is separate from Studio project collaborators.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/invite_app_member":{"post":{"operationId":"invite_app_member","summary":"Provision a generated-app runtime member with a role","description":"Provision a generated-app runtime member with a role. This does not create a Studio collaborator, and the owner role cannot be assigned. password is required: ask the account owner which password the member should get. This tool never generates one, because a generated password would come back in the result and that is a live credential in the conversation transcript.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"email":{"type":"string","description":"Member email"},"role":{"type":"string","description":"App role, e.g. admin/staff/customer"},"full_name":{"type":"string","default":""},"password":{"type":"string","description":"The password this member signs in with, chosen by the account owner. Required, and never echoed back in the result."}},"required":["app_id","email","role","password"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_app_member_role":{"post":{"operationId":"update_app_member_role","summary":"Update a generated-app runtime member role","description":"Update a generated-app runtime member role. This cannot assign owner and cannot change the Fine Structure account owner.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"user_id":{"type":"string","description":"Generated app user id"},"role":{"type":"string","description":"New role"}},"required":["app_id","user_id","role"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/remove_app_member":{"post":{"operationId":"remove_app_member","summary":"Remove a person's access to the app","description":"Remove a person's access to the app. They are blocked, as with block_app_member: their sessions end and the address can neither sign in nor sign up again. Nothing is deleted, and unblock_app_member gives the access back.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"user_id":{"type":"string","description":"Generated app user id"}},"required":["app_id","user_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/block_app_member":{"post":{"operationId":"block_app_member","summary":"Block a person who signed up to the app, like the Block button in the app's users screen: their sessions end now, and...","description":"Block a person who signed up to the app, like the Block button in the app's users screen: their sessions end now, and the address, in any letter case, can neither sign in nor sign up again. Their records stay. unblock_app_member reverses it. Take user_id from list_app_members.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"description":"The app ID"},"user_id":{"type":"string","minLength":1,"description":"Generated app user id, from list_app_members"}},"required":["app_id","user_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/unblock_app_member":{"post":{"operationId":"unblock_app_member","summary":"Lift a block, so the person can sign in again","description":"Lift a block, so the person can sign in again. Sessions from before the block stay ended: they sign in anew.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"description":"The app ID"},"user_id":{"type":"string","minLength":1,"description":"Generated app user id, from list_app_members"}},"required":["app_id","user_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/verify_app_member":{"post":{"operationId":"verify_app_member","summary":"Mark the email address of a person who signed up to the app as confirmed, the owner vouching for it, like the Verify ...","description":"Mark the email address of a person who signed up to the app as confirmed, the owner vouching for it, like the Verify button in the app's users screen. From then on they can sign in even where the app requires a confirmed address, and their open confirmation link is retired. There is no undo. Take user_id from list_app_members.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"description":"The app ID"},"user_id":{"type":"string","minLength":1,"description":"Generated app user id, from list_app_members"}},"required":["app_id","user_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_security_audit":{"post":{"operationId":"get_app_security_audit","summary":"Read recent server-side security audit events for an app","description":"Read recent server-side security audit events for an app.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"limit":{"type":"integer","default":100}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/compare_saved_versions":{"post":{"operationId":"compare_saved_versions","summary":"Compare two Saved Versions and return per-file additions, removals, modifications, and compact diffs","description":"Compare two Saved Versions and return per-file additions, removals, modifications, and compact diffs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"base_snapshot_id":{"type":"string","description":"Older/base snapshot ID"},"target_snapshot_id":{"type":"string","description":"Newer/target snapshot ID"},"max_diff_chars":{"type":"integer","default":12000}},"required":["app_id","base_snapshot_id","target_snapshot_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/compare_current_to_version":{"post":{"operationId":"compare_current_to_version","summary":"Compare the current app files to a Saved Version and return compact per-file diffs","description":"Compare the current app files to a Saved Version and return compact per-file diffs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"snapshot_id":{"type":"string","description":"Saved Version snapshot ID"},"max_diff_chars":{"type":"integer","default":12000}},"required":["app_id","snapshot_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/restore_file_from_version":{"post":{"operationId":"restore_file_from_version","summary":"Restore one file from a Saved Version instead of restoring the entire app","description":"Restore one file from a Saved Version instead of restoring the entire app. Creates a Saved Version before changing the file. Paths follow the Fine Structure app file API, documented at https://finestructure.ai/api/mcp/docs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"snapshot_id":{"type":"string","description":"Saved Version snapshot ID"},"path":{"type":"string","description":"Virtual file path to restore"},"confirm":{"type":"boolean","default":false}},"required":["app_id","snapshot_id","path","confirm"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_entity_schema":{"post":{"operationId":"create_entity_schema","summary":"Create an entity schema file in entities/<Entity>.json","description":"Create an entity schema file in entities/<Entity>.json. Creates a Saved Version before writing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"schema":{"type":"object","description":"JSON schema object"},"relationships":{"type":"array","items":{"type":"object"},"default":[]},"indexes":{"type":"array","items":{"type":"object"},"default":[]},"metadata":{"type":"object","default":{}},"overwrite":{"type":"boolean","default":false}},"required":["app_id","entity","schema"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_entity_schema":{"post":{"operationId":"update_entity_schema","summary":"Replace or shallow-merge an existing entity schema file","description":"Replace or shallow-merge an existing entity schema file. Creates a Saved Version before writing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"schema":{"type":"object","description":"Schema fields to set or merge"},"relationships":{"type":"array","items":{"type":"object"},"default":[]},"indexes":{"type":"array","items":{"type":"object"},"default":[]},"metadata":{"type":"object","default":{}},"merge":{"type":"boolean","default":true}},"required":["app_id","entity","schema"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/validate_entity_relationships":{"post":{"operationId":"validate_entity_relationships","summary":"Validate entity relationship metadata and *_id references against existing entity schemas","description":"Validate entity relationship metadata and *_id references against existing entity schemas.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_entity_metadata":{"post":{"operationId":"update_entity_metadata","summary":"Set relationship/index metadata on an entity schema","description":"Set relationship/index metadata on an entity schema. This stores metadata in the schema file; DB index creation is automatic where supported by the platform.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"relationships":{"type":"array","items":{"type":"object"},"default":[]},"indexes":{"type":"array","items":{"type":"object"},"default":[]},"metadata":{"type":"object","default":{}}},"required":["app_id","entity"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_secret_keys":{"post":{"operationId":"list_secret_keys","summary":"List secret key names for an app","description":"List secret key names for an app. Secret values are never returned.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_secret":{"post":{"operationId":"set_secret","summary":"Create or update one encrypted app secret","description":"Create or update one encrypted app secret. The secret value is never returned.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"key":{"type":"string","description":"Secret key name"},"value":{"type":"string","description":"Secret value to encrypt and store"}},"required":["app_id","key","value"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/delete_secret":{"post":{"operationId":"delete_secret","summary":"Delete one app secret by key","description":"Delete one app secret by key.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"key":{"type":"string","description":"Secret key name"}},"required":["app_id","key"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_integrations":{"post":{"operationId":"list_integrations","summary":"List supported integrations and safe connected integration metadata for an app","description":"List supported integrations and safe connected integration metadata for an app. Tokens/secrets are never returned.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/configure_integration":{"post":{"operationId":"configure_integration","summary":"Store safe non-secret integration metadata for an app","description":"Store safe non-secret integration metadata for an app. Use set_secret for API keys/tokens.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"provider":{"type":"string","description":"Integration provider ID"},"config":{"type":"object","description":"Safe metadata only, such as workspace/team/name/email"},"is_active":{"type":"boolean","description":"Set false to disconnect this integration metadata","default":true}},"required":["app_id","provider","config"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_ab_tests":{"post":{"operationId":"list_ab_tests","summary":"List the platform A/B tests configured for an app","description":"List the platform A/B tests configured for an app.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_ab_test":{"post":{"operationId":"create_ab_test","summary":"Create a native Fine Structure A/B test between existing app pages","description":"Create a native Fine Structure A/B test between existing app pages. Use update_app first if a variant page still needs to be generated. Creates a Saved Version before the change.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"name":{"type":"string","description":"Experiment name"},"page_name":{"type":"string","description":"Base route page that triggers the experiment"},"variants":{"type":"array","items":{"type":"object","properties":{"page_name":{"type":"string","description":"Existing app page name or path"},"traffic_percent":{"type":"integer","description":"Traffic percentage for this variant"}},"required":["page_name","traffic_percent"]},"description":"At least two variants. Traffic must total 100."},"goal_event_type":{"type":"string","description":"Optional conversion goal type: entity_create, any, form_submit"},"goal_event_filter":{"type":"object","description":"Optional goal filter, for example {'entity_name': 'Lead'}"},"is_active":{"type":"boolean","description":"Whether to activate the test immediately","default":true}},"required":["app_id","name","page_name","variants"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_ab_test":{"post":{"operationId":"update_ab_test","summary":"Update a native A/B test, including active state, variants, traffic, and conversion goal","description":"Update a native A/B test, including active state, variants, traffic, and conversion goal. Creates a Saved Version before the change.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"test_id":{"type":"string","description":"A/B test ID"},"name":{"type":"string","description":"Optional new name"},"page_name":{"type":"string","description":"Optional new base route page"},"variants":{"type":"array","items":{"type":"object"},"description":"Optional replacement variants. Traffic must total 100."},"is_active":{"type":"boolean","description":"Optional active state"},"goal_event_type":{"type":"string","description":"Optional conversion goal type"},"goal_event_filter":{"type":"object","description":"Optional conversion goal filter"}},"required":["app_id","test_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/delete_ab_test":{"post":{"operationId":"delete_ab_test","summary":"Delete a native A/B test from an app","description":"Delete a native A/B test from an app. Creates a Saved Version before the change.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"test_id":{"type":"string","description":"A/B test ID"}},"required":["app_id","test_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_ab_test_stats":{"post":{"operationId":"get_ab_test_stats","summary":"Get views, unique visitors, conversions, and conversion rates for an A/B test","description":"Get views, unique visitors, conversions, and conversion rates for an A/B test.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"test_id":{"type":"string","description":"A/B test ID"}},"required":["app_id","test_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_status":{"post":{"operationId":"email_marketing_status","summary":"Admin only","description":"Admin only. Inspect the isolated Email Marketing module: enabled state, sender settings, templates, sequences, variable triggers, and recent campaign status.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"include_logs":{"type":"boolean","description":"Include recent delivery logs","default":false}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_configure_sender":{"post":{"operationId":"email_marketing_configure_sender","summary":"Admin only","description":"Admin only. Configure global Email Marketing sender details and module enabled state. Unsubscribe footer remains mandatory.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"is_enabled":{"type":"boolean","description":"Enable or disable the module at settings level"},"sender_name":{"type":"string","description":"Display sender name"},"sender_email":{"type":"string","description":"Sender email address used by the email provider"},"reply_to":{"type":"string","description":"Reply-To email address"},"organization_name":{"type":"string","description":"Organization name used in unsubscribe footer"},"postal_address":{"type":"string","description":"Optional postal/contact address for compliance"},"default_timezone":{"type":"string","description":"Default timezone for scheduling"}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_update_template":{"post":{"operationId":"email_marketing_update_template","summary":"Admin only","description":"Admin only. Update an automatic Email Marketing template, such as user_joined welcome email. The unsubscribe block is still appended by the server.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Template/event id, e.g. user_joined"},"enabled":{"type":"boolean","description":"Whether this automatic template is active"},"subject":{"type":"string","description":"Email subject with {{variables}}"},"body_html":{"type":"string","description":"HTML body with {{variables}}"}},"required":["template_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_create_broadcast":{"post":{"operationId":"email_marketing_create_broadcast","summary":"Admin only","description":"Admin only. Create a filtered broadcast campaign, optionally scheduled or sent now.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Internal campaign name"},"subject":{"type":"string","description":"Email subject"},"body_html":{"type":"string","description":"HTML body. Unsubscribe is appended automatically."},"filters":{"type":"object","description":"Recipient filters: plans, roles, active_status, email_verified, min_apps, max_apps, has_published_app, search"},"scheduled_at":{"type":"string","description":"Optional ISO datetime. If no timezone is included, timezone is used."},"timezone":{"type":"string","description":"Timezone for naive scheduled_at","default":"UTC"},"send_now":{"type":"boolean","description":"Send immediately after creating the campaign","default":false}},"required":["subject","body_html"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_create_sequence":{"post":{"operationId":"email_marketing_create_sequence","summary":"Admin only","description":"Admin only. Create a scheduled email sequence using fixed dates or day offsets. Each generated email keeps mandatory unsubscribe.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Sequence name"},"schedule_mode":{"type":"string","enum":["fixed_dates","day_offsets"],"description":"fixed_dates uses each step.scheduled_at; day_offsets uses start_at + step day offsets"},"filters":{"type":"object","description":"Recipient filters"},"start_at":{"type":"string","description":"ISO datetime for day_offsets mode"},"timezone":{"type":"string","default":"UTC"},"steps":{"type":"array","items":{"type":"object"},"description":"Steps with subject, body_html, and either scheduled_at (fixed_dates) or day_offset/gap_days (day_offsets)."}},"required":["name","schedule_mode","steps"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_create_variable_trigger":{"post":{"operationId":"email_marketing_create_variable_trigger","summary":"Admin only","description":"Admin only. Create an email rule that sends when a named variable changes from one value to another. Empty from_value/to_value acts as wildcard.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Trigger name"},"enabled":{"type":"boolean","default":true},"variable_name":{"type":"string","description":"Variable name, e.g. plan"},"from_value":{"type":"string","description":"Previous value or empty wildcard"},"to_value":{"type":"string","description":"New value or empty wildcard"},"subject":{"type":"string","description":"Email subject"},"body_html":{"type":"string","description":"HTML body. Unsubscribe is appended automatically."},"filters":{"type":"object","description":"Optional recipient filters"}},"required":["variable_name","subject","body_html"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_trigger_variable":{"post":{"operationId":"email_marketing_trigger_variable","summary":"Admin only","description":"Admin only. Manually fire variable-transition email rules for one user. Useful for MCP/agent workflows and tests.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","description":"Platform user id"},"variable_name":{"type":"string","description":"Variable name"},"from_value":{"type":"string","description":"Previous value"},"to_value":{"type":"string","description":"New value"},"context":{"type":"object","description":"Extra template variables"}},"required":["user_id","variable_name"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_status":{"post":{"operationId":"email_marketing_app_status","summary":"Inspect app-scoped Email Marketing for one generated app: settings, contacts, campaigns, event triggers, and recent e...","description":"Inspect app-scoped Email Marketing for one generated app: settings, contacts, campaigns, event triggers, and recent events.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"include_logs":{"type":"boolean","default":false}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_configure":{"post":{"operationId":"email_marketing_app_configure","summary":"Configure isolated Email Marketing settings for a generated app","description":"Configure isolated Email Marketing settings for a generated app. Can be used by Studio/chat agents.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"is_enabled":{"type":"boolean"},"default_contact_entity":{"type":"string","description":"Entity to sync as contacts, e.g. Customer or Lead"},"default_email_field":{"type":"string","description":"Field containing contact email"},"default_name_field":{"type":"string","description":"Field containing contact name"},"sender_name":{"type":"string"},"sender_email":{"type":"string"},"reply_to":{"type":"string"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_sync_contacts":{"post":{"operationId":"email_marketing_app_sync_contacts","summary":"Sync an app entity table into app-scoped Email Marketing contacts","description":"Sync an app entity table into app-scoped Email Marketing contacts. Records without a valid email are skipped.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity_name":{"type":"string","description":"Entity name, e.g. Customer or Lead"},"email_field":{"type":"string","default":"email"},"name_field":{"type":"string"},"limit":{"type":"integer","default":1000}},"required":["app_id","entity_name"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_create_broadcast":{"post":{"operationId":"email_marketing_app_create_broadcast","summary":"Create an app-scoped broadcast to contacts synced from that generated app, optionally scheduled or sent now","description":"Create an app-scoped broadcast to contacts synced from that generated app, optionally scheduled or sent now.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"name":{"type":"string"},"subject":{"type":"string"},"body_html":{"type":"string"},"filters":{"type":"object","description":"App contact filters such as source_entity, search, tags, field_equals"},"scheduled_at":{"type":"string"},"timezone":{"type":"string","default":"UTC"},"send_now":{"type":"boolean","default":false}},"required":["app_id","subject","body_html"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_create_event_trigger":{"post":{"operationId":"email_marketing_app_create_event_trigger","summary":"Create an app-scoped email rule that sends when an app event is recorded, for example entity_created or Customer.created","description":"Create an app-scoped email rule that sends when an app event is recorded, for example entity_created or Customer.created.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"name":{"type":"string"},"enabled":{"type":"boolean","default":true},"event_name":{"type":"string","description":"Event name, e.g. entity_created, Customer.created, order_paid"},"entity_name":{"type":"string","description":"Optional entity filter"},"subject":{"type":"string"},"body_html":{"type":"string"},"filters":{"type":"object","description":"Optional app contact filters"}},"required":["app_id","event_name","subject","body_html"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_record_event":{"post":{"operationId":"email_marketing_app_record_event","summary":"Record an app event and send matching app-scoped Email Marketing triggers","description":"Record an app event and send matching app-scoped Email Marketing triggers.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"event_name":{"type":"string"},"email":{"type":"string","description":"Contact email if no contact_id is known"},"contact_id":{"type":"string"},"entity_name":{"type":"string"},"record_id":{"type":"string"},"record":{"type":"object","description":"Entity record fields for template variables and contact extraction"},"properties":{"type":"object","description":"Extra event properties"}},"required":["app_id","event_name"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_create_workflow":{"post":{"operationId":"email_marketing_app_create_workflow","summary":"Create an app-scoped automation workflow with email, wait, condition, split, and goal steps","description":"Create an app-scoped automation workflow with email, wait, condition, split, and goal steps.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"name":{"type":"string"},"enabled":{"type":"boolean","default":true},"trigger_event_name":{"type":"string","description":"Event that enrolls a contact, e.g. Customer.created"},"trigger_entity_name":{"type":"string","description":"Optional entity filter"},"steps":{"type":"array","description":"Ordered workflow steps. Supported type values: email, wait, condition, split, goal.","items":{"type":"object"}},"definition":{"type":"object","description":"Optional full workflow definition; steps can also be supplied here."}},"required":["app_id","trigger_event_name"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_create_sequence":{"post":{"operationId":"email_marketing_app_create_sequence","summary":"Create an app-scoped email sequence using fixed dates or day offsets between emails","description":"Create an app-scoped email sequence using fixed dates or day offsets between emails.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"name":{"type":"string"},"schedule_mode":{"type":"string","enum":["fixed_dates","day_offsets"],"default":"day_offsets"},"start_at":{"type":"string","description":"Sequence start date/time for day_offsets mode"},"timezone":{"type":"string","default":"UTC"},"filters":{"type":"object","description":"App contact filters"},"steps":{"type":"array","description":"Emails in order. Each step supports subject, body_html, scheduled_at, day_offset, or gap_days.","items":{"type":"object"}}},"required":["app_id","steps"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_report":{"post":{"operationId":"email_marketing_app_report","summary":"Read app-scoped Email Marketing reporting: delivery counts, open/click rates, and recent tracking events","description":"Read app-scoped Email Marketing reporting: delivery counts, open/click rates, and recent tracking events.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"include_events":{"type":"boolean","default":true},"limit":{"type":"integer","default":50},"segment_limit":{"type":"integer","default":25}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_create_segment":{"post":{"operationId":"email_marketing_app_create_segment","summary":"Create an app-scoped saved audience segment using field, tag, and behavior filters","description":"Create an app-scoped saved audience segment using field, tag, and behavior filters.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"name":{"type":"string"},"filters":{"type":"object","description":"Segment filters. Supports rules with field/operator/value plus opened/clicked/sent behavior fields."},"sample_limit":{"type":"integer","default":10}},"required":["app_id","name","filters"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_contact_profile":{"post":{"operationId":"email_marketing_app_contact_profile","summary":"Read a contact profile with email delivery, tracking, app-event, workflow, suppression, and unsubscribe timeline","description":"Read a contact profile with email delivery, tracking, app-event, workflow, suppression, and unsubscribe timeline.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"contact":{"type":"string","description":"Contact id or email address"}},"required":["app_id","contact"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_deliverability":{"post":{"operationId":"email_marketing_app_deliverability","summary":"Read provider readiness, bounce/complaint rates, suppression reasons, and recent deliverability risk events","description":"Read provider readiness, bounce/complaint rates, suppression reasons, and recent deliverability risk events.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_process_queue":{"post":{"operationId":"email_marketing_app_process_queue","summary":"Process due app-scoped automation workflow runs and email queue jobs with locks, retries, and suppression checks","description":"Process due app-scoped automation workflow runs and email queue jobs with locks, retries, and suppression checks.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"max_jobs":{"type":"integer","default":50}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_queue_status":{"post":{"operationId":"email_marketing_app_queue_status","summary":"Inspect app-scoped Email Marketing queue jobs and per-status counts","description":"Inspect app-scoped Email Marketing queue jobs and per-status counts.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"limit":{"type":"integer","default":50},"status":{"type":"string","description":"Optional queue status filter"}},"required":["app_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/email_marketing_app_suppress_contact":{"post":{"operationId":"email_marketing_app_suppress_contact","summary":"Suppress an app contact email after a bounce, complaint, manual block, provider block, or unsubscribe","description":"Suppress an app contact email after a bounce, complaint, manual block, provider block, or unsubscribe.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"email":{"type":"string"},"reason":{"type":"string","default":"manual"},"source":{"type":"string","default":"mcp"},"metadata":{"type":"object"}},"required":["app_id","email"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_media_capabilities":{"post":{"operationId":"list_media_capabilities","summary":"Discovery for the media tools: the active image model and remaining image allowance, the video models this account ma...","description":"Discovery for the media tools: the active image model and remaining image allowance, the video models this account may use with their per-second prices and prepaid wallet balance, and every valid slideshow style, template, and collection id. Call this before generate_image / generate_video / generate_slideshow instead of guessing enum values. Spends nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"surfaces":{"type":"array","items":{"type":"string","enum":["image","video","slideshow"]},"description":"Limit the answer to these surfaces. Default: all three."}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/generate_image":{"post":{"operationId":"generate_image","summary":"Generate one marketing image (ad creative, thumbnail, hero, social graphic) and return a public URL","description":"Generate one marketing image (ad creative, thumbnail, hero, social graphic) and return a public URL. Free plans burn one of their monthly free images; paid plans spend 1 platform credit. Optionally pass a reference image to keep a person, product, place, or brand consistent.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"What to draw. Up to 4500 chars."},"language":{"type":"string","description":"Language of any text in the image. ISO code such as 'en' or 'he'. Defaults to 'en'."},"reference_image_url":{"type":"string","description":"Public https URL of a reference image, or one of this account's own finestructure.ai uploads."},"reference_image_data_url":{"type":"string","description":"Reference image inline as a data:image/... URL. Prefer reference_image_url for large files."},"reference_image_data_urls":{"type":"array","items":{"type":"string"},"description":"Up to 6 extra reference images as data:image/... URLs."},"notify_by_email":{"type":"boolean","description":"Email the account owner the finished image. Default false so batch runs do not spam.","default":false}},"required":["prompt"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/estimate_video_cost":{"post":{"operationId":"estimate_video_cost","summary":"Price a video render before generating it","description":"Price a video render before generating it. Returns the duration, resolution, and the exact charge in USD against the prepaid video wallet. Spends nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from list_media_capabilities. Default 'seedance-2'."},"duration":{"type":"integer","description":"Seconds. Snapped to the model's allowed values."},"resolution":{"type":"string","description":"480p, 720p, or 1080p (model dependent)."}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/generate_video":{"post":{"operationId":"generate_video","summary":"Generate an AI video from a text prompt","description":"Generate an AI video from a text prompt. Submits the render and returns a job_id immediately - poll get_video_status until it completes. Spends the account's prepaid video-credit wallet (NOT platform credits); pass max_charge_usd to cap how much a single call may spend. Video generation may be invitation-gated.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"The shot to render. Up to 4000 chars."},"model":{"type":"string","description":"Model id from list_media_capabilities. Default 'seedance-2'."},"duration":{"type":"integer","description":"Seconds. Snapped to the model's allowed values."},"resolution":{"type":"string","description":"480p, 720p, or 1080p (model dependent). Default 480p."},"aspect_ratio":{"type":"string","description":"auto, 16:9, 9:16, 1:1, 4:3, 3:4, or 21:9. Default auto."},"image_urls":{"type":"array","items":{"type":"string"},"description":"Up to 9 public https reference images (Seedance models only)."},"max_charge_usd":{"type":"number","description":"Refuse the render if it would charge more than this. Strongly recommended for autonomous agents."}},"required":["prompt"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_video_status":{"post":{"operationId":"get_video_status","summary":"Poll one video job by id","description":"Poll one video job by id. Refreshes from the provider while it is still rendering and returns video_url once status is 'completed'. Spends nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","description":"Job id returned by generate_video."}},"required":["job_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_video_jobs":{"post":{"operationId":"list_video_jobs","summary":"List this account's own video jobs, newest first","description":"List this account's own video jobs, newest first. Spends nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"How many jobs to return, 1-100. Default 20."}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/generate_slideshow":{"post":{"operationId":"generate_slideshow","summary":"Write a TikTok/Instagram-style slideshow: hook, per-slide copy, caption, and hashtags, in any supported language","description":"Write a TikTok/Instagram-style slideshow: hook, per-slide copy, caption, and hashtags, in any supported language. Costs 1 platform credit and returns the script for review. Set render_images=true to start image rendering right away (1 extra credit per slide), then poll get_slideshow until status is 'ready'. Pass slide_images to composite the slides on the account's own photos (Instagram carousel mode) and output_format for 9:16, 4:5, or 1:1 geometry. Call list_media_capabilities for the valid style, template, and collection ids.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"type":"string","description":"What the slideshow should achieve or teach."},"language":{"type":"string","description":"ISO code such as 'en' or 'he'. Defaults to 'en'."},"content_style":{"type":"string","description":"Copy archetype, e.g. x_ways, storytelling, countdown_ranking."},"visual_style":{"type":"string","description":"Visual look, e.g. bold_gradient, tiktok_native_photo."},"template":{"type":"string","description":"Built-in template id whose voice spec dominates the output."},"slide_count":{"type":"integer","description":"Fixed number of slides. Omit for the style's natural range."},"narrative_device":{"type":"string","description":"Framing device, e.g. metaphor or famous_quote."},"x_ways_substyle":{"type":"string","description":"How numbered ways are written (x_ways content style only)."},"authentic_mode":{"type":"boolean","description":"Lowercase, unpolished 'real person' voice."},"with_graphics":{"type":"boolean","description":"Rich visuals vs clean text-only slides. Default true."},"enhanced":{"type":"boolean","description":"Use the higher-quality (more expensive) image model."},"text_align":{"type":"string","description":"left, right, or center."},"accent_color":{"type":"string","description":"Hex accent for the chip text style."},"collection":{"type":"string","description":"Saved photo collection id to pull slide photos from."},"output_format":{"type":"string","enum":["tiktok","ig_portrait","ig_square"],"description":"Slide geometry: tiktok 9:16 (default), ig_portrait 4:5 Instagram carousel, ig_square 1:1."},"slide_images":{"type":"array","items":{"type":"string"},"description":"Up to 10 of the account's own photos, in slide order, each a data:image/... URL or public https URL. When present, the slides are composited on these exact photos: one slide per image, no CTA slide appended."},"slide_texts":{"type":"array","items":{"type":"string"},"description":"Per-slide overlay text in slide order, up to 300 chars each. Kept verbatim; leave an entry empty (or omit the array) to have the AI write it."},"cta_url":{"type":"string","description":"Link promoted on the final slide. Omit for pure-value content."},"cta_platforms":{"type":"array","items":{"type":"string","enum":["ios","android","web"]},"description":"What the CTA actually offers."},"sales_bridge":{"type":"boolean","description":"Add pre-sale bridge slides before the offer."},"series_part":{"type":"integer","description":"Part number for a recurring series."},"voice_spec":{"type":"string","description":"A reference voice spec to reproduce exactly."},"render_images":{"type":"boolean","description":"Start rendering images immediately after the script. Default false (review first).","default":false}},"required":["goal"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/render_slideshow_images":{"post":{"operationId":"render_slideshow_images","summary":"Render the images for a slideshow whose script was already written and approved","description":"Render the images for a slideshow whose script was already written and approved. Charges 1 platform credit per slide, runs in the background, and returns immediately - poll get_slideshow until status is 'ready'.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"history_id":{"type":"integer","description":"history_id returned by generate_slideshow."}},"required":["history_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_slideshow":{"post":{"operationId":"get_slideshow","summary":"Fetch one slideshow: its script, render status (script_ready, rendering, ready, render_failed), and the image URL of ...","description":"Fetch one slideshow: its script, render status (script_ready, rendering, ready, render_failed), and the image URL of every rendered slide. Spends nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"history_id":{"type":"integer","description":"history_id returned by generate_slideshow."}},"required":["history_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_slideshows":{"post":{"operationId":"list_slideshows","summary":"List this account's slideshows, newest first, without slide bodies","description":"List this account's slideshows, newest first, without slide bodies. Spends nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"How many to return, 1-60. Default 20."}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_creative_capabilities":{"post":{"operationId":"get_creative_capabilities","summary":"Discover the complete Creative Studio workspace, copy, image references, slide editing, gallery, social publishing an...","description":"Discover the complete Creative Studio workspace, copy, image references, slide editing, gallery, social publishing and recurring workflows. Request operation for its native parameter schema or topic=guide. Account-level OAuth or API token with explicit media scopes required.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["automations.create","automations.delete","automations.duplicate","automations.feedback_create","automations.feedback_delete","automations.feedback_update","automations.list","automations.readiness","automations.run","automations.runs","automations.update","collections.generate","collections.list","collections.upload","copy.blocks","copy.plan","history.cta_image","history.delete","history.events","history.get","history.list","history.rate","landing.analyze","reference.analyze","references.delete","references.get","references.upload","script.edit","script.save","slides.insert","slides.regenerate","slides.rerender","social.draft","social.publish","social.publish_tiktok","social.status","templates.list","usage","workspace.get","workspace.save"]},"topic":{"type":"string","enum":["operations","guide"]}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/read_creative":{"post":{"operationId":"read_creative","summary":"Read this account's creative workspace, images, gallery, automation runs and publication status","description":"Read this account's creative workspace, images, gallery, automation runs and publication status. No generation or sends. Discover exact parameters with get_creative_capabilities first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["automations.list","automations.readiness","automations.runs","collections.list","history.cta_image","history.events","history.get","history.list","references.get","social.status","templates.list","usage","workspace.get"]},"parameters":{"type":"object"}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/configure_creative":{"post":{"operationId":"configure_creative","summary":"Edit private creative work, plan copy, generate collections, revise slides and manage reference images","description":"Edit private creative work, plan copy, generate collections, revise slides and manage reference images. AI operations incur native credits. Does not publish or activate automated publishing. Discover exact parameters with get_creative_capabilities first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["collections.generate","collections.upload","copy.blocks","copy.plan","history.delete","history.rate","landing.analyze","reference.analyze","references.delete","references.upload","script.edit","script.save","slides.insert","slides.regenerate","slides.rerender","workspace.save"]},"parameters":{"type":"object"}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/publish_creative":{"post":{"operationId":"publish_creative","summary":"Publish or schedule creative content, send it to a social draft inbox or manage recurring generation/publishing","description":"Publish or schedule creative content, send it to a social draft inbox or manage recurring generation/publishing. Can spend money and contact third parties. Requires explicit media:publish permission and user authorization. Read actual run/provider status afterwards. Discover exact parameters with get_creative_capabilities first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["automations.create","automations.delete","automations.duplicate","automations.feedback_create","automations.feedback_delete","automations.feedback_update","automations.run","automations.update","social.draft","social.publish","social.publish_tiktok"]},"parameters":{"type":"object"}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_metadata":{"post":{"operationId":"get_app_metadata","summary":"Read the saved public HTML-shell identity: name, description, language and image URLs/dimensions","description":"Read the saved public HTML-shell identity: name, description, language and image URLs/dimensions. Same settings as Studio SEO/GEO.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_app_metadata":{"post":{"operationId":"set_app_metadata","summary":"Update public HTML-shell metadata immediately, without AI, code edits, publishing or Saved Versions","description":"Update public HTML-shell metadata immediately, without AI, code edits, publishing or Saved Versions. Upload social_image/icon as base64 PNG/JPEG/WebP (max 5 MB, 4096px); null clears an image. Language sets HTML lang/dir and OG locale. For per-page cards, write optional seo.json and publish it; dynamic entries may read only explicitly public entity records.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string"},"name":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":4000},"language":{"type":"string","description":"BCP-47 code, e.g. he, ar, en-US"},"social_image":{"anyOf":[{"type":"object","properties":{"base64":{"type":"string"},"content_type":{"type":"string","enum":["image/png","image/jpeg","image/webp"]}},"required":["base64","content_type"],"additionalProperties":false},{"type":"null"}]},"icon":{"anyOf":[{"type":"object","properties":{"base64":{"type":"string"},"content_type":{"type":"string","enum":["image/png","image/jpeg","image/webp"]}},"required":["base64","content_type"],"additionalProperties":false},{"type":"null"}]},"structured_data":{"type":"string","description":"Optional JSON-LD JSON string; empty clears it"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/preview_saved_version":{"post":{"operationId":"preview_saved_version","summary":"Prepare an isolated read-only Saved Version preview, if enabled by the deployment","description":"Prepare an isolated read-only Saved Version preview, if enabled by the deployment. Returns compiled files for an offline sandbox, never restores files or reads live records. Never execute the returned program with host credentials. Requires app access and versions:read.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1},"snapshot_id":{"type":"string","minLength":1}},"required":["app_id","snapshot_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/configure_email_domain_dns":{"post":{"operationId":"configure_email_domain_dns","summary":"Configure sending DNS for an already-owned managed email domain on an owned app","description":"Configure sending DNS for an already-owned managed email domain on an owned app. Uses the existing provider onboarding gates. Does not buy a domain, expand sending limits or bypass DNS ownership checks. Changes public DNS; confirm the selected app and domain first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1,"maxLength":253}},"required":["app_id","domain"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_agent_owner_relay":{"post":{"operationId":"set_agent_owner_relay","summary":"Set the owner's consent for one owned agent to relay reports from another owned agent (or all sources with '*')","description":"Set the owner's consent for one owned agent to relay reports from another owned agent (or all sources with '*'). Uses the same preference as the agent screen. Does not send a message or grant access to customer conversations.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"receiving_agent_id":{"type":"string","minLength":1},"enabled":{"type":"boolean"},"source_agent_id":{"type":"string","minLength":1,"default":"*"}},"required":["receiving_agent_id","enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_agent":{"post":{"operationId":"create_agent","summary":"Create an autonomous AI agent on the user's Fine Structure account: a standing worker, not a chat session","description":"Create an autonomous AI agent on the user's Fine Structure account: a standing worker, not a chat session. It gets the platform's default safe tool policy and its own email address, it can read and write the app database, and once the owner phone is verified (see get_agent_whatsapp) it can message its owner on WhatsApp and by email through the platform system channels. Pair it with schedule_agent_task for recurring work such as following up new leads on WhatsApp each morning, watching an app for runtime errors, or sending a weekly summary. Messaging anyone other than the verified owner requires a channel the owner connects in the Fine Structure Studio.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Agent display name (e.g. 'Lead Follow-up'). Auto-derived from role when omitted."},"role":{"type":"string","description":"Short role label (e.g. 'sales assistant')"},"description":{"type":"string","description":"What this agent is responsible for, one or two sentences"},"persona":{"type":"string","description":"Optional working style and tone instructions for the agent"},"app_id":{"type":"string","description":"Optional app to attach the agent to; account-level when omitted"}},"required":["role","description"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agents":{"post":{"operationId":"list_agents","summary":"List the AI agents on the user's account with id, name, role, status and FineMail address","description":"List the AI agents on the user's account with id, name, role, status and FineMail address.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","description":"Optional filter by attached app"}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/schedule_agent_task":{"post":{"operationId":"schedule_agent_task","summary":"Create a scheduled task for one of the user's agents","description":"Create a scheduled task for one of the user's agents. Supported schedule types: once (run_at ISO local time + timezone), interval (interval_minutes 5-1440), hourly, daily (time HH:MM + timezone), weekly (time + timezone + days_of_week 0=Sunday..6), cron (5-field expression + timezone), manual (only runs on demand). Returns the normalized schedule and the computed next_run_at so you can read the fire time back to the user in their timezone. For 'tell me when a new X comes in' (a lead, an order, a signup, any record of an app entity) do not poll with a plain interval: set watch, and the task costs nothing until a new record arrives.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"The agent id (from create_agent or list_agents)"},"title":{"type":"string","description":"Short task title"},"instructions":{"type":"string","description":"What the agent should do on each run, written as instructions to the agent"},"schedule":{"type":"object","description":"Schedule object, e.g. {\"type\":\"daily\",\"time\":\"08:30\",\"timezone\":\"Asia/Jerusalem\"} or {\"type\":\"weekly\",\"time\":\"09:00\",\"timezone\":\"Asia/Jerusalem\",\"days_of_week\":[0]} or {\"type\":\"once\",\"run_at\":\"2026-08-20T09:00\",\"timezone\":\"Asia/Jerusalem\"}"},"max_runs":{"type":"integer","description":"Optional cap on total runs (0 = unlimited)","default":0},"activate":{"type":"boolean","description":"Start the schedule immediately (true) or save as draft (false)","default":true},"watch":{"type":"object","description":"Run the task only when a record is new, e.g. {\"provider\":\"app_records\",\"app_id\":\"<app id>\",\"entity\":\"Lead\"} with an interval schedule. The platform checks each interval with no model call and no credits, and starts the agent only when a record arrived, with those records in hand. Works for any entity of the user's own apps. Optional: where (exact field values such as {\"status\":\"new\"}), include_existing (also act on the records already there)."}},"required":["agent_id","title","instructions","schedule"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agent_tasks":{"post":{"operationId":"list_agent_tasks","summary":"List scheduled tasks for one agent (or the whole account), including schedule, status and next_run_at","description":"List scheduled tasks for one agent (or the whole account), including schedule, status and next_run_at.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Optional agent id filter"},"status":{"type":"string","description":"Optional status filter: draft, active, paused, archived"},"limit":{"type":"integer","description":"Max tasks to return (1-100)","default":50}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_agent_whatsapp":{"post":{"operationId":"get_agent_whatsapp","summary":"Read the WhatsApp state of the connected account: whether the owner's phone is verified, which platform numbers they ...","description":"Read the WhatsApp state of the connected account: whether the owner's phone is verified, which platform numbers they can connect, and which conversations already route to which agent. Call this first whenever the user asks to talk to an agent on WhatsApp, and repeat its next_step to them.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Optional: report only this agent's WhatsApp state."}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/start_owner_phone_verification":{"post":{"operationId":"start_owner_phone_verification","summary":"Send a 6-digit code over WhatsApp to the ACCOUNT OWNER's own phone","description":"Send a 6-digit code over WhatsApp to the ACCOUNT OWNER's own phone. This is the one-time ownership proof required before a platform number can be connected, and it also unlocks agents messaging the owner. Ask the user for their own WhatsApp number first and send only to that. No WhatsApp Business account is involved.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"The owner's own WhatsApp number, ideally in E.164 form such as +972501234567."},"region":{"type":"string","description":"Optional ISO region hint (for example IL, US) used when the number has no country code."}},"required":["phone"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/confirm_owner_phone_verification":{"post":{"operationId":"confirm_owner_phone_verification","summary":"Confirm the 6-digit code the owner received on WhatsApp from start_owner_phone_verification","description":"Confirm the 6-digit code the owner received on WhatsApp from start_owner_phone_verification. On success the owner is verified: agents can message them, and platform numbers become connectable.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"The same phone number the code was sent to."},"code":{"type":"string","description":"The 6-digit code from the WhatsApp message."},"region":{"type":"string","description":"Optional ISO region hint, matching the one used when sending."}},"required":["phone","code"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/attach_agent_whatsapp":{"post":{"operationId":"attach_agent_whatsapp","summary":"Connect a platform WhatsApp number to one of the account's agents, so the owner can message that number and reach tha...","description":"Connect a platform WhatsApp number to one of the account's agents, so the owner can message that number and reach that agent. Requires the owner to be verified first. Take phone_number_id from get_agent_whatsapp. A number already used by another account is still valid to connect: it answers only this owner's verified phone.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"The agent that should answer on this number."},"phone_number_id":{"type":"string","description":"phone_number_id from get_agent_whatsapp claimable_numbers."}},"required":["agent_id","phone_number_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/detach_agent_whatsapp":{"post":{"operationId":"detach_agent_whatsapp","summary":"Disconnect the owner's WhatsApp route from a platform number","description":"Disconnect the owner's WhatsApp route from a platform number. Removes only this account's route; other accounts sharing the number keep theirs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone_number_id":{"type":"string","description":"The number to disconnect, from get_agent_whatsapp."}},"required":["phone_number_id"]}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agent_conversations":{"post":{"operationId":"list_agent_conversations","summary":"List recent visible conversations belonging to one of your agents","description":"List recent visible conversations belonging to one of your agents. Use get_agent_conversation to read replies and results.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"Owned agent ID from list_agents."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50}},"required":["agent_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/send_agent_message":{"post":{"operationId":"send_agent_message","summary":"Talk to an existing agent or assign it work using its normal tools, memory, permissions and team","description":"Talk to an existing agent or assign it work using its normal tools, memory, permissions and team. Omit conversation_id to start a new owner conversation; supply it to continue one. Returns acceptance and a durable task_id immediately, NOT a completed answer. Poll get_agent_task and read get_agent_conversation for the actual response. Work continues after MCP disconnects. A follow-up in a busy conversation uses the normal queue. Customer conversations are readable but cannot be impersonated by this tool.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"Owned agent ID from list_agents."},"message":{"type":"string","minLength":1},"conversation_id":{"type":"string","minLength":1,"description":"Conversation ID returned by these tools."}},"required":["agent_id","message"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_agent_conversation":{"post":{"operationId":"get_agent_conversation","summary":"Read visible messages, answers and result links in an owned agent's conversation","description":"Read visible messages, answers and result links in an owned agent's conversation. Returns the newest page in chronological order. For older history, pass next_before_id as before_id. For new replies, omit before_id.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"Owned agent ID from list_agents."},"conversation_id":{"type":"string","minLength":1,"description":"Conversation ID returned by these tools."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"before_id":{"type":"string"}},"required":["agent_id","conversation_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_agent_task":{"post":{"operationId":"get_agent_task","summary":"Check a durable task returned by send_agent_message or list_agent_tasks","description":"Check a durable task returned by send_agent_message or list_agent_tasks. Includes the latest execution status and pending approvals, including before a run starts. Task scheduling state is separate from run outcome. Read the conversation for the actual answer; accepted/queued is not completed. Approvals must still be decided by the owner in Fine Structure.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"Owned agent ID from list_agents."},"task_id":{"type":"string","minLength":1}},"required":["agent_id","task_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_agent":{"post":{"operationId":"get_agent","summary":"Read one agent: name, role, description, persona (its standing instructions), status, email address, WhatsApp number ...","description":"Read one agent: name, role, description, persona (its standing instructions), status, email address, WhatsApp number and which capability groups are switched on.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."}},"required":["agent_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_agent":{"post":{"operationId":"update_agent","summary":"Edit an agent's name, role, description or persona (its standing instructions)","description":"Edit an agent's name, role, description or persona (its standing instructions). Only the fields given change; the previous text is replaced. Capabilities, channels and approvals stay as they are and are changed in Fine Structure.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"name":{"type":"string","minLength":1,"maxLength":120},"role":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"persona":{"type":"string","maxLength":20000,"description":"Standing instructions: how the agent works and speaks."}},"required":["agent_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_agent_status":{"post":{"operationId":"set_agent_status","summary":"Pause, resume or archive an agent","description":"Pause, resume or archive an agent. paused: it stops working and keeps its setup. archived: it is retired from the account; use this when the owner asks to delete an agent. active: it works again. Tasks that came due while it was paused or archived were paused themselves and stay paused: the result lists them, and update_agent_task with status active resumes each one.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"status":{"type":"string","enum":["active","paused","archived"]}},"required":["agent_id","status"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agent_activity":{"post":{"operationId":"list_agent_activity","summary":"What the account's agents did, newest first: each run with its agent, status, the tools it called, agent credits used...","description":"What the account's agents did, newest first: each run with its agent, status, the tools it called, agent credits used and any error. Read the run's conversation with get_agent_conversation for the full answer.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Optional: one agent only."},"status":{"type":"string","description":"Optional run status, for example completed, failed, blocked."},"since":{"type":"string","description":"Optional ISO date or date-time, with or without an offset, or 'today' (UTC)."},"until":{"type":"string","description":"Optional ISO date or date-time, with or without an offset. A date alone includes that whole day (UTC)."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"offset":{"type":"integer","minimum":0,"default":0}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agent_approvals":{"post":{"operationId":"list_agent_approvals","summary":"Actions the agents are holding until the owner approves them, such as a message to a customer or a payment","description":"Actions the agents are holding until the owner approves them, such as a message to a customer or a payment. Each comes with a plain description and a review link. The owner approves or rejects them in Fine Structure.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Optional: one agent only."},"status":{"type":"string","enum":["pending","approved","rejected","executed","failed"],"default":"pending"},"language":{"type":"string","enum":["en","he"],"default":"en","description":"Language of the descriptions."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_credit_balance":{"post":{"operationId":"get_credit_balance","summary":"The account's plan and both balances: build credits, which pay for creating and editing apps, and agent credits, whic...","description":"The account's plan and both balances: build credits, which pay for creating and editing apps, and agent credits, which pay for agent runs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_agent_task":{"post":{"operationId":"update_agent_task","summary":"Change a scheduled task: title, instructions, schedule (same shape as schedule_agent_task), max_runs, or status activ...","description":"Change a scheduled task: title, instructions, schedule (same shape as schedule_agent_task), max_runs, or status active/paused. Only the fields given change. Returns the next run in UTC and in the schedule's timezone.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"task_id":{"type":"string","minLength":1,"description":"The task id, from list_agent_tasks."},"title":{"type":"string","minLength":1,"maxLength":200},"instructions":{"type":"string","minLength":1,"maxLength":20000},"schedule":{"type":"object"},"max_runs":{"type":"integer","minimum":0,"maximum":1000},"status":{"type":"string","enum":["active","paused"]}},"required":["agent_id","task_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/archive_agent_task":{"post":{"operationId":"archive_agent_task","summary":"Remove a scheduled task from the agent's schedule","description":"Remove a scheduled task from the agent's schedule. It never runs again and stays readable in the history. Use this when the owner asks to delete or cancel a task.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"task_id":{"type":"string","minLength":1,"description":"The task id, from list_agent_tasks."}},"required":["agent_id","task_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/run_agent_task_now":{"post":{"operationId":"run_agent_task_now","summary":"Start one run of a scheduled task now, outside its schedule","description":"Start one run of a scheduled task now, outside its schedule. The run does what the task's instructions say under the agent's permissions, so it can message people and it uses agent credits. Waits up to 15 seconds: it returns the finished task, or running true while the run goes on. Follow it with get_agent_task.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"task_id":{"type":"string","minLength":1,"description":"The task id, from list_agent_tasks."}},"required":["agent_id","task_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/stop_agent_task":{"post":{"operationId":"stop_agent_task","summary":"Stop a task now: pause its schedule and cancel the run in progress, which stops at its next safe point","description":"Stop a task now: pause its schedule and cancel the run in progress, which stops at its next safe point. Safe to repeat. Resume it later with update_agent_task status active.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"task_id":{"type":"string","minLength":1,"description":"The task id, from list_agent_tasks."},"note":{"type":"string","maxLength":500,"description":"Optional reason, kept with the record."}},"required":["agent_id","task_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/cancel_agent_run":{"post":{"operationId":"cancel_agent_run","summary":"Cancel one run in progress, for example a reply the agent is still working on","description":"Cancel one run in progress, for example a reply the agent is still working on. Work it handed to other agents is cancelled with it. Take run_id from list_agent_activity or get_agent_task.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"run_id":{"type":"string","minLength":1},"note":{"type":"string","maxLength":500,"description":"Optional reason, kept with the record."}},"required":["agent_id","run_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agent_goals":{"post":{"operationId":"list_agent_goals","summary":"An agent's goals: objective, success criteria, plan, status, progress, current step and the background runner task th...","description":"An agent's goals: objective, success criteria, plan, status, progress, current step and the background runner task that works on it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"status":{"type":"string","enum":["active","paused","completed","archived","blocked"]},"limit":{"type":"integer","minimum":1,"maximum":300,"default":100}},"required":["agent_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_agent_goal":{"post":{"operationId":"create_agent_goal","summary":"Give an agent a goal to pursue on its own","description":"Give an agent a goal to pursue on its own. It works on it every interval_minutes, at most max_iterations times, under its own permissions, so a step can message people the agent is allowed to reach. Each step uses agent credits.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"objective":{"type":"string","minLength":1,"maxLength":4000},"title":{"type":"string","maxLength":200},"success_criteria":{"type":"string","maxLength":2000},"plan":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":500}},"interval_minutes":{"type":"integer","minimum":5,"maximum":1440,"default":15},"max_iterations":{"type":"integer","minimum":1,"maximum":200,"default":20}},"required":["agent_id","objective"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_agent_goal":{"post":{"operationId":"update_agent_goal","summary":"Change a goal's title, objective, success criteria, plan, iteration cap or status","description":"Change a goal's title, objective, success criteria, plan, iteration cap or status. paused stops its runner, active starts it again, completed and archived end it. Only the fields given change.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"goal_id":{"type":"string","minLength":1,"description":"The goal id, from list_agent_goals."},"title":{"type":"string","maxLength":200},"objective":{"type":"string","minLength":1,"maxLength":4000},"success_criteria":{"type":"string","maxLength":2000},"plan":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":500}},"max_iterations":{"type":"integer","minimum":1,"maximum":200},"status":{"type":"string","enum":["active","paused","completed","archived"]}},"required":["agent_id","goal_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/archive_agent_goal":{"post":{"operationId":"archive_agent_goal","summary":"Retire a goal: its runner stops and never runs again, and the goal stays readable","description":"Retire a goal: its runner stops and never runs again, and the goal stays readable. Use this when the owner asks to delete a goal.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"goal_id":{"type":"string","minLength":1,"description":"The goal id, from list_agent_goals."}},"required":["agent_id","goal_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/run_agent_goal_now":{"post":{"operationId":"run_agent_goal_now","summary":"Work one step of a goal now, outside its interval, under the agent's permissions; it can message people and uses agen...","description":"Work one step of a goal now, outside its interval, under the agent's permissions; it can message people and uses agent credits. Waits up to 15 seconds, then returns running true while the step goes on.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"goal_id":{"type":"string","minLength":1,"description":"The goal id, from list_agent_goals."}},"required":["agent_id","goal_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_org_goals":{"post":{"operationId":"list_org_goals","summary":"The owner's company-wide goals, the shared objectives every agent aligns to, with progress","description":"The owner's company-wide goals, the shared objectives every agent aligns to, with progress.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused","done","cancelled","all"],"default":"active"}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_org_goal":{"post":{"operationId":"create_org_goal","summary":"Add a company-wide goal for the whole agent team to align to","description":"Add a company-wide goal for the whole agent team to align to.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"objective":{"type":"string","maxLength":4000}},"required":["title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_org_goal":{"post":{"operationId":"update_org_goal","summary":"Change a company-wide goal's title, objective, status (active, paused, done, cancelled) or progress (0-100)","description":"Change a company-wide goal's title, objective, status (active, paused, done, cancelled) or progress (0-100). Only the fields given change.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"goal_id":{"type":"string","minLength":1,"description":"The org goal id, from list_org_goals."},"title":{"type":"string","minLength":1,"maxLength":300},"objective":{"type":"string","maxLength":4000},"status":{"type":"string","enum":["active","paused","done","cancelled"]},"progress":{"type":"integer","minimum":0,"maximum":100}},"required":["goal_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_org_goal_updates":{"post":{"operationId":"list_org_goal_updates","summary":"The progress notes agents wrote on a company-wide goal, newest first","description":"The progress notes agents wrote on a company-wide goal, newest first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"goal_id":{"type":"string","minLength":1,"description":"The org goal id, from list_org_goals."}},"required":["goal_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agent_triggers":{"post":{"operationId":"list_agent_triggers","summary":"What starts an agent on its own: event, schedule, watch and webhook triggers, with their instructions, status and las...","description":"What starts an agent on its own: event, schedule, watch and webhook triggers, with their instructions, status and last fire. A webhook's URL carries its secret and is shown only on the agent's screen.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"trigger_type":{"type":"string","enum":["event","schedule","watch","webhook"]},"status":{"type":"string","enum":["active","paused"]},"include_archived":{"type":"boolean","default":false},"limit":{"type":"integer","minimum":1,"maximum":300,"default":100}},"required":["agent_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_agent_trigger":{"post":{"operationId":"create_agent_trigger","summary":"Add a trigger that starts the agent with these instructions: event (event_type such as lead.created, with an optional...","description":"Add a trigger that starts the agent with these instructions: event (event_type such as lead.created, with an optional source), schedule (a schedule object) or watch. Each start is a run under the agent's permissions and uses agent credits. Its approval rules stay as set in Fine Structure, and a webhook trigger, whose URL is a secret, is made on the agent's screen.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"name":{"type":"string","minLength":1,"maxLength":200},"trigger_type":{"type":"string","enum":["event","schedule","watch"],"default":"event"},"event_type":{"type":"string","maxLength":120},"source":{"type":"string","maxLength":120},"instructions":{"type":"string","maxLength":20000},"schedule":{"type":"object","description":"For trigger_type schedule or watch: the same shape as in schedule_agent_task, e.g. {\"type\":\"daily\",\"time\":\"08:30\",\"timezone\":\"Asia/Jerusalem\"}."},"status":{"type":"string","enum":["active","paused"],"default":"active"}},"required":["agent_id","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_agent_trigger":{"post":{"operationId":"update_agent_trigger","summary":"Change a trigger's name, type, event, source, instructions, schedule or status (active or paused)","description":"Change a trigger's name, type, event, source, instructions, schedule or status (active or paused). Only the fields given change. Archive it with archive_agent_trigger.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"trigger_id":{"type":"string","minLength":1,"description":"The trigger id, from list_agent_triggers."},"name":{"type":"string","minLength":1,"maxLength":200},"trigger_type":{"type":"string","enum":["event","schedule","watch"]},"event_type":{"type":"string","maxLength":120},"source":{"type":"string","maxLength":120},"instructions":{"type":"string","maxLength":20000},"schedule":{"type":"object","description":"For trigger_type schedule or watch: the same shape as in schedule_agent_task, e.g. {\"type\":\"daily\",\"time\":\"08:30\",\"timezone\":\"Asia/Jerusalem\"}."},"status":{"type":"string","enum":["active","paused"]}},"required":["agent_id","trigger_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/archive_agent_trigger":{"post":{"operationId":"archive_agent_trigger","summary":"Retire a trigger: it never starts the agent again and stays readable","description":"Retire a trigger: it never starts the agent again and stays readable. Use this when the owner asks to delete a trigger.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"trigger_id":{"type":"string","minLength":1,"description":"The trigger id, from list_agent_triggers."}},"required":["agent_id","trigger_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/run_agent_trigger_now":{"post":{"operationId":"run_agent_trigger_now","summary":"Fire a trigger once now as a test: the agent runs its instructions under its permissions, so it can message people an...","description":"Fire a trigger once now as a test: the agent runs its instructions under its permissions, so it can message people and uses agent credits. Returns at once with the task that runs it; follow it with get_agent_task.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"trigger_id":{"type":"string","minLength":1,"description":"The trigger id, from list_agent_triggers."}},"required":["agent_id","trigger_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agent_memories":{"post":{"operationId":"list_agent_memories","summary":"What an agent has learned and kept: long-term facts and insights, newest first, optionally only those about one customer","description":"What an agent has learned and kept: long-term facts and insights, newest first, optionally only those about one customer.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"The agent id, from list_agents."},"customer_id":{"type":"string","maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":300,"default":100}},"required":["agent_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_team_templates":{"post":{"operationId":"list_team_templates","summary":"Ready-made agent teams (for example a sales or a support company) that create_agent_team builds in one step, with eac...","description":"Ready-made agent teams (for example a sales or a support company) that create_agent_team builds in one step, with each member's role.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","pattern":"^[a-z]{2}(-[A-Za-z]{2})?$","description":"Language of the catalog text, e.g. en or he."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_agent_team":{"post":{"operationId":"create_agent_team","summary":"Create a whole team of agents from a template, wired to work together, optionally adapted to the owner's requirements...","description":"Create a whole team of agents from a template, wired to work together, optionally adapted to the owner's requirements and company name. The new agents start active with the platform's default safe permissions and can message only their verified owner until channels are connected in Fine Structure.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string","minLength":1,"maxLength":80,"description":"A template key from list_team_templates."},"requirements":{"type":"string","maxLength":2000},"company_name":{"type":"string","maxLength":120},"lang":{"type":"string","pattern":"^[a-z]{2}(-[A-Za-z]{2})?$","description":"Language of the catalog text, e.g. en or he."}},"required":["template"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_agent_templates":{"post":{"operationId":"list_agent_templates","summary":"Ready-made single agent templates: role, description and suggested persona, for create_agent","description":"Ready-made single agent templates: role, description and suggested persona, for create_agent.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_connections":{"post":{"operationId":"list_connections","summary":"The account's connected accounts and services (each mailbox, Drive view, MCP server, app account and so on is one con...","description":"The account's connected accounts and services (each mailbox, Drive view, MCP server, app account and so on is one connection), and whether Google Drive, Facebook and a mailbox are connected. Connecting, disconnecting and sharing a connection with an agent are done on the Connections screen in Fine Structure: https://finestructure.ai/connections","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","maxLength":60,"description":"Optional provider, for example mcp, imap, google_drive, zoom."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_connection_catalog":{"post":{"operationId":"list_connection_catalog","summary":"Every service the platform can connect, with whether this account has connected it, whether one-click sign-in is avai...","description":"Every service the platform can connect, with whether this account has connected it, whether one-click sign-in is available, and its connections.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_connection_access":{"post":{"operationId":"get_connection_access","summary":"Which of the owner's agents and apps may use one connection (from list_connections)","description":"Which of the owner's agents and apps may use one connection (from list_connections).","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connection_id":{"type":"string","minLength":1,"maxLength":120}},"required":["connection_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_connection_status":{"post":{"operationId":"get_connection_status","summary":"Status of the account-level connections: Facebook, Google Drive, TikTok and the social accounts connected through Zer...","description":"Status of the account-level connections: Facebook, Google Drive, TikTok and the social accounts connected through Zernio (Instagram, LinkedIn and others), including any that need to be reconnected. refresh true asks Zernio for the live state.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refresh":{"type":"boolean","default":false}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_facebook_ad_accounts":{"post":{"operationId":"list_facebook_ad_accounts","summary":"The ad accounts the connected Facebook account reaches, and which of them agents may use (an empty allowed list means...","description":"The ad accounts the connected Facebook account reaches, and which of them agents may use (an empty allowed list means all).","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/search_connectable_apps":{"post":{"operationId":"search_connectable_apps","summary":"Third-party apps an agent can be connected to (thousands, through the apps lane), with the account's own connections","description":"Third-party apps an agent can be connected to (thousands, through the apps lane), with the account's own connections. Search by name.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"type":"string","maxLength":120},"limit":{"type":"integer","minimum":1,"maximum":100,"default":30}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_connectable_app_tools":{"post":{"operationId":"list_connectable_app_tools","summary":"What an agent could do with one third-party app once it is connected: its actions","description":"What an agent could do with one third-party app once it is connected: its actions.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toolkit":{"type":"string","minLength":1,"maxLength":80,"description":"An app slug from search_connectable_apps."},"search":{"type":"string","maxLength":120},"limit":{"type":"integer","minimum":1,"maximum":100,"default":30}},"required":["toolkit"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_make_migration_report":{"post":{"operationId":"get_make_migration_report","summary":"Read every scenario in the owner's connected Make account and grade what moves to Fine Structure fully, partly or by ...","description":"Read every scenario in the owner's connected Make account and grade what moves to Fine Structure fully, partly or by hand. Read-only.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_event_connections":{"post":{"operationId":"list_event_connections","summary":"Incoming-events sources: external systems that send events to the account (a form, a shop, a payment provider), each ...","description":"Incoming-events sources: external systems that send events to the account (a form, a shop, a payment provider), each with its status (draft, active, paused) and its mapping steps.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_event_connection_events":{"post":{"operationId":"list_event_connection_events","summary":"The latest 100 events a source received and what each did: status, step results, errors","description":"The latest 100 events a source received and what each did: status, step results, errors.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"maxLength":80,"description":"The source id (src_...), from list_event_connections."}},"required":["source_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_event_connection_revisions":{"post":{"operationId":"list_event_connection_revisions","summary":"The saved versions of a source's configuration","description":"The saved versions of a source's configuration.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"maxLength":80,"description":"The source id (src_...), from list_event_connections."}},"required":["source_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/preview_event_connection":{"post":{"operationId":"preview_event_connection","summary":"Dry run: show what a source would do with a sample event (its identity, which steps match, the mapped contact fields)","description":"Dry run: show what a source would do with a sample event (its identity, which steps match, the mapped contact fields). Nothing is written or sent.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"maxLength":80,"description":"The source id (src_...), from list_event_connections."},"event":{"type":"object","description":"A sample event, as the external system sends it."}},"required":["source_id","event"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/pause_event_connection":{"post":{"operationId":"pause_event_connection","summary":"Pause an incoming-events source: events that arrive are kept and wait, and none is processed until the owner activate...","description":"Pause an incoming-events source: events that arrive are kept and wait, and none is processed until the owner activates it again on the Connections screen.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_id":{"type":"string","minLength":1,"maxLength":80,"description":"The source id (src_...), from list_event_connections."}},"required":["source_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_marketing_capabilities":{"post":{"operationId":"get_marketing_capabilities","summary":"Discover the complete Fine Structure /audiences marketing engine: contacts, segments, email and WhatsApp, templates, ...","description":"Discover the complete Fine Structure /audiences marketing engine: contacts, segments, email and WhatsApp, templates, campaigns, schedules, multi-step flows, inbox, event connections, automations, analytics and settings. Call with operation to get its exact inputSchema before executing it; topic='guide' explains graph and event contracts. Account token required; legacy email scopes do not grant this engine.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["activity.list","agents.create_reply","analytics","analytics.explore","assistant.approvals","assistant.decide","assistant.ensure","automations.create","automations.list","automations.update","campaigns.email","campaigns.get","campaigns.list","campaigns.message","campaigns.recipients","campaigns.run","campaigns.schedule","campaigns.scheduled","campaigns.sms","campaigns.whatsapp","contacts.export","contacts.get","contacts.history","contacts.import_file","contacts.import_text","contacts.list","contacts.preview","contacts.query","contacts.tags","contacts.upsert","dashboard","data.contact","data.get","data.history","data.preview","data.restore","data.save","drafts.get","drafts.list","drafts.save","email.confirmation","email.domain.activate","email.experiment","email.gmail.activate","email.gmail.connect","email.gmail.connections","email.policy.get","email.policy.save","email.preview","email.senders","email.templates.delete","email.templates.list","email.templates.save","email.test","events.configure","events.create","events.history","events.install_app","events.preview","events.retry","events.revisions","events.sources","flows.approve","flows.archive","flows.control","flows.create","flows.draft","flows.get","flows.launch","flows.list","flows.update","flows.validate","folders.archive","folders.create","folders.list","folders.move_item","folders.rename","inbox.capabilities","inbox.conversations","inbox.flow","inbox.media","inbox.messages","inbox.reply","library.list","lists.create","lists.delete","lists.from_filters","lists.list","notifications.queue","notifications.status","permissions.history","permissions.list","reply_rules.delete","reply_rules.list","reply_rules.save","reports.get","reports.update","settings.get","settings.update","sms.connections","sms.senders","views.get","views.save","whatsapp.account_profile","whatsapp.accounts","whatsapp.bind_agent","whatsapp.official.create","whatsapp.official.delete","whatsapp.official.duplicate","whatsapp.official.edit","whatsapp.refresh_names","whatsapp.senders","whatsapp.templates.create","whatsapp.templates.delete","whatsapp.templates.duplicate","whatsapp.templates.list","whatsapp.templates.preview","whatsapp.templates.submit","whatsapp.templates.update","whatsapp.test"]},"topic":{"type":"string","enum":["operations","guide"],"default":"operations"}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/read_marketing":{"post":{"operationId":"read_marketing","summary":"Read, query, preview, validate or export owned marketing data","description":"Read, query, preview, validate or export owned marketing data. Never sends a message. Uses the same engine as /audiences. Call get_marketing_capabilities(operation=...) for the native parameters, including body when required.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["activity.list","analytics","analytics.explore","assistant.approvals","automations.list","campaigns.get","campaigns.list","campaigns.message","campaigns.recipients","campaigns.scheduled","contacts.export","contacts.get","contacts.history","contacts.list","contacts.preview","contacts.query","contacts.tags","dashboard","data.get","data.history","data.preview","drafts.get","drafts.list","email.experiment","email.gmail.connections","email.policy.get","email.preview","email.senders","email.templates.list","events.history","events.preview","events.revisions","events.sources","flows.get","flows.list","flows.validate","folders.list","inbox.capabilities","inbox.conversations","inbox.media","inbox.messages","library.list","lists.list","notifications.status","permissions.history","permissions.list","reply_rules.list","reports.get","settings.get","sms.connections","sms.senders","views.get","whatsapp.accounts","whatsapp.senders","whatsapp.templates.list","whatsapp.templates.preview"]},"parameters":{"type":"object","description":"Exact native parameters from capability discovery; omit for parameterless operations."}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/configure_marketing":{"post":{"operationId":"configure_marketing","summary":"Prepare inert drafts, local templates, folders and preferences","description":"Prepare inert drafts, local templates, folders and preferences. Does not authorize sending. Uses the same engine as /audiences. Call get_marketing_capabilities(operation=...) for the native parameters, including body when required.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["drafts.save","email.templates.delete","email.templates.save","events.create","flows.create","flows.draft","folders.archive","folders.create","folders.move_item","folders.rename","lists.create","views.save","whatsapp.account_profile","whatsapp.official.duplicate","whatsapp.templates.create","whatsapp.templates.delete","whatsapp.templates.duplicate","whatsapp.templates.update"]},"parameters":{"type":"object","description":"Exact native parameters from capability discovery; omit for parameterless operations."}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/execute_marketing":{"post":{"operationId":"execute_marketing","summary":"Operate live marketing: contacts/imports (may trigger existing automations), campaigns, schedules, reports, official ...","description":"Operate live marketing: contacts/imports (may trigger existing automations), campaigns, schedules, reports, official Meta templates, flows, inbox replies and event connections. Can send to real people. Use only for the user's authorized operation. Read the exact schema first. A queued receipt is NOT delivery; inspect campaign/event/flow results. Uses the same engine as /audiences. Call get_marketing_capabilities(operation=...) for the native parameters, including body when required.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["agents.create_reply","assistant.decide","assistant.ensure","automations.create","automations.update","campaigns.email","campaigns.run","campaigns.schedule","campaigns.sms","campaigns.whatsapp","contacts.import_file","contacts.import_text","contacts.upsert","data.contact","data.restore","data.save","email.confirmation","email.domain.activate","email.gmail.activate","email.gmail.connect","email.policy.save","email.test","events.configure","events.install_app","events.retry","flows.approve","flows.archive","flows.control","flows.launch","flows.update","inbox.flow","inbox.reply","lists.delete","lists.from_filters","notifications.queue","reply_rules.delete","reply_rules.save","reports.update","settings.update","whatsapp.bind_agent","whatsapp.official.create","whatsapp.official.delete","whatsapp.official.edit","whatsapp.refresh_names","whatsapp.templates.submit","whatsapp.test"]},"parameters":{"type":"object","description":"Exact native parameters from capability discovery; omit for parameterless operations."}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_voice_capabilities":{"post":{"operationId":"get_voice_capabilities","summary":"Discover Fine Structure business voice agents: flows, templates, voices, rules, permissions, confirmed leads, qualifi...","description":"Discover Fine Structure business voice agents: flows, templates, voices, rules, permissions, confirmed leads, qualification, analytics, optimization, native handoffs, signed webhooks and phone routing. Operator entitlement and explicit account voice scopes required. Request an operation for its exact schema, or topic=guide for the end-to-end workflow.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["activity.get","analytics.optimize","analytics.report","calls.get","calls.list","connections.activity","connections.catalog","connections.preview","connections.retry","connections.status","documents.validate","knowledge.documents","knowledge.excerpt","leads.analyze","leads.export","leads.get","leads.list","leads.update","phone.call_owner","phone.connect","phone.lines","phone.options","profiles.author","profiles.control","profiles.create","profiles.get","profiles.list","profiles.publish","profiles.save","requests.update","revisions.get","revisions.list","revisions.restore","runs.get","service.catalog","service.check","service.configure","service.entities","service.get","service.propose","service.reconcile","simulation.start","simulation.turn","templates.create","templates.get","templates.list","templates.status","templates.update","voices.list","webhook.configure","webhook.get","webhook.retry"]},"topic":{"type":"string","enum":["operations","guide","document_schema"]}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/read_voice":{"post":{"operationId":"read_voice","summary":"Read scoped voice configuration, live calls and transcripts, lead data, analytics or provider number inventory","description":"Read scoped voice configuration, live calls and transcripts, lead data, analytics or provider number inventory. Does not place calls or change configuration. Discover exact parameters with get_voice_capabilities first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["activity.get","analytics.report","calls.get","calls.list","connections.activity","connections.catalog","connections.preview","documents.validate","knowledge.documents","knowledge.excerpt","leads.export","leads.get","leads.list","phone.lines","phone.options","profiles.get","profiles.list","revisions.get","revisions.list","runs.get","service.catalog","service.check","service.entities","service.get","templates.get","templates.list","voices.list","webhook.get"]},"parameters":{"type":"object"}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/configure_voice":{"post":{"operationId":"configure_voice","summary":"Build drafts/templates, simulate, qualify leads, update captured request stages with version checking and propose opt...","description":"Build drafts/templates, simulate, qualify leads, update captured request stages with version checking and propose optimization. AI operations incur usage. Does not publish or connect phone/webhook destinations. Discover exact parameters with get_voice_capabilities first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["analytics.optimize","leads.analyze","leads.update","profiles.author","profiles.create","profiles.save","requests.update","revisions.restore","service.propose","simulation.start","simulation.turn","templates.create","templates.status","templates.update"]},"parameters":{"type":"object"}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/execute_voice":{"post":{"operationId":"execute_voice","summary":"Operate live voice agents: publish, pause, change routing, connect webhook destinations, retry handoffs or call the v...","description":"Operate live voice agents: publish, pause, change routing, connect webhook destinations, retry handoffs or call the verified owner. Can spend money and reach external systems. Requires the user's authorization; a queued/accepted handoff is not customer delivery. Discover exact parameters with get_voice_capabilities first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["connections.retry","connections.status","phone.call_owner","phone.connect","profiles.control","profiles.publish","service.configure","service.reconcile","webhook.configure","webhook.retry"]},"parameters":{"type":"object"}},"required":["operation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_voice_campaigns":{"post":{"operationId":"list_voice_campaigns","summary":"List the account's outbound voice campaigns: name, status (draft, running, paused, stopped, completed), why it has th...","description":"List the account's outbound voice campaigns: name, status (draft, running, paused, stopped, completed), why it has that status, and the contact counters.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_voice_campaign":{"post":{"operationId":"get_voice_campaign","summary":"Read one outbound voice campaign: its full document (agent, outcomes, caller numbers, calling windows, pacing, budget...","description":"Read one outbound voice campaign: its full document (agent, outcomes, caller numbers, calling windows, pacing, budget), status and version. Pass the version to update_voice_campaign.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."}},"required":["campaign_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_voice_campaign_options":{"post":{"operationId":"get_voice_campaign_options","summary":"What a campaign may use: the account's caller numbers, its published voice flows, the voice engine and its voices, th...","description":"What a campaign may use: the account's caller numbers, its published voice flows, the voice engine and its voices, the line capacity, and whether calls are enabled for this account.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/estimate_voice_campaign":{"post":{"operationId":"estimate_voice_campaign","summary":"Expected cost and duration of a campaign document for a number of contacts, from the platform's telephony and engine ...","description":"Expected cost and duration of a campaign document for a number of contacts, from the platform's telephony and engine prices. Nothing is saved or called.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","description":"A campaign document, the same shape as in create_voice_campaign."},"contacts":{"type":"integer","minimum":1,"maximum":1000000,"default":100}},"required":["config"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_voice_campaign_stats":{"post":{"operationId":"get_voice_campaign_stats","summary":"Results of a campaign: totals, answer and success rates, cost, outcomes, A/B variants and the calls on the line now","description":"Results of a campaign: totals, answer and success rates, cost, outcomes, A/B variants and the calls on the line now.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."}},"required":["campaign_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_voice_campaign_contacts":{"post":{"operationId":"list_voice_campaign_contacts","summary":"The campaign's contacts with their status, attempts, outcome and summary, newest first","description":"The campaign's contacts with their status, attempts, outcome and summary, newest first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."},"status":{"type":"string","maxLength":40,"description":"Optional contact status, for example pending, done, failed, opted_out."},"search":{"type":"string","maxLength":120,"description":"Optional name or phone fragment."},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50},"offset":{"type":"integer","minimum":0,"maximum":1000000,"default":0}},"required":["campaign_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/export_voice_campaign_results":{"post":{"operationId":"export_voice_campaign_results","summary":"Every contact of a campaign as CSV text: phone, name, status, attempts, variant, outcome, summary, talk seconds, cost","description":"Every contact of a campaign as CSV text: phone, name, status, attempts, variant, outcome, summary, talk seconds, cost. Formula characters are escaped for spreadsheets.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."}},"required":["campaign_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_voice_campaign_rehearsals":{"post":{"operationId":"list_voice_campaign_rehearsals","summary":"The campaign's latest rehearsal calls to the owner's own phone, with what was said","description":"The campaign's latest rehearsal calls to the owner's own phone, with what was said.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."}},"required":["campaign_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_voice_campaign_do_not_call":{"post":{"operationId":"list_voice_campaign_do_not_call","summary":"The account's do-not-call list","description":"The account's do-not-call list. Numbers on it are never dialled by any campaign.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_voice_campaign":{"post":{"operationId":"create_voice_campaign","summary":"Save a new outbound voice campaign as a draft","description":"Save a new outbound voice campaign as a draft. A draft calls no one. Starting or resuming the calls is done by the owner on the campaign screen in Fine Structure; no tool here dials anyone.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"additionalProperties":false,"properties":{"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"purpose":{"default":"informational","enum":["informational","marketing"],"title":"Purpose","type":"string"},"language":{"default":"he","pattern":"^[a-z]{2}(-[A-Z]{2})?$","title":"Language","type":"string"},"agent":{"$ref":"#/$defs/Agent"},"outcomes":{"items":{"$ref":"#/$defs/Outcome"},"maxItems":12,"minItems":1,"title":"Outcomes","type":"array"},"variants":{"items":{"$ref":"#/$defs/Variant"},"maxItems":4,"minItems":1,"title":"Variants","type":"array"},"caller_numbers":{"items":{"type":"string"},"maxItems":50,"minItems":1,"title":"Caller Numbers","type":"array"},"timezone":{"default":"Asia/Jerusalem","title":"Timezone","type":"string"},"windows":{"items":{"$ref":"#/$defs/Window"},"maxItems":14,"minItems":1,"title":"Windows","type":"array"},"max_concurrent":{"default":5,"maximum":500,"minimum":1,"title":"Max Concurrent","type":"integer"},"calls_per_second":{"default":1.0,"exclusiveMinimum":0,"maximum":30,"title":"Calls Per Second","type":"number"},"max_attempts":{"default":2,"maximum":5,"minimum":1,"title":"Max Attempts","type":"integer"},"retry_after_minutes":{"default":120,"maximum":10080,"minimum":5,"title":"Retry After Minutes","type":"integer"},"max_call_seconds":{"default":300,"maximum":1800,"minimum":30,"title":"Max Call Seconds","type":"integer"},"budget_usd":{"default":0,"maximum":100000,"minimum":0,"title":"Budget Usd","type":"number"},"require_consent":{"default":false,"title":"Require Consent","type":"boolean"}},"required":["name","agent","caller_numbers"],"title":"Campaign","type":"object","description":"The campaign document: name, purpose (informational or marketing; marketing calls only contacts with recorded consent), language, agent (business_name, goal, knowledge, talking_points, questions, style; or kind flow with a published voice flow's profile_id), outcomes, caller_numbers (from get_voice_campaign_options), timezone, calling windows, pacing and budget. Every call opens with the business identity and an AI disclosure, and an opt-out is permanent."}},"required":["config"],"additionalProperties":false,"$defs":{"Agent":{"additionalProperties":false,"description":"`dynamic`: free conversation inside the goal, knowledge and outcomes below.\n`flow`: a published voice flow (its graph, actions and receipts) runs the conversation.","properties":{"kind":{"default":"dynamic","enum":["dynamic","flow"],"title":"Kind","type":"string"},"profile_id":{"default":"","maxLength":60,"title":"Profile Id","type":"string"},"business_name":{"maxLength":120,"minLength":1,"title":"Business Name","type":"string"},"agent_name":{"default":"","maxLength":60,"title":"Agent Name","type":"string"},"goal":{"maxLength":2000,"minLength":1,"title":"Goal","type":"string"},"knowledge":{"default":"","maxLength":16000,"title":"Knowledge","type":"string"},"talking_points":{"items":{"type":"string"},"maxItems":20,"title":"Talking Points","type":"array"},"questions":{"items":{"type":"string"},"maxItems":20,"title":"Questions","type":"array"},"style":{"default":"","maxLength":600,"title":"Style","type":"string"},"callback_number":{"default":"","maxLength":20,"title":"Callback Number","type":"string"},"speech":{"anyOf":[{"$ref":"#/$defs/Speech"},{"type":"null"}],"default":null}},"required":["business_name","goal"],"title":"Agent","type":"object"},"Outcome":{"additionalProperties":false,"properties":{"id":{"pattern":"^[a-z][a-z0-9_]{0,39}$","title":"Id","type":"string"},"label":{"maxLength":80,"minLength":1,"title":"Label","type":"string"},"success":{"default":false,"title":"Success","type":"boolean"}},"required":["id","label"],"title":"Outcome","type":"object"},"Speech":{"additionalProperties":false,"description":"A dedicated text-to-speech voice instead of the realtime model's own.","properties":{"provider":{"pattern":"^[a-z0-9_]{1,30}$","title":"Provider","type":"string"},"model":{"pattern":"^[A-Za-z0-9_.:-]{1,80}$","title":"Model","type":"string"},"voice":{"pattern":"^[A-Za-z0-9_.:-]{1,120}$","title":"Voice","type":"string"},"pace":{"anyOf":[{"maximum":1.5,"minimum":1.0,"type":"number"},{"type":"null"}],"default":null,"title":"Pace"},"say_as":{"additionalProperties":{"type":"string"},"maxProperties":50,"title":"Say As","type":"object"}},"required":["provider","model","voice"],"title":"Speech","type":"object"},"Variant":{"additionalProperties":false,"description":"One arm of an A/B split. Empty fields inherit the campaign's own values.","properties":{"id":{"pattern":"^[a-z][a-z0-9_]{0,19}$","title":"Id","type":"string"},"name":{"maxLength":60,"minLength":1,"title":"Name","type":"string"},"weight":{"default":50,"maximum":100,"minimum":1,"title":"Weight","type":"integer"},"opening":{"default":"","maxLength":600,"title":"Opening","type":"string"},"guidance":{"default":"","maxLength":3000,"title":"Guidance","type":"string"},"voice":{"default":"","maxLength":60,"pattern":"^[A-Za-z0-9_\\-]*$","title":"Voice","type":"string"}},"required":["id","name"],"title":"Variant","type":"object"},"Window":{"additionalProperties":false,"description":"Local calling hours. days: 0=Monday ... 6=Sunday.","properties":{"days":{"items":{"type":"integer"},"maxItems":7,"minItems":1,"title":"Days","type":"array"},"start":{"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","title":"Start","type":"string"},"end":{"pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","title":"End","type":"string"}},"required":["days","start","end"],"title":"Window","type":"object"}}}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_voice_campaign":{"post":{"operationId":"update_voice_campaign","summary":"Replace a campaign's document","description":"Replace a campaign's document. Pass the version from get_voice_campaign; a newer edit made elsewhere is refused rather than overwritten. A running campaign must be paused first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."},"version":{"type":"integer","minimum":0},"config":{"type":"object","description":"The whole campaign document, the same shape as in create_voice_campaign."}},"required":["campaign_id","version","config"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/add_voice_campaign_contacts":{"post":{"operationId":"add_voice_campaign_contacts","summary":"Add people to the call list of a campaign that is not running (a draft or a paused one) from CSV text, an Excel workb...","description":"Add people to the call list of a campaign that is not running (a draft or a paused one) from CSV text, an Excel workbook (first sheet, base64) or rows. Numbers without a country code use default_country. preview true only reads the list back. Numbers on the do-not-call list are never called. Starting or resuming the calls is done by the owner on the campaign screen in Fine Structure; no tool here dials anyone.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."},"csv":{"type":"string","maxLength":2000000},"xlsx_base64":{"type":"string","maxLength":7000000},"rows":{"type":"array","maxItems":10000,"items":{"type":"object"},"description":"Rows such as {\"phone\": \"+972501234567\", \"name\": \"Dana\"}."},"default_country":{"type":"string","pattern":"^[A-Z]{2}$","default":"IL"},"preview":{"type":"boolean","default":false}},"required":["campaign_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/add_voice_campaign_do_not_call":{"post":{"operationId":"add_voice_campaign_do_not_call","summary":"Put a number on the account's do-not-call list, permanently","description":"Put a number on the account's do-not-call list, permanently. No campaign dials it again.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":3,"maxLength":40},"reason":{"type":"string","maxLength":200}},"required":["phone"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/pause_voice_campaign":{"post":{"operationId":"pause_voice_campaign","summary":"Pause a running campaign: no new calls start, calls already on the line finish","description":"Pause a running campaign: no new calls start, calls already on the line finish. Resuming is done by the owner on the campaign screen.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."}},"required":["campaign_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/stop_voice_campaign":{"post":{"operationId":"stop_voice_campaign","summary":"Stop a running or paused campaign for good: no new calls start, and it cannot be started again","description":"Stop a running or paused campaign for good: no new calls start, and it cannot be started again.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign id (vcm_...), from list_voice_campaigns."}},"required":["campaign_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_create_property":{"post":{"operationId":"lodging_create_property","summary":"Set up a new lodging property: a complete property-management app with rooms, reservations, a housekeeping board and ...","description":"Set up a new lodging property: a complete property-management app with rooms, reservations, a housekeeping board and a booking site. configuration gives the property name, type, country, currency, language, timezone (IANA, for example America/New_York) and the room names. request_id is a new UUID; sending the same request_id again returns the same property instead of a second one. Returns the app_id every other lodging tool takes.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"format":"uuid","title":"Request Id","type":"string","description":"A new UUID for this property; sending it again is safe."},"configuration":{"additionalProperties":false,"properties":{"property_name":{"maxLength":100,"minLength":1,"title":"Property Name","type":"string"},"property_type":{"default":"inn","enum":["hotel","boutique_hotel","inn","bed_and_breakfast","guest_house","hostel","lodge","vacation_rental","motel","other"],"title":"Property Type","type":"string"},"country":{"default":"US","title":"Country","type":"string"},"currency":{"default":"USD","enum":["USD","EUR","GBP","CAD","AUD","ILS"],"title":"Currency","type":"string"},"language":{"default":"en","enum":["en","he"],"title":"Language","type":"string"},"timezone":{"title":"Timezone","type":"string"},"room_names":{"items":{"type":"string"},"maxItems":5000,"minItems":1,"title":"Room Names","type":"array"},"check_in":{"default":"15:00","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Check In","type":"string"},"check_out":{"default":"11:00","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Check Out","type":"string"},"times":{"anyOf":[{"additionalProperties":false,"description":"Optional rules on top of the default check-in and check-out.","properties":{"weekdays":{"additionalProperties":{"additionalProperties":false,"properties":{"check_in":{"anyOf":[{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","type":"string"},{"type":"null"}],"default":null,"title":"Check In"},"check_out":{"anyOf":[{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","type":"string"},{"type":"null"}],"default":null,"title":"Check Out"}},"title":"DayTimes","type":"object"},"maxProperties":7,"propertyNames":{"enum":["mon","tue","wed","thu","fri","sat","sun"]},"title":"Weekdays","type":"object"},"early_check_in":{"anyOf":[{"additionalProperties":false,"properties":{"earliest":{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Earliest","type":"string"},"price_cents":{"anyOf":[{"maximum":10000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Price Cents"}},"required":["earliest"],"title":"EarlyCheckIn","type":"object"},{"type":"null"}],"default":null},"late_check_out":{"anyOf":[{"additionalProperties":false,"properties":{"latest":{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Latest","type":"string"},"price_cents":{"anyOf":[{"maximum":10000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Price Cents"}},"required":["latest"],"title":"LateCheckOut","type":"object"},{"type":"null"}],"default":null}},"title":"StayTimes","type":"object"},{"type":"null"}],"default":null}},"required":["property_name","timezone","room_names"],"title":"LodgingConfiguration","type":"object"}},"required":["request_id","configuration"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_property":{"post":{"operationId":"lodging_get_property","summary":"The property behind an app: its configuration (name, type, country, currency, language, timezone, check-in and check-...","description":"The property behind an app: its configuration (name, type, country, currency, language, timezone, check-in and check-out), the AI team roles chosen for it and the screen links. Use it to confirm that an app from list_apps is a lodging property.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_property_settings":{"post":{"operationId":"lodging_get_property_settings","summary":"The property's settings: name, type, country, currency, language, timezone, the default check-in and check-out times ...","description":"The property's settings: name, type, country, currency, language, timezone, the default check-in and check-out times and the optional weekday, early check-in and late check-out rules.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_save_property_settings":{"post":{"operationId":"lodging_save_property_settings","summary":"Change the property's settings","description":"Change the property's settings. Only the fields given change; the rest stay as saved. times replaces the whole optional rule set (weekdays, early_check_in, late_check_out). Changing the currency is refused once money was recorded in the old one.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"revision":{"anyOf":[{"maxLength":64,"minLength":64,"type":"string"},{"type":"null"}],"default":null,"title":"Revision"},"property_name":{"maxLength":100,"minLength":1,"title":"Property Name","type":"string"},"property_type":{"enum":["hotel","boutique_hotel","inn","bed_and_breakfast","guest_house","hostel","lodge","vacation_rental","motel","other"],"title":"Property Type","type":"string"},"country":{"title":"Country","type":"string"},"currency":{"enum":["USD","EUR","GBP","CAD","AUD","ILS"],"title":"Currency","type":"string"},"language":{"enum":["en","he"],"title":"Language","type":"string"},"timezone":{"title":"Timezone","type":"string"},"check_in":{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Check In","type":"string"},"check_out":{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Check Out","type":"string"},"times":{"additionalProperties":false,"description":"Optional rules on top of the default check-in and check-out.","properties":{"weekdays":{"additionalProperties":{"additionalProperties":false,"properties":{"check_in":{"anyOf":[{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","type":"string"},{"type":"null"}],"default":null,"title":"Check In"},"check_out":{"anyOf":[{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","type":"string"},{"type":"null"}],"default":null,"title":"Check Out"}},"title":"DayTimes","type":"object"},"maxProperties":7,"propertyNames":{"enum":["mon","tue","wed","thu","fri","sat","sun"]},"title":"Weekdays","type":"object"},"early_check_in":{"anyOf":[{"additionalProperties":false,"properties":{"earliest":{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Earliest","type":"string"},"price_cents":{"anyOf":[{"maximum":10000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Price Cents"}},"required":["earliest"],"title":"EarlyCheckIn","type":"object"},{"type":"null"}],"default":null},"late_check_out":{"anyOf":[{"additionalProperties":false,"properties":{"latest":{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Latest","type":"string"},"price_cents":{"anyOf":[{"maximum":10000000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Price Cents"}},"required":["latest"],"title":"LateCheckOut","type":"object"},{"type":"null"}],"default":null}},"title":"StayTimes","type":"object"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_today":{"post":{"operationId":"lodging_get_today","summary":"Today at the property, in its own timezone: arrivals, departures, guests in house, rooms to prepare, open tasks, brea...","description":"Today at the property, in its own timezone: arrivals, departures, guests in house, rooms to prepare, open tasks, breakfast count and setup progress.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_calendar":{"post":{"operationId":"lodging_get_calendar","summary":"Rooms by night for 7, 14 or 28 nights from start (default today): each room's reservations and maintenance holds, and...","description":"Rooms by night for 7, 14 or 28 nights from start (default today): each room's reservations and maintenance holds, and how many rooms are sold each night. Rooms come in pages of page_size. search matches a room or a guest staying in that window; room_type narrows to one type.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"page":{"default":0,"maximum":1000000,"minimum":0,"title":"Page","type":"integer"},"page_size":{"default":24,"maximum":100,"minimum":1,"title":"Page Size","type":"integer"},"search":{"default":"","maxLength":200,"title":"Search","type":"string"},"room_type":{"default":"all","maxLength":200,"title":"Room Type","type":"string"},"start":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"title":"Start"},"span":{"default":14,"enum":[7,14,28],"title":"Span","type":"integer"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_list_reservations":{"post":{"operationId":"lodging_list_reservations","summary":"Reservations and holds, paged","description":"Reservations and holds, paged. search matches the guest, notes, room or reservation id. filter: all, active (confirmed or checked in), ai (booked or changed by the property's AI team), or one status: confirmed, checked_in, checked_out, cancelled, pending_payment. scope: all, arrivals or departures (today's only). sort: arrival, departure, guest or balance. Each page carries today's arrival, departure and in-house counts and the balance of every listed stay.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"page":{"default":0,"maximum":1000000,"minimum":0,"title":"Page","type":"integer"},"page_size":{"default":24,"maximum":100,"minimum":1,"title":"Page Size","type":"integer"},"search":{"default":"","maxLength":200,"title":"Search","type":"string"},"filter":{"default":"all","maxLength":40,"title":"Filter","type":"string"},"sort":{"default":"name","maxLength":30,"title":"Sort","type":"string"},"scope":{"default":"all","maxLength":30,"title":"Scope","type":"string"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_list_guests":{"post":{"operationId":"lodging_list_guests","summary":"The guest book, paged: contact details, stays, last stay and preferences","description":"The guest book, paged: contact details, stays, last stay and preferences. search matches name, email or phone. stayed_on (a date) and stayed_room (a room id) find who stayed then or there. sort: name, stays or recent.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"page":{"default":0,"maximum":1000000,"minimum":0,"title":"Page","type":"integer"},"page_size":{"default":24,"maximum":100,"minimum":1,"title":"Page Size","type":"integer"},"search":{"default":"","maxLength":200,"title":"Search","type":"string"},"sort":{"default":"name","maxLength":30,"title":"Sort","type":"string"},"stayed_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"title":"Stayed On"},"stayed_room":{"default":"","maxLength":200,"title":"Stayed Room","type":"string"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_list_rooms":{"post":{"operationId":"lodging_list_rooms","summary":"Rooms, paged, with type, capacity, amenities, floor, wing, accessibility and readiness","description":"Rooms, paged, with type, capacity, amenities, floor, wing, accessibility and readiness. filter is a readiness (ready, clean, dirty, inspection) or all; sort: name or type. Also returns the room types and how many rooms are in each readiness.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"page":{"default":0,"maximum":1000000,"minimum":0,"title":"Page","type":"integer"},"page_size":{"default":24,"maximum":100,"minimum":1,"title":"Page Size","type":"integer"},"search":{"default":"","maxLength":200,"title":"Search","type":"string"},"filter":{"default":"all","maxLength":40,"title":"Filter","type":"string"},"sort":{"default":"name","maxLength":30,"title":"Sort","type":"string"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_list_tasks":{"post":{"operationId":"lodging_list_tasks","summary":"Housekeeping and maintenance tasks, paged","description":"Housekeeping and maintenance tasks, paged. filter: all, active (not done), overdue, or a status (open, in_progress, done). assignee: all or a person as listed by lodging_list_people. sort: due or title.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"page":{"default":0,"maximum":1000000,"minimum":0,"title":"Page","type":"integer"},"page_size":{"default":24,"maximum":100,"minimum":1,"title":"Page Size","type":"integer"},"search":{"default":"","maxLength":200,"title":"Search","type":"string"},"filter":{"default":"all","maxLength":40,"title":"Filter","type":"string"},"sort":{"default":"name","maxLength":30,"title":"Sort","type":"string"},"assignee":{"default":"all","maxLength":200,"title":"Assignee","type":"string"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_list_balances":{"post":{"operationId":"lodging_list_balances","summary":"Who owes money: the largest open balances across the property, and the account entries (charges, payments, refunds, c...","description":"Who owes money: the largest open balances across the property, and the account entries (charges, payments, refunds, credits) of one reservation, stay_id or the first one listed. reservation_search narrows the reservations; search narrows the entries; sort: newest, oldest or amount. Amounts are integer cents in the property's currency.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"page":{"default":0,"maximum":1000000,"minimum":0,"title":"Page","type":"integer"},"page_size":{"default":24,"maximum":100,"minimum":1,"title":"Page Size","type":"integer"},"search":{"default":"","maxLength":200,"title":"Search","type":"string"},"sort":{"default":"name","maxLength":30,"title":"Sort","type":"string"},"stay_id":{"default":"","maxLength":200,"title":"Stay Id","type":"string"},"reservation_search":{"default":"","maxLength":200,"title":"Reservation Search","type":"string"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_report":{"post":{"operationId":"lodging_get_report","summary":"The daily report for day (default today): rooms sold, held and available that night, the money recorded that day by k...","description":"The daily report for day (default today): rooms sold, held and available that night, the money recorded that day by kind and by tax, and occupancy and revenue for the span (7, 14 or 28 days) ending that day. Amounts are integer cents in the property's currency.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"span":{"default":14,"enum":[7,14,28],"title":"Span","type":"integer"},"day":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"title":"Day"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_list_people":{"post":{"operationId":"lodging_list_people","summary":"Who can be responsible for work: the property's staff, the owner and its AI agents, with the assignee_type and assign...","description":"Who can be responsible for work: the property's staff, the owner and its AI agents, with the assignee_type and assignee_id that lodging_add_task, lodging_update_task and lodging_check_out take.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_building":{"post":{"operationId":"lodging_get_building","summary":"Every room with its floor, wing and readiness, and who is arriving, in house, departing or blocked in it today","description":"Every room with its floor, wing and readiness, and who is arriving, in house, departing or blocked in it today.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_search":{"post":{"operationId":"lodging_search","summary":"Search reservations, guests and rooms by any word: a guest name, email, phone, a room or a reservation reference","description":"Search reservations, guests and rooms by any word: a guest name, email, phone, a room or a reservation reference. scope guests searches saved guests only.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"text":{"maxLength":200,"minLength":1,"title":"Text","type":"string"},"scope":{"default":"all","enum":["all","guests"],"title":"Scope","type":"string"}},"required":["app_id","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_stay":{"post":{"operationId":"lodging_get_stay","summary":"One reservation in full: guest, room, dates, party, status, agreed times, notes, its account entries and balance, cha...","description":"One reservation in full: guest, room, dates, party, status, agreed times, notes, its account entries and balance, change history and _revision. Amounts are integer cents in the property's currency.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"}},"required":["app_id","stay_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_guest":{"post":{"operationId":"lodging_get_guest","summary":"One guest: contact details, preferences, staff notes, consent and opt-outs, and every stay","description":"One guest: contact details, preferences, staff notes, consent and opt-outs, and every stay.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"guest_id":{"maxLength":200,"minLength":1,"title":"Guest Id","type":"string"}},"required":["app_id","guest_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_day_review":{"post":{"operationId":"lodging_get_day_review","summary":"What is still open before the business day ends: arrivals not checked in, departures not checked out, rooms not ready...","description":"What is still open before the business day ends: arrivals not checked in, departures not checked out, rooms not ready, guests who left with a balance, and whether today was already closed.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_export_ledger":{"post":{"operationId":"lodging_export_ledger","summary":"The account entries of one business day (day) or one reservation (stay_id) as CSV for accounting: id, stay_id, record...","description":"The account entries of one business day (day) or one reservation (stay_id) as CSV for accounting: id, stay_id, recorded_on, kind, description, currency, amount_cents, pricing_category. Give one of the two.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"day":{"type":"string","format":"date","description":"A business date, YYYY-MM-DD."},"stay_id":{"type":"string","maxLength":200,"description":"The reservation's id, from lodging_list_reservations, lodging_get_calendar or lodging_search."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_suggest_room_names":{"post":{"operationId":"lodging_suggest_room_names","summary":"The next count room names in the property's own naming pattern (numbers, cabins, sites), for the owner to edit before...","description":"The next count room names in the property's own naming pattern (numbers, cabins, sites), for the owner to edit before lodging_add_rooms. Saves nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"count":{"maximum":200,"minimum":1,"title":"Count","type":"integer"}},"required":["app_id","count"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_add_rooms":{"post":{"operationId":"lodging_add_rooms","summary":"Add rooms by name","description":"Add rooms by name. They start in inspection readiness. request_id is a new random id (16 to 100 characters); sending the same request_id again returns the rooms already added instead of adding them twice.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"names":{"items":{"type":"string"},"maxItems":200,"minItems":1,"title":"Names","type":"array"},"request_id":{"maxLength":100,"minLength":16,"title":"Request Id","type":"string"}},"required":["app_id","names","request_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_update_room":{"post":{"operationId":"lodging_update_room","summary":"Change one room: name, room type, capacity (max_guests), amenities, floor, wing, accessibility, or readiness (ready, ...","description":"Change one room: name, room type, capacity (max_guests), amenities, floor, wing, accessibility, or readiness (ready, clean, dirty, inspection). Only the fields given change. Mark a room ready only after it was inspected; check-in requires a ready room.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"room_id":{"type":"string","minLength":1,"maxLength":200,"description":"The room's id, from lodging_list_rooms or lodging_get_building."},"expected_revision":{"type":"string","minLength":64,"maxLength":64,"description":"The record's _revision as last read. A change made since by someone else is refused, so read the record again and retry."},"name":{"type":"string","minLength":1,"maxLength":200},"room_type":{"type":"string","maxLength":2000},"max_guests":{"type":"integer","minimum":1,"maximum":50},"amenities":{"type":"string","maxLength":2000},"floor":{"type":["integer","null"],"minimum":-5,"maximum":300},"wing":{"type":"string","maxLength":80},"accessible":{"type":"boolean"},"accessibility_features":{"type":"array","maxItems":6,"uniqueItems":true,"items":{"enum":["mobility_features","roll_in_shower","transfer_shower","tub_with_grab_bars","communication_features","step_free_route"]}},"accessibility_notes":{"type":"string","maxLength":1000},"readiness":{"enum":["ready","dirty","clean","inspection"]}},"required":["app_id","room_id","expected_revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_hold_room":{"post":{"operationId":"lodging_hold_room","summary":"Block a room for maintenance from arrival to departure (departure is the first free night)","description":"Block a room for maintenance from arrival to departure (departure is the first free night). label says what the hold is for, for example 'Painting'; it shows in the calendar. request_id is a new random id (16 to 100 characters) that makes a retry safe.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"request_id":{"type":"string","minLength":16,"maxLength":100,"description":"A new random id for this create; sending it again is safe."},"room_id":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string","minLength":1,"maxLength":200,"description":"What the hold is for, shown in the calendar."},"arrival":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"departure":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":"string","maxLength":2000}},"required":["app_id","request_id","room_id","label","arrival","departure"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_release_room_hold":{"post":{"operationId":"lodging_release_room_hold","summary":"End a maintenance hold early, so the room can be booked again","description":"End a maintenance hold early, so the room can be booked again. Only for maintenance holds: cancel a guest reservation with lodging_cancel_stay.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"type":"string","minLength":1,"maxLength":200,"description":"The reservation's id, from lodging_list_reservations, lodging_get_calendar or lodging_search."},"expected_revision":{"type":"string","minLength":64,"maxLength":64,"description":"The record's _revision as last read. A change made since by someone else is refused, so read the record again and retry."}},"required":["app_id","stay_id","expected_revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_check_availability":{"post":{"operationId":"lodging_check_availability","summary":"Free rooms for arrival to departure (departure is the check-out day) and a party of adults and children, by room type...","description":"Free rooms for arrival to departure (departure is the check-out day) and a party of adults and children, by room type, with the price of each rate plan once pricing is confirmed. exclude_stay_id ignores one reservation's own nights, for checking a change. Amounts are integer cents in the property's currency.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"arrival":{"format":"date","title":"Arrival","type":"string"},"departure":{"format":"date","title":"Departure","type":"string"},"adults":{"default":1,"maximum":50,"minimum":1,"title":"Adults","type":"integer"},"children":{"default":0,"maximum":50,"minimum":0,"title":"Children","type":"integer"},"exclude_stay_id":{"default":"","maxLength":200,"title":"Exclude Stay Id","type":"string"}},"required":["app_id","arrival","departure"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_create_booking":{"post":{"operationId":"lodging_create_booking","summary":"Book a room: room_id from lodging_check_availability, arrival, departure, adults, children, and either guest_id of a ...","description":"Book a room: room_id from lodging_check_availability, arrival, departure, adults, children, and either guest_id of a saved guest or guest with a new guest's name, email and phone. request_id is a new random id (16 to 100 characters) per booking; sending it again returns the same booking. Rooms booked together share one group_id. The booking is saved without posting its price to the guest's account; post charges in Fine Structure. When the property's automatic guest messages are on, the guest gets the matching automatic message, exactly as for a change made on the screen.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"room_id":{"maxLength":200,"minLength":1,"title":"Room Id","type":"string"},"arrival":{"format":"date","title":"Arrival","type":"string"},"departure":{"format":"date","title":"Departure","type":"string"},"adults":{"maximum":50,"minimum":1,"title":"Adults","type":"integer"},"children":{"default":0,"maximum":50,"minimum":0,"title":"Children","type":"integer"},"guest_id":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Guest Id"},"guest":{"anyOf":[{"additionalProperties":false,"properties":{"name":{"maxLength":200,"minLength":1,"title":"Name","type":"string"},"email":{"default":"","maxLength":254,"title":"Email","type":"string"},"phone":{"default":"","maxLength":40,"title":"Phone","type":"string"}},"required":["name"],"title":"NewGuest","type":"object"},{"type":"null"}],"default":null},"notes":{"default":"","maxLength":2000,"title":"Notes","type":"string"},"request_id":{"maxLength":100,"minLength":16,"title":"Request Id","type":"string"},"group_id":{"anyOf":[{"maxLength":100,"minLength":16,"type":"string"},{"type":"null"}],"default":null,"title":"Group Id"}},"required":["app_id","room_id","arrival","departure","adults","request_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_change_stay":{"post":{"operationId":"lodging_change_stay","summary":"Move a reservation to another room, change its dates or its party, in two calls","description":"Move a reservation to another room, change its dates or its party, in two calls. First call without impact_digest: it returns the impact (conflicts, capacity, price difference) and an impact_digest, and changes nothing. Then call again with the same values, that impact_digest, a reason and a new random change_id (16 to 100 characters) to apply it. When the price changes, adjustment must be skip: the difference stays visible on the reservation for the desk to settle. When the property's automatic guest messages are on, the guest gets the matching automatic message, exactly as for a change made on the screen.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"},"expected_revision":{"maxLength":64,"minLength":64,"title":"Expected Revision","type":"string"},"room_id":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Room Id"},"arrival":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"title":"Arrival"},"departure":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"title":"Departure"},"adults":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Adults"},"children":{"anyOf":[{"maximum":50,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Children"},"reason":{"default":"","maxLength":500,"title":"Reason","type":"string"},"adjustment":{"enum":["skip",null]},"impact_digest":{"anyOf":[{"maxLength":64,"minLength":64,"type":"string"},{"type":"null"}],"default":null,"title":"Impact Digest"},"change_id":{"anyOf":[{"maxLength":100,"minLength":16,"type":"string"},{"type":"null"}],"default":null,"title":"Change Id"}},"required":["app_id","stay_id","expected_revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_cancel_stay":{"post":{"operationId":"lodging_cancel_stay","summary":"Cancel a confirmed reservation that has not arrived","description":"Cancel a confirmed reservation that has not arrived. reason: guest_request, no_show (on or after the arrival date), duplicate, property or other. expected_revision comes from lodging_get_stay. A cancellation fee is not posted from here. When the property's automatic guest messages are on, the guest gets the matching automatic message, exactly as for a change made on the screen.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"},"expected_revision":{"maxLength":64,"minLength":64,"title":"Expected Revision","type":"string"},"reason":{"enum":["guest_request","no_show","duplicate","property","other"],"title":"Reason","type":"string"},"note":{"default":"","maxLength":500,"title":"Note","type":"string"}},"required":["app_id","stay_id","expected_revision","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_check_in":{"post":{"operationId":"lodging_check_in","summary":"Check a guest in","description":"Check a guest in. The reservation must be confirmed, today must be within its dates, and its room ready and free.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"}},"required":["app_id","stay_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_check_out":{"post":{"operationId":"lodging_check_out","summary":"Check a guest out","description":"Check a guest out. The room becomes dirty and a cleaning task is created, optionally assigned with assignee_type and assignee_id from lodging_list_people. When the guest still owes money, acknowledge_balance_cents must equal the open balance (from lodging_get_stay) and balance_note must say how it will be settled. Amounts are integer cents in the property's currency.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"},"acknowledge_balance_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Acknowledge Balance Cents"},"balance_note":{"default":"","maxLength":1000,"title":"Balance Note","type":"string"},"assignee":{"default":"","maxLength":200,"title":"Assignee","type":"string"},"assignee_type":{"anyOf":[{"enum":["staff","agent","owner"],"type":"string"},{"type":"null"}],"default":null,"title":"Assignee Type"},"assignee_id":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Assignee Id"}},"required":["app_id","stay_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_complete_cleaning":{"post":{"operationId":"lodging_complete_cleaning","summary":"Mark the cleaning after a check-out done","description":"Mark the cleaning after a check-out done. The room becomes clean, not ready: inspect it, then set readiness ready with lodging_update_room.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"}},"required":["app_id","stay_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_set_stay_times":{"post":{"operationId":"lodging_set_stay_times","summary":"Agree a check-in or check-out time for one reservation (HH:MM), or clear it with null to follow the property's rules","description":"Agree a check-in or check-out time for one reservation (HH:MM), or clear it with null to follow the property's rules. A guest already checked in can change only the check-out time. An early check-in or late check-out price is not posted from here.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"},"expected_revision":{"maxLength":64,"minLength":64,"title":"Expected Revision","type":"string"},"check_in_time":{"anyOf":[{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","type":"string"},{"type":"null"}],"default":null,"title":"Check In Time"},"check_out_time":{"anyOf":[{"pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","type":"string"},{"type":"null"}],"default":null,"title":"Check Out Time"}},"required":["app_id","stay_id","expected_revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_set_stay_note":{"post":{"operationId":"lodging_set_stay_note","summary":"Write the staff-only note on a reservation","description":"Write the staff-only note on a reservation. It is never shown or sent to the guest. It replaces the previous note.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"type":"string","minLength":1,"maxLength":200,"description":"The reservation's id, from lodging_list_reservations, lodging_get_calendar or lodging_search."},"expected_revision":{"type":"string","minLength":64,"maxLength":64,"description":"The record's _revision as last read. A change made since by someone else is refused, so read the record again and retry."},"internal_note":{"type":"string","maxLength":2000,"description":"Staff-only note about this reservation. Never show or send it to the guest."}},"required":["app_id","stay_id","expected_revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_booking_inbox":{"post":{"operationId":"lodging_get_booking_inbox","summary":"New bookings from the booking site, online payments that need review, and holds still waiting for payment","description":"New bookings from the booking site, online payments that need review, and holds still waiting for payment.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_mark_booking_inbox_seen":{"post":{"operationId":"lodging_mark_booking_inbox_seen","summary":"Mark the booking-site inbox as seen up to until, the newest confirmed_at the owner has read","description":"Mark the booking-site inbox as seen up to until, the newest confirmed_at the owner has read.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"until":{"maxLength":32,"minLength":19,"title":"Until","type":"string"}},"required":["app_id","until"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_update_guest":{"post":{"operationId":"lodging_update_guest","summary":"Change a guest's name, email, phone or preferences","description":"Change a guest's name, email, phone or preferences. Only the fields given change.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"guest_id":{"type":"string","minLength":1,"maxLength":200,"description":"The guest's id, from lodging_list_guests or lodging_search."},"expected_revision":{"type":"string","minLength":64,"maxLength":64,"description":"The record's _revision as last read. A change made since by someone else is refused, so read the record again and retry."},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":40},"preferences":{"type":"string","maxLength":2000}},"required":["app_id","guest_id","expected_revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_add_guest_note":{"post":{"operationId":"lodging_add_guest_note","summary":"Add a staff note to a guest, signed with who wrote it","description":"Add a staff note to a guest, signed with who wrote it. request_id is a new random id (16 to 100 characters) that makes a retry safe.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"guest_id":{"maxLength":200,"minLength":1,"title":"Guest Id","type":"string"},"text":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"request_id":{"anyOf":[{"maxLength":100,"minLength":16,"type":"string"},{"type":"null"}],"default":null,"title":"Request Id"}},"required":["app_id","guest_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_edit_guest_note":{"post":{"operationId":"lodging_edit_guest_note","summary":"Rewrite a staff note on a guest","description":"Rewrite a staff note on a guest. Only the note's author may. expected_version is the note's version as read with lodging_get_guest.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"guest_id":{"maxLength":200,"minLength":1,"title":"Guest Id","type":"string"},"note_id":{"anyOf":[{"maxLength":100,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Note Id"},"text":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"expected_version":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Expected Version"}},"required":["app_id","guest_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_import_guests":{"post":{"operationId":"lodging_import_guests","summary":"Add guests to the guest book from a list (name, email, phone, preferences)","description":"Add guests to the guest book from a list (name, email, phone, preferences). With preview true (the default) it reports what would be added and which rows match saved guests, and saves nothing; then send the same rows and request_id with preview false. request_id is a new random id (16 to 100 characters).","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"rows":{"items":{"additionalProperties":false,"properties":{"name":{"maxLength":200,"minLength":1,"title":"Name","type":"string"},"email":{"default":"","maxLength":254,"title":"Email","type":"string"},"phone":{"default":"","maxLength":40,"title":"Phone","type":"string"},"preferences":{"default":"","maxLength":2000,"title":"Preferences","type":"string"}},"required":["name"],"title":"GuestRow","type":"object"},"maxItems":2000,"minItems":1,"title":"Rows","type":"array"},"request_id":{"maxLength":100,"minLength":16,"title":"Request Id","type":"string"},"preview":{"default":true,"title":"Preview","type":"boolean"}},"required":["app_id","rows","request_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_add_task":{"post":{"operationId":"lodging_add_task","summary":"Create a housekeeping or maintenance task: title, optionally a room, a due date and who is responsible (assignee_type...","description":"Create a housekeeping or maintenance task: title, optionally a room, a due date and who is responsible (assignee_type and assignee_id from lodging_list_people, or a name in assignee). status starts open. request_id is a new random id (16 to 100 characters) that makes a retry safe.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"request_id":{"type":"string","minLength":16,"maxLength":100,"description":"A new random id for this create; sending it again is safe."},"title":{"type":"string","minLength":1,"maxLength":200},"room_id":{"type":["string","null"],"minLength":1,"maxLength":200},"due_date":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Optional deadline in the property's local calendar. Derive it from the owner's instruction or an actual related stay; do not invent a deadline when neither supplies one."},"status":{"enum":["open","in_progress","done"],"default":"open"},"assignee":{"type":"string","maxLength":200,"description":"Name of who is responsible, as the workspace shows it. With assignee_type and assignee_id it is the name of that staff member, owner or AI agent when the work was assigned. Without them it is a name typed as text, which the workspace offers to link to a real person. Leave empty if no assignee was specified. The AI that creates the record is recorded separately in created_by; it is not the person doing physical cleaning or maintenance."},"assignee_type":{"type":["string","null"],"enum":["staff","agent","owner",null],"description":"What assignee_id refers to: staff (a property employee's sign-in), owner, or agent (one of this property's AI agents). Empty when nobody is assigned or only a name was typed."},"assignee_id":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"The employee's sign-in id, the owner's user id or the AI agent's id. Always set together with assignee_type."}},"required":["app_id","request_id","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_update_task":{"post":{"operationId":"lodging_update_task","summary":"Change a task: title, room, due date, status (open, in_progress, done) or who is responsible","description":"Change a task: title, room, due date, status (open, in_progress, done) or who is responsible. A cleaning task made by a check-out can only change hands; finish it with lodging_complete_cleaning.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"task_id":{"type":"string","minLength":1,"maxLength":200,"description":"The task's id, from lodging_list_tasks."},"expected_revision":{"type":"string","minLength":64,"maxLength":64,"description":"The record's _revision as last read. A change made since by someone else is refused, so read the record again and retry."},"title":{"type":"string","minLength":1,"maxLength":200},"room_id":{"type":["string","null"],"minLength":1,"maxLength":200},"due_date":{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Optional deadline in the property's local calendar. Derive it from the owner's instruction or an actual related stay; do not invent a deadline when neither supplies one."},"status":{"enum":["open","in_progress","done"]},"assignee":{"type":"string","maxLength":200,"description":"Name of who is responsible, as the workspace shows it. With assignee_type and assignee_id it is the name of that staff member, owner or AI agent when the work was assigned. Without them it is a name typed as text, which the workspace offers to link to a real person. Leave empty if no assignee was specified. The AI that creates the record is recorded separately in created_by; it is not the person doing physical cleaning or maintenance."},"assignee_type":{"type":["string","null"],"enum":["staff","agent","owner",null],"description":"What assignee_id refers to: staff (a property employee's sign-in), owner, or agent (one of this property's AI agents). Empty when nobody is assigned or only a name was typed."},"assignee_id":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"The employee's sign-in id, the owner's user id or the AI agent's id. Always set together with assignee_type."}},"required":["app_id","task_id","expected_revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_create_stayover_tasks":{"post":{"operationId":"lodging_create_stayover_tasks","summary":"Create today's daily room-service task for every occupied room","description":"Create today's daily room-service task for every occupied room. Repeating it adds nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_close_day":{"post":{"operationId":"lodging_close_day","summary":"Record that the business day was reviewed: who closed it, when, and what was still open","description":"Record that the business day was reviewed: who closed it, when, and what was still open. business_date is today's date from lodging_get_day_review.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"business_date":{"format":"date","title":"Business Date","type":"string"},"note":{"default":"","maxLength":1000,"title":"Note","type":"string"}},"required":["app_id","business_date"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_pricing":{"post":{"operationId":"lodging_get_pricing","summary":"Rate plans (nightly price, minimum nights, cancellation terms, rooms, seasonal prices), taxes and fees, and whether t...","description":"Rate plans (nightly price, minimum nights, cancellation terms, rooms, seasonal prices), taxes and fees, and whether the owner confirmed the tax rules. Amounts are integer cents in the property's currency.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_save_pricing":{"post":{"operationId":"lodging_save_pricing","summary":"Save rate plans and taxes","description":"Save rate plans and taxes. Only the fields given change, but plans and taxes are each replaced whole: send every plan (or every tax) as read with lodging_get_pricing, changed as needed. tax_rules_confirmed true says the owner checked the taxes against their jurisdiction; prices are offered only after that. Amounts are integer cents in the property's currency.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"revision":{"anyOf":[{"maxLength":64,"minLength":64,"type":"string"},{"type":"null"}],"default":null,"title":"Revision"},"plans":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[a-z0-9_-]{1,40}$","title":"Id","type":"string"},"name":{"maxLength":100,"minLength":1,"title":"Name","type":"string"},"nightly_cents":{"maximum":10000000,"minimum":0,"title":"Nightly Cents","type":"integer"},"minimum_nights":{"default":1,"maximum":365,"minimum":1,"title":"Minimum Nights","type":"integer"},"cancellation_terms":{"default":"","maxLength":2000,"title":"Cancellation Terms","type":"string"},"room_ids":{"items":{"type":"string"},"maxItems":5000,"title":"Room Ids","type":"array"},"seasons":{"items":{"additionalProperties":false,"properties":{"start":{"format":"date","title":"Start","type":"string"},"end":{"format":"date","title":"End","type":"string"},"nightly_cents":{"maximum":10000000,"minimum":0,"title":"Nightly Cents","type":"integer"}},"required":["start","end","nightly_cents"],"title":"SeasonalRate","type":"object"},"maxItems":40,"title":"Seasons","type":"array"}},"required":["id","name","nightly_cents"],"title":"RatePlan","type":"object"},"maxItems":30,"title":"Plans","type":"array"},"taxes":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[a-z0-9_-]{1,40}$","title":"Id","type":"string"},"name":{"maxLength":100,"minLength":1,"title":"Name","type":"string"},"kind":{"enum":["percent","per_night","per_stay"],"title":"Kind","type":"string"},"value":{"anyOf":[{"maximum":100000.0,"minimum":0.0,"type":"number"},{"type":"string"}],"title":"Value"},"category":{"default":"tax","enum":["tax","fee"],"title":"Category","type":"string"},"jurisdiction":{"default":"","maxLength":100,"title":"Jurisdiction","type":"string"},"taxable":{"default":false,"title":"Taxable","type":"boolean"},"long_stay_exemption":{"anyOf":[{"additionalProperties":false,"description":"A stay at or past this many nights is exempt, as many US occupancy taxes allow.\n\nwhole_stay: a stay booked for at least `nights` nights pays none of this rule.\nlater_nights: the first `nights` nights are charged, the nights after them are not.\nThe owner confirms which one their jurisdiction uses; nothing is assumed.","properties":{"nights":{"maximum":3650,"minimum":2,"title":"Nights","type":"integer"},"scope":{"default":"whole_stay","enum":["whole_stay","later_nights"],"title":"Scope","type":"string"}},"required":["nights"],"title":"LongStayExemption","type":"object"},{"type":"null"}],"default":null}},"required":["id","name","kind","value"],"title":"TaxRule","type":"object"},"maxItems":20,"title":"Taxes","type":"array"},"tax_rules_confirmed":{"default":false,"title":"Tax Rules Confirmed","type":"boolean"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_quote_stay":{"post":{"operationId":"lodging_quote_stay","summary":"The price of one reservation under a rate plan: nights, subtotal, each tax and fee, total, and any tax exemption","description":"The price of one reservation under a rate plan: nights, subtotal, each tax and fee, total, and any tax exemption. Posts nothing. Amounts are integer cents in the property's currency.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"},"plan_id":{"maxLength":40,"minLength":1,"title":"Plan Id","type":"string"},"tax_exemption":{"anyOf":[{"additionalProperties":false,"description":"Taxes a guest does not pay, with the certificate or proof the property keeps.","properties":{"tax_ids":{"items":{"type":"string"},"maxItems":20,"minItems":1,"title":"Tax Ids","type":"array"},"reason":{"enum":["government","nonprofit","diplomat","permanent_resident","other"],"title":"Reason","type":"string"},"reference":{"default":"","maxLength":200,"title":"Reference","type":"string"}},"required":["tax_ids","reason"],"title":"TaxExemption","type":"object"},{"type":"null"}],"default":null}},"required":["app_id","stay_id","plan_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_list_staff":{"post":{"operationId":"lodging_list_staff","summary":"The property's staff sign-ins with their roles: lodging_manager, lodging_frontdesk, lodging_housekeeping, lodging_acc...","description":"The property's staff sign-ins with their roles: lodging_manager, lodging_frontdesk, lodging_housekeeping, lodging_accounting, or user (no property access).","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_set_staff_role":{"post":{"operationId":"lodging_set_staff_role","summary":"Change a staff member's role","description":"Change a staff member's role. role user takes their property access away. expected_role is the role as last read; a role changed meanwhile is refused.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"user_id":{"title":"User Id","type":"string"},"expected_role":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Expected Role"},"role":{"enum":["user","lodging_manager","lodging_frontdesk","lodging_housekeeping","lodging_accounting"],"title":"Role","type":"string"}},"required":["app_id","user_id","role"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_booking_site":{"post":{"operationId":"lodging_get_booking_site","summary":"The booking site guests book on: whether it is on, its texts, photos, theme, room-type descriptions, accessibility st...","description":"The booking site guests book on: whether it is on, its texts, photos, theme, room-type descriptions, accessibility statement, the public link, what is still missing before it can take bookings, and the payment connection.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_save_booking_site":{"post":{"operationId":"lodging_save_booking_site","summary":"Change the booking site","description":"Change the booking site. Only the fields given change. enabled true publishes it at its public link, and is refused until online payments are connected and pricing is confirmed. Turning it on also removes the property's example guests and stays. Prepayment rules stay as set in Fine Structure.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"revision":{"anyOf":[{"maxLength":64,"minLength":64,"type":"string"},{"type":"null"}],"default":null,"title":"Revision"},"enabled":{"default":false,"title":"Enabled","type":"boolean"},"headline":{"default":"","maxLength":120,"title":"Headline","type":"string"},"description":{"default":"","maxLength":3000,"title":"Description","type":"string"},"address":{"default":"","maxLength":200,"title":"Address","type":"string"},"photos":{"items":{"maxLength":1000,"pattern":"^(https://|/api/uploads/)[^\\s\"\\'<>]+$","type":"string"},"maxItems":12,"title":"Photos","type":"array"},"contact_email":{"default":"","maxLength":254,"title":"Contact Email","type":"string"},"contact_phone":{"default":"","maxLength":40,"title":"Contact Phone","type":"string"},"theme":{"default":"forest","enum":["silver","forest","sand"],"title":"Theme","type":"string"},"room_types":{"additionalProperties":{"additionalProperties":false,"properties":{"description":{"default":"","maxLength":1500,"title":"Description","type":"string"},"photos":{"items":{"maxLength":1000,"pattern":"^(https://|/api/uploads/)[^\\s\"\\'<>]+$","type":"string"},"maxItems":12,"title":"Photos","type":"array"}},"title":"RoomTypeContent","type":"object"},"maxProperties":100,"title":"Room Types","type":"object"},"accessibility":{"default":"","maxLength":1500,"title":"Accessibility","type":"string"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_brand":{"post":{"operationId":"lodging_get_brand","summary":"The name guests see, the logo and the colours of the booking site and guest emails","description":"The name guests see, the logo and the colours of the booking site and guest emails.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_save_brand":{"post":{"operationId":"lodging_save_brand","summary":"Change the name guests see and the colours (primary and accent, #rrggbb), or replace or remove the logo (logo as a da...","description":"Change the name guests see and the colours (primary and accent, #rrggbb), or replace or remove the logo (logo as a data: URL or base64 PNG, JPEG, WebP or SVG). Only the fields given change. The booking site and guest emails show it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"revision":{"anyOf":[{"maxLength":64,"minLength":64,"type":"string"},{"type":"null"}],"default":null,"title":"Revision"},"primary":{"anyOf":[{"pattern":"^#[0-9a-fA-F]{6}$","type":"string"},{"type":"null"}],"default":null,"title":"Primary"},"accent":{"anyOf":[{"pattern":"^#[0-9a-fA-F]{6}$","type":"string"},{"type":"null"}],"default":null,"title":"Accent"},"display_name":{"default":"","maxLength":80,"title":"Display Name","type":"string"},"source":{"default":"manual","enum":["default","logo","manual"],"title":"Source","type":"string"},"logo":{"anyOf":[{"maxLength":7200000,"minLength":16,"type":"string"},{"type":"null"}],"default":null,"title":"Logo"},"logo_raster":{"anyOf":[{"maxLength":3000000,"minLength":16,"type":"string"},{"type":"null"}],"default":null,"title":"Logo Raster"},"remove_logo":{"default":false,"title":"Remove Logo","type":"boolean"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_agent_work":{"post":{"operationId":"lodging_get_agent_work","summary":"What the property's AI team did: each agent's recent work, messages it sent with their delivery, work in progress, an...","description":"What the property's AI team did: each agent's recent work, messages it sent with their delivery, work in progress, and actions waiting for the owner's approval.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_attention":{"post":{"operationId":"lodging_get_attention","summary":"What needs a person now, newest first: new online bookings, payment reviews, channel conflicts, failed guest messages...","description":"What needs a person now, newest first: new online bookings, payment reviews, channel conflicts, failed guest messages, approvals, overdue tasks. Each item has an id for lodging_mark_attention_read.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_mark_attention_read":{"post":{"operationId":"lodging_mark_attention_read","summary":"Mark attention items read for the connected owner: ids, or all true with until set to the generated_at of the list th...","description":"Mark attention items read for the connected owner: ids, or all true with until set to the generated_at of the list that was read, so nothing newer is covered.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"ids":{"items":{"maxLength":300,"minLength":1,"type":"string"},"maxItems":100,"title":"Ids","type":"array"},"all":{"default":false,"title":"All","type":"boolean"},"until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Until"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_channels":{"post":{"operationId":"lodging_get_channels","summary":"Calendar sync with Airbnb, Booking.com, Vrbo and others: each room's imported calendar links with their last sync and...","description":"Calendar sync with Airbnb, Booking.com, Vrbo and others: each room's imported calendar links with their last sync and errors, the room's export link to paste into those channels, and double-booking conflicts.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_channel_alerts":{"post":{"operationId":"lodging_get_channel_alerts","summary":"Open channel-sync problems: failing calendar links and double bookings that need a decision","description":"Open channel-sync problems: failing calendar links and double bookings that need a decision.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_add_calendar_feed":{"post":{"operationId":"lodging_add_calendar_feed","summary":"Import a booking channel's calendar (an iCal link, https) into one room: its bookings block the room here","description":"Import a booking channel's calendar (an iCal link, https) into one room: its bookings block the room here. channel: airbnb, booking, vrbo, expedia, agoda, other. It is read at once and then on a schedule.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"room_id":{"maxLength":200,"minLength":1,"title":"Room Id","type":"string"},"url":{"maxLength":2000,"minLength":10,"title":"Url","type":"string"},"channel":{"default":"","pattern":"^(|airbnb|booking|vrbo|expedia|agoda|other)$","title":"Channel","type":"string"},"label":{"default":"","maxLength":40,"title":"Label","type":"string"}},"required":["app_id","room_id","url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_sync_calendar_feed":{"post":{"operationId":"lodging_sync_calendar_feed","summary":"Read one imported calendar link now instead of waiting for its schedule","description":"Read one imported calendar link now instead of waiting for its schedule.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"feed_id":{"maxLength":80,"minLength":1,"title":"Feed Id","type":"string"}},"required":["app_id","feed_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_remove_calendar_feed":{"post":{"operationId":"lodging_remove_calendar_feed","summary":"Stop importing one calendar link","description":"Stop importing one calendar link. The future blocks it created are released and the link's import history goes with it; to resume, add the link again.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"feed_id":{"maxLength":80,"minLength":1,"title":"Feed Id","type":"string"}},"required":["app_id","feed_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_rotate_calendar_export":{"post":{"operationId":"lodging_rotate_calendar_export","summary":"Replace a room's calendar export link with a new secret one","description":"Replace a room's calendar export link with a new secret one. The old link stops working at once, so every channel that reads it must be given the new link.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"room_id":{"maxLength":200,"minLength":1,"title":"Room Id","type":"string"}},"required":["app_id","room_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_dismiss_calendar_conflict":{"post":{"operationId":"lodging_dismiss_calendar_conflict","summary":"Mark one double-booking conflict from a calendar link as reviewed, so it stops being flagged","description":"Mark one double-booking conflict from a calendar link as reviewed, so it stops being flagged.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"feed_id":{"maxLength":80,"minLength":1,"title":"Feed Id","type":"string"},"uid":{"maxLength":300,"minLength":1,"title":"Uid","type":"string"}},"required":["app_id","feed_id","uid"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_channel_manager":{"post":{"operationId":"lodging_get_channel_manager","summary":"The Channex channel-manager connection: whether the property is linked, how room types and rate plans map to Channex,...","description":"The Channex channel-manager connection: whether the property is linked, how room types and rate plans map to Channex, recent availability and price updates sent, and bookings received.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_connect_channel_manager":{"post":{"operationId":"lodging_connect_channel_manager","summary":"Link the property to Channex, which sends its availability and prices to Booking.com, Airbnb, Expedia and other chann...","description":"Link the property to Channex, which sends its availability and prices to Booking.com, Airbnb, Expedia and other channels and brings their bookings back. property_id links an existing Channex property; without it a new one is created. Linking removes the property's example guests and stays.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"property_id":{"default":"","maxLength":64,"title":"Property Id","type":"string"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_map_channel_manager":{"post":{"operationId":"lodging_map_channel_manager","summary":"Map room types and rate plans to Channex: room_types maps each room type here to a Channex room type id, rate_plans m...","description":"Map room types and rate plans to Channex: room_types maps each room type here to a Channex room type id, rate_plans maps 'plan_id|room_type' pairs to Channex rate plan ids. create_missing true creates missing Channex rate plans.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"room_types":{"additionalProperties":{"type":"string"},"maxProperties":200,"title":"Room Types","type":"object"},"rate_plans":{"additionalProperties":{"type":"string"},"maxProperties":2000,"title":"Rate Plans","type":"object"},"create_missing":{"default":false,"title":"Create Missing","type":"boolean"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_sync_channel_manager":{"post":{"operationId":"lodging_sync_channel_manager","summary":"Send every night's availability and prices to Channex now, for the whole booking horizon","description":"Send every night's availability and prices to Channex now, for the whole booking horizon. What channels sell changes with it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_retry_channel_manager":{"post":{"operationId":"lodging_retry_channel_manager","summary":"Retry the availability and price updates to Channex that failed, after the problem was fixed","description":"Retry the availability and price updates to Channex that failed, after the problem was fixed.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_disconnect_channel_manager":{"post":{"operationId":"lodging_disconnect_channel_manager","summary":"Stop sending to and receiving from Channex","description":"Stop sending to and receiving from Channex. Saved reservations and history stay; the room mapping and queued updates are removed. Connect again to resume.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_open_channel_connections":{"post":{"operationId":"lodging_open_channel_connections","summary":"A one-time link, valid 15 minutes, to Channex's own screen where the owner connects Booking.com, Airbnb and other cha...","description":"A one-time link, valid 15 minutes, to Channex's own screen where the owner connects Booking.com, Airbnb and other channels to this property. Give the link to the owner to open.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_pull_channel_bookings":{"post":{"operationId":"lodging_pull_channel_bookings","summary":"Fetch new and changed bookings from Channex now instead of waiting for the next delivery","description":"Fetch new and changed bookings from Channex now instead of waiting for the next delivery.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_retry_channel_booking":{"post":{"operationId":"lodging_retry_channel_booking","summary":"Place a channel booking that could not be placed (no free or mapped room) again, after the desk freed or mapped a room","description":"Place a channel booking that could not be placed (no free or mapped room) again, after the desk freed or mapped a room. revision_id from lodging_get_channel_manager.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"revision_id":{"maxLength":64,"minLength":1,"title":"Revision Id","type":"string"}},"required":["app_id","revision_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_dismiss_channel_booking":{"post":{"operationId":"lodging_dismiss_channel_booking","summary":"Mark a channel booking that could not be placed as handled by hand, so it stops being flagged","description":"Mark a channel booking that could not be placed as handled by hand, so it stops being flagged.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"revision_id":{"maxLength":64,"minLength":1,"title":"Revision Id","type":"string"}},"required":["app_id","revision_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_guest_messages_settings":{"post":{"operationId":"lodging_get_guest_messages_settings","summary":"The automatic guest messages: whether they are on, owner approval or automatic sending, the channel, quiet hours, the...","description":"The automatic guest messages: whether they are on, owner approval or automatic sending, the channel, quiet hours, the property details they insert, and each message's timing and texts.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_preview_guest_message":{"post":{"operationId":"lodging_preview_guest_message","summary":"How one automatic message reads with sample guest details: subject, body and the WhatsApp wording","description":"How one automatic message reads with sample guest details: subject, body and the WhatsApp wording. kind is the message (as named in the settings' rules). settings defaults to the saved settings; pass edited settings to preview a draft. Sends nothing.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"settings":{"additionalProperties":false,"properties":{"revision":{"anyOf":[{"maxLength":64,"minLength":64,"type":"string"},{"type":"null"}],"default":null,"title":"Revision"},"enabled":{"default":false,"title":"Enabled","type":"boolean"},"approval":{"default":"auto","enum":["auto","owner"],"title":"Approval","type":"string"},"channel":{"default":"whatsapp_first","enum":["whatsapp_first","email_only"],"title":"Channel","type":"string"},"quiet_start":{"default":"21:00","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Quiet Start","type":"string"},"quiet_end":{"default":"08:00","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"Quiet End","type":"string"},"address":{"default":"","maxLength":300,"title":"Address","type":"string"},"wifi_name":{"default":"","maxLength":100,"title":"Wifi Name","type":"string"},"wifi_password":{"default":"","maxLength":100,"title":"Wifi Password","type":"string"},"booking_url":{"default":"","maxLength":500,"title":"Booking Url","type":"string"},"review_url":{"default":"","maxLength":500,"title":"Review Url","type":"string"},"reply_to":{"default":"","maxLength":254,"title":"Reply To","type":"string"},"rules":{"additionalProperties":{"additionalProperties":false,"properties":{"enabled":{"default":true,"title":"Enabled","type":"boolean"},"days":{"default":0,"maximum":365,"minimum":0,"title":"Days","type":"integer"},"at":{"default":"10:00","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$","title":"At","type":"string"},"subject_en":{"maxLength":150,"minLength":1,"title":"Subject En","type":"string"},"text_en":{"maxLength":2000,"minLength":1,"title":"Text En","type":"string"},"subject_he":{"maxLength":150,"minLength":1,"title":"Subject He","type":"string"},"text_he":{"maxLength":2000,"minLength":1,"title":"Text He","type":"string"}},"required":["subject_en","text_en","subject_he","text_he"],"title":"Rule","type":"object"},"propertyNames":{"enum":["confirmation","pre_arrival","check_in","mid_stay","thank_you","come_back","cancellation","change"]},"title":"Rules","type":"object"}},"title":"MessagingSettings","type":"object"},"kind":{"enum":["confirmation","pre_arrival","check_in","mid_stay","thank_you","come_back","cancellation","change"],"title":"Kind","type":"string"},"language":{"default":"en","enum":["en","he"],"title":"Language","type":"string"}},"required":["app_id","kind"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_stay_messages":{"post":{"operationId":"lodging_get_stay_messages","summary":"The automatic messages of one reservation: planned, sent, delivered, failed or skipped, with the reason","description":"The automatic messages of one reservation: planned, sent, delivered, failed or skipped, with the reason.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"stay_id":{"maxLength":200,"minLength":1,"title":"Stay Id","type":"string"}},"required":["app_id","stay_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_list_pending_guest_messages":{"post":{"operationId":"lodging_list_pending_guest_messages","summary":"Automatic messages waiting for the owner's approval before they go to guests","description":"Automatic messages waiting for the owner's approval before they go to guests.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_get_whatsapp_templates":{"post":{"operationId":"lodging_get_whatsapp_templates","summary":"The property's WhatsApp message templates on the owner's WhatsApp Business number and Meta's review status of each, r...","description":"The property's WhatsApp message templates on the owner's WhatsApp Business number and Meta's review status of each, refreshed from Meta.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_submit_whatsapp_templates":{"post":{"operationId":"lodging_submit_whatsapp_templates","summary":"Submit the property's WhatsApp message templates to Meta for review on the owner's WhatsApp Business number","description":"Submit the property's WhatsApp message templates to Meta for review on the owner's WhatsApp Business number. Sends nothing to guests.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_count_past_guests":{"post":{"operationId":"lodging_count_past_guests","summary":"How many guests stayed in the last months, how many agreed to receive offers, and how many of those can be reached by...","description":"How many guests stayed in the last months, how many agreed to receive offers, and how many of those can be reached by email or WhatsApp.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"months":{"default":12,"maximum":36,"minimum":1,"title":"Months","type":"integer"}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/lodging_prepare_past_guest_campaign":{"post":{"operationId":"lodging_prepare_past_guest_campaign","summary":"Refresh the marketing list of past guests who agreed to receive offers and open a campaign draft on it for email or a...","description":"Refresh the marketing list of past guests who agreed to receive offers and open a campaign draft on it for email or a WhatsApp template. Sends nothing: the draft is reviewed and sent in Fine Structure's campaigns screen.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":200,"description":"The property's app id, from list_apps. A lodging tool answers 'Property not found' for an app that is not a lodging property."},"months":{"default":12,"maximum":36,"minimum":1,"title":"Months","type":"integer"},"channel":{"enum":["email","whatsapp_template"],"title":"Channel","type":"string"}},"required":["app_id","channel"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_knowledge_notebooks":{"post":{"operationId":"list_knowledge_notebooks","summary":"The knowledge notebooks of the owner's Business Brain, or of one app: title, folder, how many documents and their state","description":"The knowledge notebooks of the owner's Business Brain, or of one app: title, folder, how many documents and their state. Agents and apps answer from notebooks they are given.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_knowledge_folders":{"post":{"operationId":"list_knowledge_folders","summary":"The folders the notebooks are filed in, nested","description":"The folders the notebooks are filed in, nested.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_knowledge_documents":{"post":{"operationId":"list_knowledge_documents","summary":"The documents (sources) of a notebook: name, type, status (queued, processing, ready, failed), size and error","description":"The documents (sources) of a notebook: name, type, status (queued, processing, ready, failed), size and error.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."}},"required":["notebook_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_knowledge_notebook_overview":{"post":{"operationId":"get_knowledge_notebook_overview","summary":"A notebook's overview: the summary written from its sources, document counts by state, and which sources are ready","description":"A notebook's overview: the summary written from its sources, document counts by state, and which sources are ready.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."}},"required":["notebook_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/read_knowledge_document":{"post":{"operationId":"read_knowledge_document","summary":"The text extracted from one document (or the transcript of an audio file), in pages: offset and max_chars select the ...","description":"The text extracted from one document (or the transcript of an audio file), in pages: offset and max_chars select the part, and the reply says how long the whole text is.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"document_id":{"type":"string","minLength":1,"maxLength":120,"description":"The document id, from list_knowledge_documents."},"offset":{"type":"integer","minimum":0,"default":0},"max_chars":{"type":"integer","minimum":1000,"maximum":200000,"default":50000}},"required":["document_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_knowledge_notes":{"post":{"operationId":"list_knowledge_notes","summary":"The notes written in a notebook, with their full text","description":"The notes written in a notebook, with their full text.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."}},"required":["notebook_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_knowledge_chats":{"post":{"operationId":"list_knowledge_chats","summary":"The conversations held with a notebook, newest first","description":"The conversations held with a notebook, newest first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50}},"required":["notebook_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_knowledge_chat":{"post":{"operationId":"get_knowledge_chat","summary":"One conversation with a notebook: the questions and the answers with their sources","description":"One conversation with a notebook: the questions and the answers with their sources.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"chat_session_id":{"type":"string","minLength":1,"maxLength":120},"limit":{"type":"integer","minimum":1,"maximum":300,"default":100}},"required":["notebook_id","chat_session_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_knowledge_answer":{"post":{"operationId":"get_knowledge_answer","summary":"The state and, once ready, the answer of a question asked with ask_knowledge_notebook","description":"The state and, once ready, the answer of a question asked with ask_knowledge_notebook.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"query_job_id":{"type":"string","minLength":1,"maxLength":120}},"required":["notebook_id","query_job_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_knowledge_notebook_access":{"post":{"operationId":"get_knowledge_notebook_access","summary":"Who can use a notebook: the apps that answer from it and the owner's agents it is connected to","description":"Who can use a notebook: the apps that answer from it and the owner's agents it is connected to.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."}},"required":["notebook_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_knowledge_access":{"post":{"operationId":"get_app_knowledge_access","summary":"Which of the owner's notebooks an app's AI may answer from, and the ones it could be given","description":"Which of the owner's notebooks an app's AI may answer from, and the ones it could be given.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_knowledge_webhooks":{"post":{"operationId":"list_knowledge_webhooks","summary":"The ingest webhooks that let an external system add files to a notebook, with their state","description":"The ingest webhooks that let an external system add files to a notebook, with their state. Their URLs are secrets and are shown only on the Brain screen, where webhooks are created.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_knowledge_redaction_run":{"post":{"operationId":"get_knowledge_redaction_run","summary":"A sensitive-data scan: per document its state and what was found (category, the text, the suggested replacement, conf...","description":"A sensitive-data scan: per document its state and what was found (category, the text, the suggested replacement, confidence), and what was applied.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"run_id":{"type":"string","minLength":1,"maxLength":120,"description":"The scan id, from scan_knowledge_for_sensitive_data."}},"required":["notebook_id","run_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_knowledge_redaction_policy":{"post":{"operationId":"get_knowledge_redaction_policy","summary":"A notebook's automatic redaction policy for new uploads","description":"A notebook's automatic redaction policy for new uploads.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."}},"required":["notebook_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_knowledge_redaction_log":{"post":{"operationId":"get_knowledge_redaction_log","summary":"What was redacted in one document, by category and count, and whether the original was kept","description":"What was redacted in one document, by category and count, and whether the original was kept.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"document_id":{"type":"string","minLength":1,"maxLength":120,"description":"The document id, from list_knowledge_documents."}},"required":["document_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_knowledge_access_log":{"post":{"operationId":"get_knowledge_access_log","summary":"Who opened, asked or changed the notebooks, newest first: people, apps and agents","description":"Who opened, asked or changed the notebooks, newest first: people, apps and agents.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional: one notebook only."},"actor_type":{"type":"string","enum":["user","app","agent"]},"action":{"type":"string","maxLength":40},"limit":{"type":"integer","minimum":1,"maximum":500,"default":100},"offset":{"type":"integer","minimum":0,"default":0}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_failed_knowledge_documents":{"post":{"operationId":"list_failed_knowledge_documents","summary":"Documents whose processing failed, with the error, so they can be retried or replaced","description":"Documents whose processing failed, with the error, so they can be retried or replaced.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."}},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_knowledge_notebook":{"post":{"operationId":"create_knowledge_notebook","summary":"Create an empty notebook, optionally inside a folder","description":"Create an empty notebook, optionally inside a folder.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"title":{"type":"string","minLength":1,"maxLength":180},"folder_id":{"type":"string","maxLength":120}},"required":["title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/rename_knowledge_notebook":{"post":{"operationId":"rename_knowledge_notebook","summary":"Change a notebook's title; its documents and notes stay as they are","description":"Change a notebook's title; its documents and notes stay as they are.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"title":{"type":"string","minLength":1,"maxLength":180}},"required":["notebook_id","title"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_knowledge_folder":{"post":{"operationId":"create_knowledge_folder","summary":"Create a folder for notebooks, optionally inside another folder","description":"Create a folder for notebooks, optionally inside another folder.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"name":{"type":"string","minLength":1,"maxLength":120},"parent_id":{"type":"string","maxLength":120}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_knowledge_folder":{"post":{"operationId":"update_knowledge_folder","summary":"Rename a folder, or move it: parent_id is the new parent, an empty string moves it to the top","description":"Rename a folder, or move it: parent_id is the new parent, an empty string moves it to the top.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"folder_id":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":1,"maxLength":120},"parent_id":{"type":"string","maxLength":120}},"required":["folder_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/move_knowledge_notebook":{"post":{"operationId":"move_knowledge_notebook","summary":"File a notebook in a folder; an empty or missing folder_id moves it to the top","description":"File a notebook in a folder; an empty or missing folder_id moves it to the top.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"folder_id":{"type":"string","maxLength":120}},"required":["notebook_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_app_knowledge_access":{"post":{"operationId":"set_app_knowledge_access","summary":"Choose which of the owner's notebooks an app's AI may answer from","description":"Choose which of the owner's notebooks an app's AI may answer from. The list replaces the current one; an empty list gives it none.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app."},"notebook_ids":{"type":"array","maxItems":200,"items":{"type":"string","minLength":1,"maxLength":120}}},"required":["app_id","notebook_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/add_knowledge_note":{"post":{"operationId":"add_knowledge_note","summary":"Write a note into a notebook; agents and apps answer from it like from a document","description":"Write a note into a notebook; agents and apps answer from it like from a document.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"content":{"type":"string","minLength":1,"maxLength":100000}},"required":["notebook_id","content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_knowledge_note":{"post":{"operationId":"update_knowledge_note","summary":"Replace the text of a note in a notebook with new text","description":"Replace the text of a note in a notebook with new text.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"note_id":{"type":"string","minLength":1,"maxLength":120},"content":{"type":"string","minLength":1,"maxLength":100000}},"required":["note_id","content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/add_knowledge_document":{"post":{"operationId":"add_knowledge_document","summary":"Add a document to a notebook: plain text, or a file (PDF, Word, a spreadsheet, an image or audio) as base64","description":"Add a document to a notebook: plain text, or a file (PDF, Word, a spreadsheet, an image or audio) as base64. It is processed in the background (audio is transcribed); list_knowledge_documents shows when it is ready. The same file twice is recognised.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"filename":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[^/\\\\]+$"},"text":{"type":"string","minLength":1,"maxLength":2000000},"content_base64":{"type":"string","minLength":4,"maxLength":14000000},"content_type":{"type":"string","maxLength":120}},"required":["notebook_id","filename"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/import_knowledge_audio_url":{"post":{"operationId":"import_knowledge_audio_url","summary":"Download a public audio file (a recording, a podcast episode) into a new notebook and transcribe it there","description":"Download a public audio file (a recording, a podcast episode) into a new notebook and transcribe it there.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"url":{"type":"string","minLength":8,"maxLength":2000,"pattern":"^https?://"},"title":{"type":"string","maxLength":240},"folder_id":{"type":"string","maxLength":120}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/rename_knowledge_document":{"post":{"operationId":"rename_knowledge_document","summary":"Set the name a document is shown under (its file name stays); an empty name clears it","description":"Set the name a document is shown under (its file name stays); an empty name clears it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"document_id":{"type":"string","minLength":1,"maxLength":120,"description":"The document id, from list_knowledge_documents."},"name":{"type":"string","maxLength":200}},"required":["notebook_id","document_id","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/retry_knowledge_document":{"post":{"operationId":"retry_knowledge_document","summary":"Process a document again after it failed or stalled","description":"Process a document again after it failed or stalled.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"document_id":{"type":"string","minLength":1,"maxLength":120,"description":"The document id, from list_knowledge_documents."}},"required":["notebook_id","document_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/ask_knowledge_notebook":{"post":{"operationId":"ask_knowledge_notebook","summary":"Ask a notebook a question; the answer comes from its documents, with sources","description":"Ask a notebook a question; the answer comes from its documents, with sources. Waits up to 25 seconds for the answer, otherwise returns the query_job_id for get_knowledge_answer. Without chat_session_id a new conversation starts.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"question":{"type":"string","minLength":1,"maxLength":8000},"chat_session_id":{"type":"string","maxLength":120},"source_ids":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"maxLength":120},"description":"Optional: answer only from these documents."}},"required":["notebook_id","question"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_knowledge_webhook_enabled":{"post":{"operationId":"set_knowledge_webhook_enabled","summary":"Turn an ingest webhook off (posts are refused) or on again","description":"Turn an ingest webhook off (posts are refused) or on again.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"webhook_id":{"type":"string","minLength":1,"maxLength":120},"enabled":{"type":"boolean"}},"required":["webhook_id","enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/scan_knowledge_for_sensitive_data":{"post":{"operationId":"scan_knowledge_for_sensitive_data","summary":"Scan documents for personal or sensitive information, or for what the owner's instructions describe","description":"Scan documents for personal or sensitive information, or for what the owner's instructions describe. Only finds; nothing changes until apply_knowledge_redaction. Runs in the background; read it with get_knowledge_redaction_run.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"document_ids":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":120}},"instructions":{"type":"string","maxLength":4000,"description":"Optional: what to find, in the owner's words."}},"required":["notebook_id","document_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/apply_knowledge_redaction":{"post":{"operationId":"apply_knowledge_redaction","summary":"Redact the chosen findings of a scan: approved maps each document id to the finding ids to replace","description":"Redact the chosen findings of a scan: approved maps each document id to the finding ids to replace. The original text is kept, so revert_knowledge_redaction can undo it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"run_id":{"type":"string","minLength":1,"maxLength":120,"description":"The scan id, from scan_knowledge_for_sensitive_data."},"approved":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["notebook_id","run_id","approved"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/revert_knowledge_redaction":{"post":{"operationId":"revert_knowledge_redaction","summary":"Undo an applied redaction: the documents get their original text back","description":"Undo an applied redaction: the documents get their original text back.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"run_id":{"type":"string","minLength":1,"maxLength":120,"description":"The scan id, from scan_knowledge_for_sensitive_data."}},"required":["notebook_id","run_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_knowledge_redaction_policy":{"post":{"operationId":"set_knowledge_redaction_policy","summary":"Set a notebook's automatic redaction for new uploads: on or off, what to find (instructions), whether findings above ...","description":"Set a notebook's automatic redaction for new uploads: on or off, what to find (instructions), whether findings above min_confidence are applied at once. Originals are always kept.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional app whose notebooks to use. Omitted: the owner's own Business Brain."},"notebook_id":{"type":"string","minLength":1,"maxLength":120,"description":"The notebook id, from list_knowledge_notebooks."},"enabled":{"type":"boolean"},"instructions":{"type":"string","maxLength":4000},"auto_apply":{"type":"boolean","default":true},"min_confidence":{"type":"number","minimum":0,"maximum":1,"default":0.75}},"required":["notebook_id","enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_whatsapp_triggers":{"post":{"operationId":"list_whatsapp_triggers","summary":"The app's WhatsApp triggers: the message sent to a customer when a record is created, the page and entity, the phone ...","description":"The app's WhatsApp triggers: the message sent to a customer when a record is created, the page and entity, the phone field, the sending number and whether it is on.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app the trigger belongs to."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_whatsapp_trigger_options":{"post":{"operationId":"get_whatsapp_trigger_options","summary":"What a WhatsApp trigger can use in this app: the owner's WhatsApp numbers and flows, and the pages, entities and fiel...","description":"What a WhatsApp trigger can use in this app: the owner's WhatsApp numbers and flows, and the pages, entities and fields that create records.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app the trigger belongs to."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_whatsapp_trigger_logs":{"post":{"operationId":"list_whatsapp_trigger_logs","summary":"What the app's WhatsApp triggers sent, newest first, with the outcome of each send","description":"What the app's WhatsApp triggers sent, newest first, with the outcome of each send.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app the trigger belongs to."},"trigger_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional: one trigger only."},"limit":{"type":"integer","minimum":1,"maximum":200,"default":80}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_whatsapp_trigger":{"post":{"operationId":"create_whatsapp_trigger","summary":"Save a WhatsApp trigger for record-created events","description":"Save a WhatsApp trigger for record-created events. It is saved switched off and messages no one. Switching it on is done by the owner on the app's Automations screen in Fine Structure.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app the trigger belongs to."},"name":{"type":"string","maxLength":200},"page_name":{"type":"string","minLength":1,"maxLength":200,"description":"The page whose form creates the record."},"entity_name":{"type":"string","minLength":1,"maxLength":120,"description":"The entity whose new records fire it."},"phone_field":{"type":"string","minLength":1,"maxLength":120,"description":"The record field holding the customer's WhatsApp number."},"name_field":{"type":"string","maxLength":120},"message_template":{"type":"string","minLength":1,"maxLength":4000,"description":"The message; {{ field_name }} inserts a record field."},"whatsapp_bot_id":{"type":"string","maxLength":120,"description":"The WhatsApp number that sends, from get_whatsapp_trigger_options."},"flow_id":{"type":"string","maxLength":120,"description":"Optional WhatsApp flow the conversation continues in."}},"required":["app_id","page_name","entity_name","phone_field","message_template"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_whatsapp_trigger":{"post":{"operationId":"update_whatsapp_trigger","summary":"Change a trigger that is switched off: page, entity, fields, message, number or flow","description":"Change a trigger that is switched off: page, entity, fields, message, number or flow. Only the fields given change. A trigger that is on is turned off first with disable_whatsapp_trigger.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app the trigger belongs to."},"trigger_id":{"type":"string","minLength":1,"maxLength":120,"description":"The trigger id, from list_whatsapp_triggers."},"name":{"type":"string","maxLength":200},"page_name":{"type":"string","minLength":1,"maxLength":200,"description":"The page whose form creates the record."},"entity_name":{"type":"string","minLength":1,"maxLength":120,"description":"The entity whose new records fire it."},"phone_field":{"type":"string","minLength":1,"maxLength":120,"description":"The record field holding the customer's WhatsApp number."},"name_field":{"type":"string","maxLength":120},"message_template":{"type":"string","minLength":1,"maxLength":4000,"description":"The message; {{ field_name }} inserts a record field."},"whatsapp_bot_id":{"type":"string","maxLength":120,"description":"The WhatsApp number that sends, from get_whatsapp_trigger_options."},"flow_id":{"type":"string","maxLength":120,"description":"Optional WhatsApp flow the conversation continues in."}},"required":["app_id","trigger_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/disable_whatsapp_trigger":{"post":{"operationId":"disable_whatsapp_trigger","summary":"Switch a WhatsApp trigger off: new records no longer send its message","description":"Switch a WhatsApp trigger off: new records no longer send its message. It stays saved.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app the trigger belongs to."},"trigger_id":{"type":"string","minLength":1,"maxLength":120,"description":"The trigger id, from list_whatsapp_triggers."}},"required":["app_id","trigger_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/send_whatsapp_trigger_test":{"post":{"operationId":"send_whatsapp_trigger_test","summary":"Send a saved trigger's message once to the owner's own verified WhatsApp number, rendered with a sample record, from ...","description":"Send a saved trigger's message once to the owner's own verified WhatsApp number, rendered with a sample record, from the trigger's sending number. It never goes to anyone else.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app the trigger belongs to."},"trigger_id":{"type":"string","minLength":1,"maxLength":120,"description":"The trigger id, from list_whatsapp_triggers."},"sample_record":{"type":"object","description":"Field values to render the message with."}},"required":["app_id","trigger_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/suggest_whatsapp_trigger_message":{"post":{"operationId":"suggest_whatsapp_trigger_message","summary":"Have the AI write a WhatsApp message for a trigger from the page it follows, the app's brain and the record fields","description":"Have the AI write a WhatsApp message for a trigger from the page it follows, the app's brain and the record fields. Returns text to review; nothing is saved or sent.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app the trigger belongs to."},"page_name":{"type":"string","minLength":1,"maxLength":200},"entity_name":{"type":"string","maxLength":120},"fields":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":120}},"whatsapp_bot_id":{"type":"string","maxLength":120},"flow_id":{"type":"string","maxLength":120}},"required":["app_id","page_name"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_contract_workspaces":{"post":{"operationId":"list_contract_workspaces","summary":"The account's contracts workspaces, with the caller's role in each, and whether contracts and e-signature are switche...","description":"The account's contracts workspaces, with the caller's role in each, and whether contracts and e-signature are switched on. Start here: every other contracts tool takes a workspace id or an id found inside one.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_contracts":{"post":{"operationId":"list_contracts","summary":"Contracts in a workspace, newest first, 100 per page: title, status (draft, sent, in_progress, finalizing, completed,...","description":"Contracts in a workspace, newest first, 100 per page: title, status (draft, sent, in_progress, finalizing, completed, voided, declined, expired), recipients, dates, folder and tags. Filters narrow it before paging.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."},"status":{"type":"string","enum":["draft","sent","in_progress","finalizing","completed","voided","declined","expired"]},"query":{"type":"string","maxLength":200,"description":"Matches the title or a recipient's name or email."},"archived":{"type":"boolean","default":false},"folder":{"type":"string","maxLength":120},"tag":{"type":"string","maxLength":60},"attention":{"type":"string","enum":["follow_up","expiring","delivery"],"description":"follow_up: follow-up date reached; expiring: signing link ends within 7 days; delivery: a message to a recipient failed."},"sort":{"type":"string","enum":["newest","oldest","updated","expiry","follow_up"],"default":"newest"},"today":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The owner's local date for attention=follow_up, YYYY-MM-DD; UTC today when omitted."},"created_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date, YYYY-MM-DD."},"created_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date, YYYY-MM-DD."},"completed_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date, YYYY-MM-DD."},"completed_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date, YYYY-MM-DD."},"offset":{"type":"integer","minimum":0,"default":0}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_contract":{"post":{"operationId":"get_contract","summary":"One contract in full: recipients and where each one stands (waiting, opened, signed), documents, the signed copies on...","description":"One contract in full: recipients and where each one stands (waiting, opened, signed), documents, the signed copies once completed, delivery attempts by destination, the last events of its evidence trail, the owner's tracking notes and whether a signing password is set. Never returns signing links, codes or tokens.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."}},"required":["contract_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_contract_stats":{"post":{"operationId":"get_contract_stats","summary":"How many unarchived contracts a workspace has in each status","description":"How many unarchived contracts a workspace has in each status.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_contract_templates":{"post":{"operationId":"list_contract_templates","summary":"A workspace's contract templates: each with its roles (who signs, in what order), its fields and documents","description":"A workspace's contract templates: each with its roles (who signs, in what order), its fields and documents. Use the role ids and field ids with create_contracts_from_template.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."},"archived":{"type":"boolean","default":false}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_contract_template":{"post":{"operationId":"get_contract_template","summary":"One template: its current revision, roles, documents, field count, the option lists it uses, and the contracts made f...","description":"One template: its current revision, roles, documents, field count, the option lists it uses, and the contracts made from it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","minLength":1,"maxLength":120,"description":"The template id, from list_contract_templates."}},"required":["template_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_contract_files":{"post":{"operationId":"list_contract_files","summary":"The documents (PDFs) of a workspace: id, name, pages and size","description":"The documents (PDFs) of a workspace: id, name, pages and size.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/read_contract_document":{"post":{"operationId":"read_contract_document","summary":"Read the text of a contract document one page at a time, or search all its pages for a phrase","description":"Read the text of a contract document one page at a time, or search all its pages for a phrase. Works for the documents of a workspace and for the signed copies of a completed contract.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"document_id":{"type":"string","minLength":1,"maxLength":120,"description":"The document id, from list_contract_files or get_contract."},"page":{"type":"integer","minimum":0,"default":0,"description":"Page index, from 0."},"query":{"type":"string","maxLength":120,"description":"Search every page for this text instead of reading one page."}},"required":["document_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_contract_lifecycle":{"post":{"operationId":"get_contract_lifecycle","summary":"A contract's term after signing: effective and end dates, renewal and notice, the next dates that matter and its obli...","description":"A contract's term after signing: effective and end dates, renewal and notice, the next dates that matter and its obligations. Returns the revision update_contract_lifecycle needs.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."}},"required":["contract_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_contract_lifecycle":{"post":{"operationId":"list_contract_lifecycle","summary":"Every unarchived contract of a workspace that has a lifecycle set, with its end, renewal and notice dates and open ob...","description":"Every unarchived contract of a workspace that has a lifecycle set, with its end, renewal and notice dates and open obligations: what expires or renews and when.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_contract_work_queue":{"post":{"operationId":"get_contract_work_queue","summary":"Contracts that need someone's attention: assigned ones, follow-up dates and open change requests from signers, most u...","description":"Contracts that need someone's attention: assigned ones, follow-up dates and open change requests from signers, most urgent first.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."},"assignee_id":{"type":"string","maxLength":100,"description":"Optional: one assignee's items only."}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_contract_process_report":{"post":{"operationId":"get_contract_process_report","summary":"How long each recipient took to sign, or has been waiting, measured from recorded events, for the latest 200 contract...","description":"How long each recipient took to sign, or has been waiting, measured from recorded events, for the latest 200 contracts of a workspace.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_contract_change_requests":{"post":{"operationId":"list_contract_change_requests","summary":"Changes signers asked for on a contract, with the owner's answers","description":"Changes signers asked for on a contract, with the owner's answers. answer_contract_change_request answers an open one.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."}},"required":["contract_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_contract_workspace_settings":{"post":{"operationId":"get_contract_workspace_settings","summary":"A workspace's defaults for new contracts (signing options, delivery, recipient experience, language), whether a compl...","description":"A workspace's defaults for new contracts (signing options, delivery, recipient experience, language), whether a completion webhook is set and to which host (never its full address or secret), and the people who can be assigned contracts and obligations.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_contract_clauses":{"post":{"operationId":"list_contract_clauses","summary":"A workspace's clause library: reusable contract text with its category and revision, 50 per page by default","description":"A workspace's clause library: reusable contract text with its category and revision, 50 per page by default.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."},"archived":{"type":"boolean","default":false},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50},"offset":{"type":"integer","minimum":0,"default":0}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/validate_contract_draft":{"post":{"operationId":"validate_contract_draft","summary":"Check a contract spec with the same validator that saving and sending use, without saving anything","description":"Check a contract spec with the same validator that saving and sending use, without saving anything. Returns valid true, or the reason it is not.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."},"spec":{"type":"object","description":"A contract spec: title, language, documents (document ids), recipients (id, name, email, role, order) and fields. Start from get_contract_copy or get_contract; the platform validates it."}},"required":["workspace_id","spec"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/preview_contracts_from_template":{"post":{"operationId":"preview_contracts_from_template","summary":"Check entries for create_contracts_from_template without creating anything: which entries would become valid drafts a...","description":"Check entries for create_contracts_from_template without creating anything: which entries would become valid drafts and why the others would not.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","minLength":1,"maxLength":120,"description":"The template id, from list_contract_templates."},"entries":{"type":"array","minItems":1,"maxItems":200,"description":"One entry per contract to prepare.","items":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"description":"Optional title; the template's title when omitted."},"recipients":{"type":"array","description":"Every role of the template exactly once: its role id, and the person's name and email.","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"description":"The template role id."},"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":320}},"required":["id"],"additionalProperties":false}},"prefill":{"type":"object","description":"Optional field values by field id, filled before signing."}},"required":["recipients"],"additionalProperties":false}},"template_revision":{"type":"integer","minimum":1}},"required":["template_id","entries"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_contract_copy":{"post":{"operationId":"get_contract_copy","summary":"A contract's terms as an unsaved draft spec for another customer: same documents and fields, recipients' identities a...","description":"A contract's terms as an unsaved draft spec for another customer: same documents and fields, recipients' identities and filled values cleared. As in Studio, every field comes back with review_status pending: once the owner confirms the fields suit the new customer, set review_status to accepted on each one. Who gets copies of the signed contract is not copied: the new draft takes the workspace defaults. Saves nothing; fill it in and save it with create_contract_draft.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."}},"required":["contract_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_contracts_from_template":{"post":{"operationId":"create_contracts_from_template","summary":"Create unsent contract drafts from a template, one per entry: each entry names the person for every role of the templ...","description":"Create unsent contract drafts from a template, one per entry: each entry names the person for every role of the template and may prefill field values. Drafts are saved and never sent; send_contract sends each one. Each call creates new drafts, as in Studio; pass the same request_key to retry a call without creating them twice.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","minLength":1,"maxLength":120,"description":"The template id, from list_contract_templates."},"entries":{"type":"array","minItems":1,"maxItems":200,"description":"One entry per contract to prepare.","items":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"description":"Optional title; the template's title when omitted."},"recipients":{"type":"array","description":"Every role of the template exactly once: its role id, and the person's name and email.","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80,"description":"The template role id."},"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":320}},"required":["id"],"additionalProperties":false}},"prefill":{"type":"object","description":"Optional field values by field id, filled before signing."}},"required":["recipients"],"additionalProperties":false}},"template_revision":{"type":"integer","minimum":1,"description":"Optional: refuse if the template changed since this revision."},"request_key":{"type":"string","minLength":1,"maxLength":80,"description":"Optional idempotency key: a call repeating a key returns the contracts it created, in whatever status they are now."}},"required":["template_id","entries"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_contract_draft":{"post":{"operationId":"create_contract_draft","summary":"Save a new unsent contract draft from a full spec, for example one returned by get_contract_copy with the recipients ...","description":"Save a new unsent contract draft from a full spec, for example one returned by get_contract_copy with the recipients filled in. Never sends. Who gets copies of the signed contract (delivery_settings) is not set here: the draft takes the workspace defaults, and the owner changes them in Fine Structure.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."},"spec":{"type":"object","description":"A contract spec: title, language, documents (document ids), recipients (id, name, email, role, order) and fields. Start from get_contract_copy or get_contract; the platform validates it."},"request_key":{"type":"string","minLength":1,"maxLength":100,"description":"Optional idempotency key: a call repeating a key returns the contract it created, in whatever status it is now."}},"required":["workspace_id","spec"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_contract_draft":{"post":{"operationId":"update_contract_draft","summary":"Replace the spec of a contract that is still a draft","description":"Replace the spec of a contract that is still a draft. Pass the revision from get_contract: a draft changed since then is refused rather than overwritten. Never sends, and keeps the draft's delivery_settings (who gets copies of the signed contract) as they are.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"spec":{"type":"object","description":"A contract spec: title, language, documents (document ids), recipients (id, name, email, role, order) and fields. Start from get_contract_copy or get_contract; the platform validates it."},"revision":{"type":"integer","minimum":1}},"required":["contract_id","spec","revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/archive_contract":{"post":{"operationId":"archive_contract","summary":"Archive a draft or a finished contract (completed, voided, declined, expired), or restore it with archived false","description":"Archive a draft or a finished contract (completed, voided, declined, expired), or restore it with archived false. Archiving hides it from lists and work queues and deletes nothing; use it when the owner asks to delete one of those. A contract out for signature is refused: its signers still hold it, so stop it first with void_contract.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"archived":{"type":"boolean","default":true}},"required":["contract_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_contract_lifecycle":{"post":{"operationId":"update_contract_lifecycle","summary":"Set a contract's term after signing: dates, renewal, notice, reminders to the account owner and obligations","description":"Set a contract's term after signing: dates, renewal, notice, reminders to the account owner and obligations. Pass the revision from get_contract_lifecycle; the settings replace the previous ones. Signers are not told.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"settings":{"type":"object","description":"The whole lifecycle setting (it replaces the previous one): start_mode (date or signature), effective_date, end_date or duration_months, renewal (none, manual, automatic), notice_days, reminder_days, terminated_on, timezone, notify_owner (alerts go to the account owner only) and obligations [{id, title, due_date, status open|done|waived, assignee_id, notes}].","properties":{"start_mode":{"type":"string","enum":["date","signature"]},"effective_date":{"type":"string"},"end_date":{"type":"string"},"duration_months":{"type":"integer","minimum":0,"maximum":1200},"renewal":{"type":"string","enum":["none","manual","automatic"]},"notice_days":{"type":"integer","minimum":0,"maximum":3650},"reminder_days":{"type":"integer","minimum":0,"maximum":365},"terminated_on":{"type":"string"},"timezone":{"type":"string","maxLength":80},"notify_owner":{"type":"boolean"},"obligations":{"type":"array","maxItems":100,"items":{"type":"object"}}},"additionalProperties":false},"revision":{"type":"integer","minimum":0}},"required":["contract_id","settings","revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/update_contract_tracking":{"post":{"operationId":"update_contract_tracking","summary":"The owner's own tracking of a contract: folder, tags, internal notes, follow-up date and assignee","description":"The owner's own tracking of a contract: folder, tags, internal notes, follow-up date and assignee. Only the fields given change. Recipients never see any of it.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"folder":{"type":"string","maxLength":120},"tags":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":60}},"notes":{"type":"string","maxLength":20000},"follow_up":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A date, YYYY-MM-DD."},{"type":"string","maxLength":0}],"description":"Follow-up date YYYY-MM-DD, or an empty string to clear it."},"assignee_id":{"type":"string","maxLength":100,"description":"A user id from get_contract_workspace_settings, or empty to unassign."}},"required":["contract_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/create_contract_document":{"post":{"operationId":"create_contract_document","summary":"Create a PDF document in a workspace from text or HTML, ready to be used in a contract draft","description":"Create a PDF document in a workspace from text or HTML, ready to be used in a contract draft. Pass source_document_id to save it as a new version of an existing document.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."},"title":{"type":"string","minLength":1,"maxLength":150},"text":{"type":"string","minLength":1,"maxLength":200000,"description":"The document's text (up to 100,000 characters), or sanitized HTML (up to 200,000) with format html."},"format":{"type":"string","enum":["text","html"],"default":"text"},"language":{"type":"string","maxLength":16,"default":"en","description":"Document language, such as en or he."},"source_document_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional: the document this one is a new version of."}},"required":["workspace_id","title","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/archive_contract_template":{"post":{"operationId":"archive_contract_template","summary":"Archive a template so it is no longer offered for new contracts, or restore it with archived false","description":"Archive a template so it is no longer offered for new contracts, or restore it with archived false. Contracts already made from it are unchanged.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","minLength":1,"maxLength":120,"description":"The template id, from list_contract_templates."},"archived":{"type":"boolean","default":true}},"required":["template_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/save_contract_clause":{"post":{"operationId":"save_contract_clause","summary":"Add a clause to a workspace's clause library, or edit one with clause_id and the revision from list_contract_clauses","description":"Add a clause to a workspace's clause library, or edit one with clause_id and the revision from list_contract_clauses. Every edit keeps the earlier text as a version.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contracts workspace id, from list_contract_workspaces."},"clause_id":{"type":"string","minLength":1,"maxLength":120,"description":"Optional: the clause to edit."},"revision":{"type":"integer","minimum":1,"description":"Required with clause_id."},"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":1,"maxLength":30000},"category":{"type":"string","maxLength":120},"archived":{"type":"boolean","default":false}},"required":["workspace_id","title","content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/preview_contract_invitation":{"post":{"operationId":"preview_contract_invitation","summary":"The invitation email a contract would send its signers: subject and HTML, exactly as send_contract delivers it","description":"The invitation email a contract would send its signers: subject and HTML, exactly as send_contract delivers it. Sends nothing. Show it to the owner before sending.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."}},"required":["contract_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/send_contract":{"post":{"operationId":"send_contract","summary":"Send a draft for signature: its terms are frozen and each signer, in signing order, gets a personal invitation by email","description":"Send a draft for signature: its terms are frozen and each signer, in signing order, gets a personal invitation by email. This reaches people outside the account and cannot be taken back (void_contract stops it, and tells them). Before calling, show the owner the recipients and the invitation from preview_contract_invitation, and get a clear yes. Pass the revision from get_contract.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"revision":{"type":"integer","minimum":1,"description":"The contract's revision, from get_contract."},"expires_days":{"type":"integer","minimum":1,"maximum":365,"default":30,"description":"Days the signers have to sign."},"reminder_days":{"type":"integer","minimum":0,"maximum":30,"default":3,"description":"Days between automatic reminders; 0 for none."}},"required":["contract_id","revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/remind_contract_signers":{"post":{"operationId":"remind_contract_signers","summary":"Email a reminder now to the signers whose turn it is and who have not signed, or to one of them with recipient_id","description":"Email a reminder now to the signers whose turn it is and who have not signed, or to one of them with recipient_id. At most once an hour per contract. Reaches people outside the account.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"recipient_id":{"type":"string","minLength":1,"maxLength":80,"description":"Optional: one recipient's id, from get_contract."}},"required":["contract_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/set_contract_reminders":{"post":{"operationId":"set_contract_reminders","summary":"Change how often a contract out for signature reminds its signers automatically, in days; 0 stops automatic reminders","description":"Change how often a contract out for signature reminds its signers automatically, in days; 0 stops automatic reminders. The next reminder moves accordingly.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"days":{"type":"integer","minimum":0,"maximum":30}},"required":["contract_id","days"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/retry_contract_delivery":{"post":{"operationId":"retry_contract_delivery","summary":"Send again one delivery that failed, bounced or has an unknown outcome (an invitation, reminder, code or copy), from ...","description":"Send again one delivery that failed, bounced or has an unknown outcome (an invitation, reminder, code or copy), from get_contract deliveries. When the earlier outcome is unknown the person may receive it twice; the result says so.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"delivery_id":{"type":"string","minLength":1,"maxLength":80}},"required":["contract_id","delivery_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/void_contract":{"post":{"operationId":"void_contract","summary":"Stop a contract that is out for signature: its signing links stop working and every recipient and the owner get a not...","description":"Stop a contract that is out for signature: its signing links stop working and every recipient and the owner get a notice with the reason. Cannot be undone. A draft is never voided here (it reached no one): archive it instead.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"reason":{"type":"string","minLength":1,"maxLength":1000,"description":"Shown to the recipients in the notice."}},"required":["contract_id","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/answer_contract_change_request":{"post":{"operationId":"answer_contract_change_request","summary":"Answer a signer's change request and close it; the signer sees the answer on their signing page","description":"Answer a signer's change request and close it; the signer sees the answer on their signing page. The contract's terms do not change: to change them, void it and send a new one. Take request_id from list_contract_change_requests.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract_id":{"type":"string","minLength":1,"maxLength":120,"description":"The contract id, from list_contracts."},"request_id":{"type":"string","minLength":1,"maxLength":80},"response":{"type":"string","minLength":1,"maxLength":2000,"description":"The answer the signer reads, in the owner's words."}},"required":["contract_id","request_id","response"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_payment_settings":{"post":{"operationId":"get_app_payment_settings","summary":"How an app takes payments: the provider (Cardcom), whether payments are switched on, the plans with their prices and ...","description":"How an app takes payments: the provider (Cardcom), whether payments are switched on, the plans with their prices and what each plan unlocks, whether the Cardcom terminal details are entered (never their values), and the invoice document type and language.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app id, from list_apps."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_app_payments":{"post":{"operationId":"list_app_payments","summary":"Payments made inside an app, newest first: who paid, the plan, amount (in the smallest currency unit, cents or agorot...","description":"Payments made inside an app, newest first: who paid, the plan, amount (in the smallest currency unit, cents or agorot), status (pending, completed, failed, refunded), the invoice document and any error.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app id, from list_apps."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"offset":{"type":"integer","minimum":0,"default":0}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_payment":{"post":{"operationId":"get_app_payment","summary":"One payment of an app as the platform has it: status, amount, invoice document and, once completed, the subscription ...","description":"One payment of an app as the platform has it: status, amount, invoice document and, once completed, the subscription or pack it bought. Read only: a payment still pending is settled by Cardcom's own callback and the platform's checks, not by this call.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app id, from list_apps."},"payment_id":{"type":"string","minLength":1,"maxLength":80,"description":"The payment id, from list_app_payments."}},"required":["app_id","payment_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_payment_stats":{"post":{"operationId":"get_app_payment_stats","summary":"An app's payment totals: completed payments, revenue, active subscriptions and monthly recurring revenue, in the smal...","description":"An app's payment totals: completed payments, revenue, active subscriptions and monthly recurring revenue, in the smallest currency unit.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app id, from list_apps."}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/list_app_subscriptions":{"post":{"operationId":"list_app_subscriptions","summary":"Subscriptions in an app, 50 per page by default: who, which plan, amount, status, the current period's end, failed re...","description":"Subscriptions in an app, 50 per page by default: who, which plan, amount, status, the current period's end, failed renewal attempts and cancellations.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app id, from list_apps."},"status":{"type":"string","maxLength":32,"description":"Optional status filter, for example active, past_due, cancelled."},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50},"offset":{"type":"integer","minimum":0,"default":0}},"required":["app_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/mcp/tools/get_app_user_billing":{"post":{"operationId":"get_app_user_billing","summary":"One person's billing in an app: their plan, their current subscription and the one-time packs they bought with the us...","description":"One person's billing in an app: their plan, their current subscription and the one-time packs they bought with the uses left.","tags":["tools"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app_id":{"type":"string","minLength":1,"maxLength":120,"description":"The app id, from list_apps."},"user_id":{"type":"string","minLength":1,"maxLength":120,"description":"The id of a person who signed up to the app, from list_app_members."}},"required":["app_id","user_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Tool executed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResult"}}}},"400":{"description":"Invalid arguments for this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits on the account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token scope does not permit this tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown tool name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded, retry after the indicated delay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error while executing the tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fse2_mcp_<token>","description":"User-created Fine Structure token. Create one self-serve at https://finestructure.ai/api-keys. Tokens are scoped by account, app and permissions."}},"schemas":{"ToolResult":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"result":{"type":"object","additionalProperties":true}},"required":["ok","tool","result"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"JsonRpcRequest":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"null"}]},"method":{"type":"string","enum":["initialize","tools/list","tools/call"]},"params":{"type":"object","additionalProperties":true}},"required":["jsonrpc","method"]}}},"externalDocs":{"description":"Agent integration guide","url":"https://finestructure.ai/api/mcp/docs"}}