{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "finestructure.ai",
    "site": "finestructure.ai",
    "addresses": [
      {
        "address": "104.21.44.119",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.21.32.0/20",
          "country": "US"
        }
      },
      {
        "address": "172.67.199.146",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "172.67.192.0/20",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3031::6815:2c77",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3031::/48",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3035::ac43:c792",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3035::/48",
          "country": "US"
        }
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "104.21.44.119",
          "172.67.199.146",
          "2606:4700:3031::6815:2c77",
          "2606:4700:3035::ac43:c792"
        ],
        "first_seen": "2026-11-22T04:51:01.999Z",
        "last_seen": "2026-11-22T04:51:01.999Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "fine-structure-mcp",
      "version": "1.0.2",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "cloudflare",
      "strict-transport-security": "max-age=31536000; includeSubDomains"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 0,
      "sample": []
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "ai.finestructure",
      "total": 0,
      "sample": []
    },
    "same_repository": null,
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "856",
    "server_name": "ai.finestructure/fine-structure",
    "url": "https://finestructure.ai/api/mcp",
    "host": "finestructure.ai",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-22T04:51:01.999Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "a9f25f2990b6335ac2c8886408f87f0a68b5608511be9e60b06a024bdb1de511",
    "first_listed_at": "2026-11-21T04:50:05.891Z",
    "created_at": "2026-11-21T04:30:18.059Z",
    "resolved_addresses": [
      "104.21.44.119",
      "172.67.199.146",
      "2606:4700:3031::6815:2c77",
      "2606:4700:3035::ac43:c792"
    ]
  },
  "server": {
    "name": "ai.finestructure/fine-structure",
    "title": "Fine Structure",
    "description": "Build and host full-stack apps from a prompt, with agents that reach you on WhatsApp and email.",
    "version": "1.0.2",
    "registry_status": "active",
    "repository_url": null,
    "website_url": "https://finestructure.ai",
    "published_at": "2026-08-17T09:17:40.729Z",
    "updated_at": "2026-08-17T09:17:40.729Z",
    "first_seen": "2026-11-21T04:30:17.376Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [
      "keeps-memory",
      "runs-agents",
      "sends-messages"
    ],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T15:23:06.645Z"
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 2,
    "answered": 2,
    "answered_percent": 100,
    "avg_listing_latency_ms": 346,
    "first_check_in_window": "2026-11-21T04:50:05.891Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "a9f25f2990b6335ac2c8886408f87f0a68b5608511be9e60b06a024bdb1de511",
    "tools": 186,
    "resources": 0,
    "prompts": 13,
    "first_seen": "2026-11-22T04:51:02.362Z",
    "tool_names": [
      "create_app",
      "agency_create_client",
      "agency_list_clients",
      "agency_create_client_app",
      "agency_create_claim_link",
      "agency_get_claim_status",
      "update_app",
      "publish_app",
      "get_platform_guide",
      "get_recommended_workflow",
      "get_job_status",
      "get_app_status",
      "get_app_links",
      "list_app_domains",
      "set_app_subdomain",
      "check_subdomain_available",
      "add_custom_domain",
      "get_domain_verification",
      "check_domain_verification",
      "set_primary_domain",
      "remove_custom_domain",
      "get_domain_ssl_status",
      "configure_domain_redirects",
      "list_apps",
      "get_app_files",
      "read_app_file",
      "read_app_files",
      "write_app_file",
      "patch_app_file",
      "rename_app_file",
      "get_app_detail",
      "get_entities",
      "query_entity",
      "seed_entity",
      "create_entity_records",
      "update_entity_record",
      "update_entity_records",
      "delete_entity_records",
      "get_pages",
      "get_errors",
      "get_app_analytics",
      "get_preview_url",
      "list_saved_versions",
      "create_change_set",
      "add_file_change",
      "validate_change_set",
      "apply_change_set",
      "discard_change_set",
      "validate_app",
      "inspect_preview",
      "get_app_security_context",
      "set_route_policy",
      "set_function_policy",
      "invoke_function",
      "create_platform_request",
      "get_platform_request",
      "list_platform_requests",
      "reply_platform_request",
      "update_platform_request",
      "set_entity_policy",
      "list_app_members",
      "invite_app_member",
      "update_app_member_role",
      "remove_app_member",
      "get_app_security_audit",
      "compare_saved_versions",
      "compare_current_to_version",
      "restore_file_from_version",
      "create_entity_schema",
      "update_entity_schema",
      "validate_entity_relationships",
      "update_entity_metadata",
      "list_secret_keys",
      "set_secret",
      "delete_secret",
      "list_integrations",
      "configure_integration",
      "list_ab_tests",
      "create_ab_test",
      "update_ab_test",
      "delete_ab_test",
      "get_ab_test_stats",
      "get_app_metadata",
      "set_app_metadata",
      "preview_saved_version",
      "set_agent_owner_relay",
      "create_agent",
      "list_agents",
      "schedule_agent_task",
      "list_agent_tasks",
      "get_agent_whatsapp",
      "start_owner_phone_verification",
      "confirm_owner_phone_verification",
      "attach_agent_whatsapp",
      "detach_agent_whatsapp",
      "list_agent_conversations",
      "send_agent_message",
      "get_agent_conversation",
      "get_agent_task",
      "get_agent"
    ],
    "declared": {
      "tools": [
        {
          "name": "create_app",
          "title": "Create App",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "name",
              "prompt"
            ],
            "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",
                "default": "",
                "description": "Optional short description"
              }
            }
          },
          "annotations": {
            "title": "Create App",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "agency_create_client",
          "title": "Agency: Create Client",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "client_email"
            ],
            "properties": {
              "note": {
                "type": "string",
                "default": "",
                "description": "Optional internal note for the agency"
              },
              "client_email": {
                "type": "string",
                "description": "Client email that will be allowed to claim projects"
              },
              "client_full_name": {
                "type": "string",
                "default": "",
                "description": "Optional client display name"
              }
            }
          },
          "annotations": {
            "title": "Agency: Create Client",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "agency_list_clients",
          "title": "Agency: List Clients",
          "description": "Agency mode only. List client records and app handoff status for the authenticated agent.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "include_handoffs": {
                "type": "boolean",
                "default": true,
                "description": "Include claim links status without raw tokens"
              }
            }
          },
          "annotations": {
            "title": "Agency: List Clients",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "agency_create_client_app",
          "title": "Agency: Create Client App",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "client_email",
              "name",
              "prompt"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Name for the app (1-100 chars)"
              },
              "note": {
                "type": "string",
                "default": "",
                "description": "Optional internal client/project note"
              },
              "prompt": {
                "type": "string",
                "description": "Detailed description of the app to build"
              },
              "description": {
                "type": "string",
                "default": "",
                "description": "Optional short app description"
              },
              "client_email": {
                "type": "string",
                "description": "Client email allowed to claim ownership"
              },
              "client_full_name": {
                "type": "string",
                "default": "",
                "description": "Optional client display name"
              },
              "claim_expires_in_days": {
                "type": "integer",
                "default": 14,
                "description": "Claim link lifetime, 1-90 days"
              },
              "keep_agent_collaborator": {
                "type": "boolean",
                "default": true,
                "description": "After claim, invite the agent back as an editor collaborator"
              }
            }
          },
          "annotations": {
            "title": "Agency: Create Client App",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "agency_create_claim_link",
          "title": "Agency: Create Claim Link",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "client_email"
            ],
            "properties": {
              "note": {
                "type": "string",
                "default": "",
                "description": "Optional internal note"
              },
              "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",
                "default": "",
                "description": "Optional client display name"
              },
              "claim_expires_in_days": {
                "type": "integer",
                "default": 14,
                "description": "Claim link lifetime, 1-90 days"
              },
              "keep_agent_collaborator": {
                "type": "boolean",
                "default": true,
                "description": "Invite agent as editor after claim"
              }
            }
          },
          "annotations": {
            "title": "Agency: Create Claim Link",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "agency_get_claim_status",
          "title": "Agency: Get Claim Status",
          "description": "Agency mode only. Inspect one handoff status without exposing the raw claim token.",
          "inputSchema": {
            "type": "object",
            "required": [
              "handoff_id"
            ],
            "properties": {
              "handoff_id": {
                "type": "string",
                "description": "Handoff ID returned by agency_create_claim_link or agency_create_client_app"
              }
            }
          },
          "annotations": {
            "title": "Agency: Get Claim Status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_app",
          "title": "Update App",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "prompt"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID to update"
              },
              "prompt": {
                "type": "string",
                "description": "What to change in the app"
              }
            }
          },
          "annotations": {
            "title": "Update App",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "publish_app",
          "title": "Publish App",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID to publish"
              },
              "access_mode": {
                "enum": [
                  "infer",
                  "public_open",
                  "public_auth",
                  "private",
                  "keep"
                ],
                "type": "string",
                "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."
              },
              "make_public": {
                "type": "boolean",
                "description": "Optional explicit override for whether published URLs are publicly reachable. Prefer access_mode when possible."
              },
              "auth_required": {
                "type": "boolean",
                "description": "Optional explicit override for generated-app login requirement. Prefer access_mode when possible."
              }
            }
          },
          "annotations": {
            "title": "Publish App",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_platform_guide",
          "title": "Get Platform Guide",
          "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.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "app_id": {
                "type": "string",
                "description": "Optional app ID. If provided, the guide includes a safe app context summary."
              },
              "sections": {
                "type": "array",
                "items": {
                  "enum": [
                    "ab_testing",
                    "agency",
                    "agents",
                    "app_code",
                    "checklists",
                    "contracts",
                    "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"
                  ],
                  "type": "string"
                },
                "description": "Optional subset of guide sections to return."
              },
              "task_type": {
                "type": "string",
                "description": "Optional task hint, for example edit_app, direct_file_edit, seed_data, or publish_app."
              }
            }
          },
          "annotations": {
            "title": "Get Platform Guide",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_recommended_workflow",
          "title": "Get Recommended Workflow",
          "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.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "goal": {
                "type": "string",
                "default": "",
                "description": "Optional short description of the user's goal."
              },
              "app_id": {
                "type": "string",
                "description": "Optional app ID. If provided, the workflow includes a safe app context summary."
              },
              "task_type": {
                "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"
                ],
                "type": "string",
                "default": "unknown",
                "description": "The task type to plan."
              }
            }
          },
          "annotations": {
            "title": "Get Recommended Workflow",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_job_status",
          "title": "Get Job Status",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "description": "The job_id returned by create_app or update_app"
              }
            }
          },
          "annotations": {
            "title": "Get Job Status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_app_status",
          "title": "Get App Status",
          "description": "Get app overview: files, published state, URL, active jobs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get App Status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_app_links",
          "title": "Get App Links",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get App Links",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_app_domains",
          "title": "List App Domains",
          "description": "List an app's platform path, subdomain, and configured custom domain with verification, SSL, primary-domain, redirect, publish, and login-gating status.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "List App Domains",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_app_subdomain",
          "title": "Set App Subdomain",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "subdomain"
            ],
            "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."
              }
            }
          },
          "annotations": {
            "title": "Set App Subdomain",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "check_subdomain_available",
          "title": "Check Subdomain Available",
          "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'.",
          "inputSchema": {
            "type": "object",
            "required": [
              "subdomain"
            ],
            "properties": {
              "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'."
              },
              "subdomain": {
                "type": "string",
                "description": "Subdomain label to check"
              }
            }
          },
          "annotations": {
            "title": "Check Subdomain Available",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "add_custom_domain",
          "title": "Add Custom Domain",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "domain"
            ],
            "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"
              }
            }
          },
          "annotations": {
            "title": "Add Custom Domain",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_domain_verification",
          "title": "Get Domain Verification",
          "description": "Return the exact DNS records and instructions required to verify and route the app custom domain.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "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."
              }
            }
          },
          "annotations": {
            "title": "Get Domain Verification",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "check_domain_verification",
          "title": "Check Domain Verification",
          "description": "Check Fine Structure custom-domain verification and SSL status for the configured custom domain, then save the latest status.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "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."
              }
            }
          },
          "annotations": {
            "title": "Check Domain Verification",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "set_primary_domain",
          "title": "Set Primary Domain",
          "description": "Set which app host should be treated as primary for generated links and custom-domain redirects.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "domain"
            ],
            "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."
              }
            }
          },
          "annotations": {
            "title": "Set Primary Domain",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "remove_custom_domain",
          "title": "Remove Custom Domain",
          "description": "Remove the configured custom domain from the app and clean up the platform-side hostname registration when possible.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "domain": {
                "type": "string",
                "description": "Optional configured custom domain. If omitted, removes the current custom domain."
              }
            }
          },
          "annotations": {
            "title": "Remove Custom Domain",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_domain_ssl_status",
          "title": "Get Domain SSL Status",
          "description": "Return SSL/certificate status and pending certificate validation DNS records for the app custom domain.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "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."
              }
            }
          },
          "annotations": {
            "title": "Get Domain SSL Status",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "configure_domain_redirects",
          "title": "Configure Domain Redirects",
          "description": "Configure custom-domain redirect policy: primary domain, optional www/root redirect, and HTTPS enforcement.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "primary_domain"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "force_https": {
                "type": "boolean",
                "default": true,
                "description": "Redirect HTTP custom-domain requests to HTTPS"
              },
              "redirect_www": {
                "type": "boolean",
                "default": true,
                "description": "Redirect the www/root counterpart to primary_domain"
              },
              "primary_domain": {
                "type": "string",
                "description": "Canonical primary domain, for example example.com"
              }
            }
          },
          "annotations": {
            "title": "Configure Domain Redirects",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_apps",
          "title": "List Apps",
          "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.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "description": "Max apps to return (1-200)"
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "description": "Apps to skip, for paging"
              }
            }
          },
          "annotations": {
            "title": "List Apps",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_app_files",
          "title": "Get App Files",
          "description": "Get the file tree for an app with paths and byte sizes.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get App Files",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "read_app_file",
          "title": "Read App File",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "path"
            ],
            "properties": {
              "path": {
                "type": "string",
                "description": "Virtual file path, for example pages/Home.jsx"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "max_chars": {
                "type": "integer",
                "default": 200000,
                "description": "Maximum content characters to return"
              }
            }
          },
          "annotations": {
            "title": "Read App File",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "read_app_files",
          "title": "Read App Files",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "paths"
            ],
            "properties": {
              "paths": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Virtual file paths to read"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "max_chars_per_file": {
                "type": "integer",
                "default": 100000,
                "description": "Maximum characters per file"
              }
            }
          },
          "annotations": {
            "title": "Read App Files",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "write_app_file",
          "title": "Write App File",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "path",
              "content"
            ],
            "properties": {
              "path": {
                "type": "string",
                "description": "Virtual file path"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "content": {
                "type": "string",
                "description": "Complete file contents"
              },
              "file_type": {
                "type": "string",
                "description": "Optional file type override"
              }
            }
          },
          "annotations": {
            "title": "Write App File",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "patch_app_file",
          "title": "Patch App File",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "path",
              "old_text",
              "new_text"
            ],
            "properties": {
              "path": {
                "type": "string",
                "description": "Virtual file path"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "new_text": {
                "type": "string",
                "description": "Replacement text"
              },
              "old_text": {
                "type": "string",
                "description": "Exact existing text to replace"
              },
              "replace_all": {
                "type": "boolean",
                "default": false,
                "description": "Replace all matches instead of the first match"
              }
            }
          },
          "annotations": {
            "title": "Patch App File",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "rename_app_file",
          "title": "Rename App File",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "old_path",
              "new_path"
            ],
            "properties": {
              "force": {
                "type": "boolean",
                "default": false,
                "description": "Apply even if validation reports blocking errors"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "new_path": {
                "type": "string",
                "description": "New virtual file path"
              },
              "old_path": {
                "type": "string",
                "description": "Existing virtual file path to rename"
              },
              "overwrite": {
                "type": "boolean",
                "default": false,
                "description": "Allow replacing an existing file at new_path"
              }
            }
          },
          "annotations": {
            "title": "Rename App File",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_app_detail",
          "title": "Get App Detail",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get App Detail",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_entities",
          "title": "Get Entities",
          "description": "Get all entity (data model) schemas for an app, with record counts. Each entity has fields, types, and relationships.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get Entities",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "query_entity",
          "title": "Query Entity",
          "description": "Query app data records for one entity with optional exact-match filters.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity"
            ],
            "properties": {
              "sort": {
                "type": "string",
                "default": "-created_date",
                "description": "Sort field, prefix with - for descending"
              },
              "limit": {
                "type": "integer",
                "default": 100,
                "description": "Max records to return"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name, for example Patient"
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "description": "Pagination offset"
              },
              "filters": {
                "type": "object",
                "default": {},
                "description": "Exact-match field filters"
              }
            }
          },
          "annotations": {
            "title": "Query Entity",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "seed_entity",
          "title": "Seed Entity Records",
          "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).",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity",
              "records"
            ],
            "properties": {
              "mode": {
                "enum": [
                  "append",
                  "skip_if_not_empty"
                ],
                "type": "string",
                "default": "skip_if_not_empty",
                "description": "append always inserts; skip_if_not_empty inserts only when the entity is empty"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name"
              },
              "reason": {
                "type": "string",
                "default": "",
                "description": "Why these records should be created"
              },
              "records": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "Records to insert"
              }
            }
          },
          "annotations": {
            "title": "Seed Entity Records",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_entity_records",
          "title": "Create Entity Records",
          "description": "Create/insert records in one app entity. Executes directly for the authenticated app owner and returns the created record ids.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity",
              "records"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name"
              },
              "reason": {
                "type": "string",
                "default": "",
                "description": "Why these records should be created"
              },
              "records": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "Records to create"
              },
              "expected_count": {
                "type": "integer",
                "description": "Optional safety check; the write aborts if the record count differs"
              }
            }
          },
          "annotations": {
            "title": "Create Entity Records",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_entity_record",
          "title": "Update Entity Record",
          "description": "Compatibility tool that updates one record by ID. Executes directly for the authenticated app owner.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity",
              "record_id",
              "data"
            ],
            "properties": {
              "data": {
                "type": "object",
                "description": "Fields to merge into the record"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name"
              },
              "reason": {
                "type": "string",
                "default": "",
                "description": "Why this record should be updated"
              },
              "record_id": {
                "type": "string",
                "description": "Record ID"
              }
            }
          },
          "annotations": {
            "title": "Update Entity Record",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "update_entity_records",
          "title": "Update Entity 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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name"
              },
              "reason": {
                "type": "string",
                "default": "",
                "description": "Why these records should be updated"
              },
              "changes": {
                "type": "object",
                "description": "Shared fields to merge into every selected record"
              },
              "filters": {
                "oneOf": [
                  {
                    "type": "object"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                ],
                "description": "One exact-match selector or a list of exact-match selectors"
              },
              "updates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "record_id",
                    "changes"
                  ],
                  "properties": {
                    "changes": {
                      "type": "object"
                    },
                    "record_id": {
                      "type": "string"
                    }
                  }
                },
                "description": "Per-record changes; use instead of shared changes"
              },
              "record_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exact record IDs to update"
              },
              "expected_count": {
                "type": "integer",
                "description": "Required match count safety check, when known"
              }
            }
          },
          "annotations": {
            "title": "Update Entity Records",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_entity_records",
          "title": "Delete Entity Records",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name"
              },
              "reason": {
                "type": "string",
                "default": "",
                "description": "Why these records should be deleted"
              },
              "filters": {
                "oneOf": [
                  {
                    "type": "object"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                ],
                "description": "One exact-match selector or a list of exact-match selectors"
              },
              "record_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exact record IDs to delete"
              },
              "expected_count": {
                "type": "integer",
                "description": "Required match count safety check, when known"
              }
            }
          },
          "annotations": {
            "title": "Delete Entity Records",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_pages",
          "title": "Get Pages",
          "description": "Get all pages in an app with their file paths and sizes.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get Pages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_errors",
          "title": "Get Errors",
          "description": "Get recent runtime errors for an app (last 20). Useful for diagnosing issues before updating.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 20,
                "description": "Max errors to return (default 20)"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get Errors",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_app_analytics",
          "title": "Get App Analytics",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "default": 7,
                "description": "Window in days (1-90, default 7)"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get App Analytics",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_preview_url",
          "title": "Get Preview URL",
          "description": "Return editor preview and published/public URLs for an app.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get Preview URL",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_saved_versions",
          "title": "List Saved Versions",
          "description": "List restorable Saved Versions for an app, including versions created by MCP writes.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "List Saved Versions",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_change_set",
          "title": "Create Change Set",
          "description": "Create a staged file change set. Add multiple file changes, validate them as one app state, then apply atomically.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "label": {
                "type": "string",
                "description": "Optional short label"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Create Change Set",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "add_file_change",
          "title": "Add File Change",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "change_set_id",
              "path"
            ],
            "properties": {
              "path": {
                "type": "string",
                "description": "Virtual file path"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "content": {
                "type": "string",
                "default": "",
                "description": "Complete file contents for upsert"
              },
              "file_type": {
                "type": "string",
                "default": "",
                "description": "Optional file type override"
              },
              "operation": {
                "enum": [
                  "upsert",
                  "delete"
                ],
                "type": "string",
                "default": "upsert"
              },
              "change_set_id": {
                "type": "string",
                "description": "Change set ID"
              }
            }
          },
          "annotations": {
            "title": "Add File Change",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "validate_change_set",
          "title": "Validate Change Set",
          "description": "Validate current app files plus staged change set files before applying.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "change_set_id"
            ],
            "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
              }
            }
          },
          "annotations": {
            "title": "Validate Change Set",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "apply_change_set",
          "title": "Apply Change Set",
          "description": "Apply a staged change set to the app. Creates a Saved Version before applying. Blocks on validation errors unless force=true.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "change_set_id"
            ],
            "properties": {
              "force": {
                "type": "boolean",
                "default": false,
                "description": "Apply even if validation has errors"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "change_set_id": {
                "type": "string",
                "description": "Change set ID"
              }
            }
          },
          "annotations": {
            "title": "Apply Change Set",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "discard_change_set",
          "title": "Discard Change Set",
          "description": "Discard a pending staged change set without changing app files.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "change_set_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "change_set_id": {
                "type": "string",
                "description": "Change set ID"
              }
            }
          },
          "annotations": {
            "title": "Discard Change Set",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "validate_app",
          "title": "Validate App",
          "description": "Run deterministic app checks: syntax, imports, routes/pages, entity schemas, missing entities, and recorded runtime errors.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "include_runtime_errors": {
                "type": "boolean",
                "default": true
              }
            }
          },
          "annotations": {
            "title": "Validate App",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "inspect_preview",
          "title": "Inspect Live Preview",
          "description": "Return server-side preview context: URLs, persisted runtime/network errors, static clickable candidates, pages, and explicit live-browser availability.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "route": {
                "type": "string",
                "default": "",
                "description": "Optional route to inspect"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "auth_as": {
                "type": "string",
                "default": "",
                "description": "Optional auth simulation: anonymous"
              },
              "auth_as_role": {
                "type": "string",
                "default": "",
                "description": "Optional app role simulation, e.g. staff/admin/customer"
              }
            }
          },
          "annotations": {
            "title": "Inspect Live Preview",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_app_security_context",
          "title": "Get App Security Context",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "audit_limit": {
                "type": "integer",
                "default": 50
              }
            }
          },
          "annotations": {
            "title": "Get App Security Context",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_route_policy",
          "title": "Set Route Policy",
          "description": "Create or update a server-owned route policy for a generated app route.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "route",
              "require_auth",
              "allowed_roles"
            ],
            "properties": {
              "route": {
                "type": "string",
                "description": "Route or wildcard route, e.g. /admin/*"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "redirect_to": {
                "type": "string",
                "default": "/Login"
              },
              "require_auth": {
                "type": "boolean",
                "default": true
              },
              "allowed_roles": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Allowed app roles"
              }
            }
          },
          "annotations": {
            "title": "Set Route Policy",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "set_function_policy",
          "title": "Set Function Policy",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "function",
              "require_auth"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "function": {
                "type": "string",
                "description": "Function name, e.g. takbull_create (file functions/takbull_create.js)"
              },
              "secret_name": {
                "type": "string",
                "default": "",
                "description": "Name of the app secret holding the shared value (set_secret)"
              },
              "require_auth": {
                "type": "boolean",
                "default": true,
                "description": "false = anonymous visitors and external callers may invoke"
              },
              "sdk_identity": {
                "enum": [
                  "caller",
                  "app"
                ],
                "type": "string",
                "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"
              },
              "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"
              },
              "allowed_roles": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "default": [],
                "description": "App roles allowed when require_auth is true; 'authenticated' = any signed-in app member"
              },
              "secret_header": {
                "type": "string",
                "default": "x-fse2-secret",
                "description": "Header the caller sends the shared secret in"
              },
              "require_secret": {
                "type": "boolean",
                "default": false,
                "description": "Caller must send a shared secret header (webhooks)"
              }
            }
          },
          "annotations": {
            "title": "Set Function Policy",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "invoke_function",
          "title": "Invoke Function",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "function"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "caller": {
                "enum": [
                  "owner",
                  "anonymous"
                ],
                "type": "string",
                "default": "owner"
              },
              "params": {
                "type": "object",
                "default": {},
                "description": "JSON body passed to the function"
              },
              "headers": {
                "type": "object",
                "default": {},
                "description": "Optional extra request headers to simulate, e.g. a webhook secret header"
              },
              "function": {
                "type": "string",
                "description": "Function name, e.g. probe"
              }
            }
          },
          "annotations": {
            "title": "Invoke Function",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_platform_request",
          "title": "Create Platform Request",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "type",
              "title",
              "body"
            ],
            "properties": {
              "body": {
                "type": "string",
                "description": "Free text, markdown allowed: context, impact, what you tried"
              },
              "type": {
                "enum": [
                  "bug",
                  "feature",
                  "question"
                ],
                "type": "string"
              },
              "title": {
                "type": "string",
                "description": "One line, what is wrong or missing"
              },
              "app_id": {
                "type": "string",
                "description": "Optional: the app where it showed up"
              },
              "expected": {
                "type": "string",
                "description": "What should have happened"
              },
              "severity": {
                "enum": [
                  "blocker",
                  "high",
                  "normal",
                  "low"
                ],
                "type": "string",
                "default": "normal"
              },
              "acceptance": {
                "type": "string",
                "description": "How the team will know it is closed"
              },
              "attachments": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "default": [],
                "description": "Optional app file paths or log ids"
              },
              "reproduction": {
                "type": "string",
                "description": "Steps, invoke_function calls or curl commands that reproduce it"
              }
            }
          },
          "annotations": {
            "title": "Create Platform Request",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_platform_request",
          "title": "Get Platform Request",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "request_id"
            ],
            "properties": {
              "since": {
                "type": "string",
                "description": "Optional ISO timestamp: only events after it"
              },
              "request_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "title": "Get Platform Request",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_platform_requests",
          "title": "List Platform Requests",
          "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.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100
              },
              "scope": {
                "enum": [
                  "mine",
                  "all"
                ],
                "type": "string",
                "default": "mine",
                "description": "'all' = every account (platform team only)"
              },
              "since": {
                "type": "string",
                "description": "Optional ISO timestamp: only requests touched after it, each with changes_since"
              },
              "app_id": {
                "type": "string",
                "description": "Optional app filter"
              },
              "status": {
                "enum": [
                  "open",
                  "triaged",
                  "in_progress",
                  "needs_info",
                  "deployed",
                  "wont_fix"
                ],
                "type": "string"
              }
            }
          },
          "annotations": {
            "title": "List Platform Requests",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "reply_platform_request",
          "title": "Reply Platform Request",
          "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).",
          "inputSchema": {
            "type": "object",
            "required": [
              "request_id",
              "body"
            ],
            "properties": {
              "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)"
              },
              "request_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "title": "Reply Platform Request",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_platform_request",
          "title": "Update Platform Request",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "request_id"
            ],
            "properties": {
              "reply": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "open",
                  "triaged",
                  "in_progress",
                  "needs_info",
                  "deployed",
                  "wont_fix"
                ],
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "deployed_commit": {
                "type": "string",
                "description": "Commit hash or tag that shipped it"
              }
            }
          },
          "annotations": {
            "title": "Update Platform Request",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "set_entity_policy",
          "title": "Set Entity 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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity",
              "read",
              "write"
            ],
            "properties": {
              "read": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Roles allowed to read when rules are omitted"
              },
              "rules": {
                "type": "object",
                "required": [
                  "rules"
                ],
                "properties": {
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "actions",
                        "subject"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "actions": {
                          "type": "array",
                          "items": {
                            "enum": [
                              "create",
                              "read",
                              "update",
                              "delete",
                              "write"
                            ],
                            "type": "string"
                          },
                          "minItems": 1
                        },
                        "subject": {
                          "type": "object",
                          "required": [
                            "roles"
                          ],
                          "properties": {
                            "roles": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            }
                          },
                          "additionalProperties": false
                        },
                        "description": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "minItems": 1
                  },
                  "version": {
                    "enum": [
                      1
                    ],
                    "type": "integer"
                  }
                },
                "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
              },
              "write": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Roles allowed to write when rules are omitted"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name, e.g. Booking"
              }
            }
          },
          "annotations": {
            "title": "Set Entity Policy",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_app_members",
          "title": "List App Members",
          "description": "List generated-app runtime users/members for an app. This is separate from Studio project collaborators.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "List App Members",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "invite_app_member",
          "title": "Invite App Member",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "email",
              "role",
              "password"
            ],
            "properties": {
              "role": {
                "type": "string",
                "description": "App role, e.g. admin/staff/customer"
              },
              "email": {
                "type": "string",
                "description": "Member email"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "password": {
                "type": "string",
                "description": "The password this member signs in with, chosen by the account owner. Required, and never echoed back in the result."
              },
              "full_name": {
                "type": "string",
                "default": ""
              }
            }
          },
          "annotations": {
            "title": "Invite App Member",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_app_member_role",
          "title": "Update App Member Role",
          "description": "Update a generated-app runtime member role. This cannot assign owner and cannot change the Fine Structure account owner.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "user_id",
              "role"
            ],
            "properties": {
              "role": {
                "type": "string",
                "description": "New role"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "user_id": {
                "type": "string",
                "description": "Generated app user id"
              }
            }
          },
          "annotations": {
            "title": "Update App Member Role",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "remove_app_member",
          "title": "Remove App Member",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "user_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "user_id": {
                "type": "string",
                "description": "Generated app user id"
              }
            }
          },
          "annotations": {
            "title": "Remove App Member",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_app_security_audit",
          "title": "Get App Security Audit",
          "description": "Read recent server-side security audit events for an app.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Get App Security Audit",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "compare_saved_versions",
          "title": "Compare Saved Versions",
          "description": "Compare two Saved Versions and return per-file additions, removals, modifications, and compact diffs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "base_snapshot_id",
              "target_snapshot_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "max_diff_chars": {
                "type": "integer",
                "default": 12000
              },
              "base_snapshot_id": {
                "type": "string",
                "description": "Older/base snapshot ID"
              },
              "target_snapshot_id": {
                "type": "string",
                "description": "Newer/target snapshot ID"
              }
            }
          },
          "annotations": {
            "title": "Compare Saved Versions",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "compare_current_to_version",
          "title": "Compare Current To Version",
          "description": "Compare the current app files to a Saved Version and return compact per-file diffs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "snapshot_id"
            ],
            "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
              }
            }
          },
          "annotations": {
            "title": "Compare Current To Version",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "restore_file_from_version",
          "title": "Restore File From Version",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "snapshot_id",
              "path",
              "confirm"
            ],
            "properties": {
              "path": {
                "type": "string",
                "description": "Virtual file path to restore"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "confirm": {
                "type": "boolean",
                "default": false
              },
              "snapshot_id": {
                "type": "string",
                "description": "Saved Version snapshot ID"
              }
            }
          },
          "annotations": {
            "title": "Restore File From Version",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "create_entity_schema",
          "title": "Create Entity Schema",
          "description": "Create an entity schema file in entities/<Entity>.json. Creates a Saved Version before writing.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity",
              "schema"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name"
              },
              "schema": {
                "type": "object",
                "description": "JSON schema object"
              },
              "indexes": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "default": []
              },
              "metadata": {
                "type": "object",
                "default": {}
              },
              "overwrite": {
                "type": "boolean",
                "default": false
              },
              "relationships": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "default": []
              }
            }
          },
          "annotations": {
            "title": "Create Entity Schema",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_entity_schema",
          "title": "Update Entity Schema",
          "description": "Replace or shallow-merge an existing entity schema file. Creates a Saved Version before writing.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity",
              "schema"
            ],
            "properties": {
              "merge": {
                "type": "boolean",
                "default": true
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name"
              },
              "schema": {
                "type": "object",
                "description": "Schema fields to set or merge"
              },
              "indexes": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "default": []
              },
              "metadata": {
                "type": "object",
                "default": {}
              },
              "relationships": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "default": []
              }
            }
          },
          "annotations": {
            "title": "Update Entity Schema",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "validate_entity_relationships",
          "title": "Validate Entity Relationships",
          "description": "Validate entity relationship metadata and *_id references against existing entity schemas.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Validate Entity Relationships",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_entity_metadata",
          "title": "Update Entity Metadata",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "entity"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "entity": {
                "type": "string",
                "description": "Entity name"
              },
              "indexes": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "default": []
              },
              "metadata": {
                "type": "object",
                "default": {}
              },
              "relationships": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "default": []
              }
            }
          },
          "annotations": {
            "title": "Update Entity Metadata",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_secret_keys",
          "title": "List Secret Keys",
          "description": "List secret key names for an app. Secret values are never returned.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "List Secret Keys",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_secret",
          "title": "Set Secret",
          "description": "Create or update one encrypted app secret. The secret value is never returned.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "key",
              "value"
            ],
            "properties": {
              "key": {
                "type": "string",
                "description": "Secret key name"
              },
              "value": {
                "type": "string",
                "description": "Secret value to encrypt and store"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Set Secret",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_secret",
          "title": "Delete Secret",
          "description": "Delete one app secret by key.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "key"
            ],
            "properties": {
              "key": {
                "type": "string",
                "description": "Secret key name"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "Delete Secret",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_integrations",
          "title": "List Integrations",
          "description": "List supported integrations and safe connected integration metadata for an app. Tokens/secrets are never returned.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "List Integrations",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "configure_integration",
          "title": "Configure Integration",
          "description": "Store safe non-secret integration metadata for an app. Use set_secret for API keys/tokens.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "provider",
              "config"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "config": {
                "type": "object",
                "description": "Safe metadata only, such as workspace/team/name/email"
              },
              "provider": {
                "type": "string",
                "description": "Integration provider ID"
              },
              "is_active": {
                "type": "boolean",
                "default": true,
                "description": "Set false to disconnect this integration metadata"
              }
            }
          },
          "annotations": {
            "title": "Configure Integration",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_ab_tests",
          "title": "List A/B Tests",
          "description": "List the platform A/B tests configured for an app.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              }
            }
          },
          "annotations": {
            "title": "List A/B Tests",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_ab_test",
          "title": "Create A/B Test",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "name",
              "page_name",
              "variants"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Experiment name"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "variants": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "page_name",
                    "traffic_percent"
                  ],
                  "properties": {
                    "page_name": {
                      "type": "string",
                      "description": "Existing app page name or path"
                    },
                    "traffic_percent": {
                      "type": "integer",
                      "description": "Traffic percentage for this variant"
                    }
                  }
                },
                "description": "At least two variants. Traffic must total 100."
              },
              "is_active": {
                "type": "boolean",
                "default": true,
                "description": "Whether to activate the test immediately"
              },
              "page_name": {
                "type": "string",
                "description": "Base route page that triggers the experiment"
              },
              "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'}"
              }
            }
          },
          "annotations": {
            "title": "Create A/B Test",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_ab_test",
          "title": "Update A/B Test",
          "description": "Update a native A/B test, including active state, variants, traffic, and conversion goal. Creates a Saved Version before the change.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "test_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Optional new name"
              },
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "test_id": {
                "type": "string",
                "description": "A/B test ID"
              },
              "variants": {
                "type": "array",
                "items": {
                  "type": "object"
                },
                "description": "Optional replacement variants. Traffic must total 100."
              },
              "is_active": {
                "type": "boolean",
                "description": "Optional active state"
              },
              "page_name": {
                "type": "string",
                "description": "Optional new base route page"
              },
              "goal_event_type": {
                "type": "string",
                "description": "Optional conversion goal type"
              },
              "goal_event_filter": {
                "type": "object",
                "description": "Optional conversion goal filter"
              }
            }
          },
          "annotations": {
            "title": "Update A/B Test",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_ab_test",
          "title": "Delete A/B Test",
          "description": "Delete a native A/B test from an app. Creates a Saved Version before the change.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "test_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "test_id": {
                "type": "string",
                "description": "A/B test ID"
              }
            }
          },
          "annotations": {
            "title": "Delete A/B Test",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_ab_test_stats",
          "title": "Get A/B Test Stats",
          "description": "Get views, unique visitors, conversions, and conversion rates for an A/B test.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "test_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "description": "The app ID"
              },
              "test_id": {
                "type": "string",
                "description": "A/B test ID"
              }
            }
          },
          "annotations": {
            "title": "Get A/B Test Stats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_app_metadata",
          "title": "Get App Metadata",
          "description": "Read the saved public HTML-shell identity: name, description, language and image URLs/dimensions. Same settings as Studio SEO/GEO.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get App Metadata",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_app_metadata",
          "title": "Set App Metadata",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "icon": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "base64",
                      "content_type"
                    ],
                    "properties": {
                      "base64": {
                        "type": "string"
                      },
                      "content_type": {
                        "enum": [
                          "image/png",
                          "image/jpeg",
                          "image/webp"
                        ],
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "app_id": {
                "type": "string"
              },
              "language": {
                "type": "string",
                "description": "BCP-47 code, e.g. he, ar, en-US"
              },
              "description": {
                "type": "string",
                "maxLength": 4000
              },
              "social_image": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "base64",
                      "content_type"
                    ],
                    "properties": {
                      "base64": {
                        "type": "string"
                      },
                      "content_type": {
                        "enum": [
                          "image/png",
                          "image/jpeg",
                          "image/webp"
                        ],
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "structured_data": {
                "type": "string",
                "description": "Optional JSON-LD JSON string; empty clears it"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set App Metadata",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "preview_saved_version",
          "title": "Preview Saved Version",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "snapshot_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "minLength": 1
              },
              "snapshot_id": {
                "type": "string",
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Preview Saved Version",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_agent_owner_relay",
          "title": "Set Agent Owner Relay",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "receiving_agent_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "source_agent_id": {
                "type": "string",
                "default": "*",
                "minLength": 1
              },
              "receiving_agent_id": {
                "type": "string",
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Agent Owner Relay",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_agent",
          "title": "Create Agent",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "role",
              "description"
            ],
            "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')"
              },
              "app_id": {
                "type": "string",
                "description": "Optional app to attach the agent to; account-level when omitted"
              },
              "persona": {
                "type": "string",
                "description": "Optional working style and tone instructions for the agent"
              },
              "description": {
                "type": "string",
                "description": "What this agent is responsible for, one or two sentences"
              }
            }
          },
          "annotations": {
            "title": "Create Agent",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_agents",
          "title": "List Agents",
          "description": "List the AI agents on the user's account with id, name, role, status and FineMail address.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "app_id": {
                "type": "string",
                "description": "Optional filter by attached app"
              }
            }
          },
          "annotations": {
            "title": "List Agents",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_agent_task",
          "title": "Schedule Agent Task",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "title",
              "instructions",
              "schedule"
            ],
            "properties": {
              "title": {
                "type": "string",
                "description": "Short task title"
              },
              "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)."
              },
              "activate": {
                "type": "boolean",
                "default": true,
                "description": "Start the schedule immediately (true) or save as draft (false)"
              },
              "agent_id": {
                "type": "string",
                "description": "The agent id (from create_agent or list_agents)"
              },
              "max_runs": {
                "type": "integer",
                "default": 0,
                "description": "Optional cap on total runs (0 = unlimited)"
              },
              "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\"}"
              },
              "instructions": {
                "type": "string",
                "description": "What the agent should do on each run, written as instructions to the agent"
              },
              "deliver_results": {
                "type": "boolean",
                "description": "Whether each run's final reply is sent to the user (WhatsApp, else their verified email): true when every run's result is what they asked for (a daily summary, a report); false when the agent tells them itself only when something is found, so runs stay in the task log. Set it for every recurring task; a one-time task delivers unless false."
              }
            }
          },
          "annotations": {
            "title": "Schedule Agent Task",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_agent_tasks",
          "title": "List Agent Tasks",
          "description": "List scheduled tasks for one agent (or the whole account), including schedule, status and next_run_at.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "description": "Max tasks to return (1-100)"
              },
              "status": {
                "type": "string",
                "description": "Optional status filter: draft, active, paused, archived"
              },
              "agent_id": {
                "type": "string",
                "description": "Optional agent id filter"
              }
            }
          },
          "annotations": {
            "title": "List Agent Tasks",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_agent_whatsapp",
          "title": "Get Agent Whatsapp",
          "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.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "agent_id": {
                "type": "string",
                "description": "Optional: report only this agent's WhatsApp state."
              }
            }
          },
          "annotations": {
            "title": "Get Agent Whatsapp",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "start_owner_phone_verification",
          "title": "Start Owner Phone Verification",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "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."
              }
            }
          },
          "annotations": {
            "title": "Start Owner Phone Verification",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "confirm_owner_phone_verification",
          "title": "Confirm 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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The 6-digit code from the WhatsApp message."
              },
              "phone": {
                "type": "string",
                "description": "The same phone number the code was sent to."
              },
              "region": {
                "type": "string",
                "description": "Optional ISO region hint, matching the one used when sending."
              }
            }
          },
          "annotations": {
            "title": "Confirm Owner Phone Verification",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "attach_agent_whatsapp",
          "title": "Attach Agent Whatsapp",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "phone_number_id"
            ],
            "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."
              }
            }
          },
          "annotations": {
            "title": "Attach Agent Whatsapp",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "detach_agent_whatsapp",
          "title": "Detach Agent Whatsapp",
          "description": "Disconnect the owner's WhatsApp route from a platform number. Removes only this account's route; other accounts sharing the number keep theirs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone_number_id"
            ],
            "properties": {
              "phone_number_id": {
                "type": "string",
                "description": "The number to disconnect, from get_agent_whatsapp."
              }
            }
          },
          "annotations": {
            "title": "Detach Agent Whatsapp",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_agent_conversations",
          "title": "List Agent Conversations",
          "description": "List recent visible conversations belonging to one of your agents. Use get_agent_conversation to read replies and results.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 100,
                "minimum": 1
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "Owned agent ID from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Agent Conversations",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "send_agent_message",
          "title": "Send Agent Message",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "message"
            ],
            "properties": {
              "message": {
                "type": "string",
                "minLength": 1
              },
              "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."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Send Agent Message",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_agent_conversation",
          "title": "Get Agent 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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "conversation_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 100,
                "minimum": 1
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "Owned agent ID from list_agents."
              },
              "before_id": {
                "type": "string"
              },
              "conversation_id": {
                "type": "string",
                "minLength": 1,
                "description": "Conversation ID returned by these tools."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Agent Conversation",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_agent_task",
          "title": "Get Agent Task",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "task_id"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "minLength": 1
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "Owned agent ID from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Agent Task",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_agent",
          "title": "Get Agent",
          "description": "Read one agent: name, role, description, persona (its standing instructions), status, email address, WhatsApp number and which capability groups are switched on.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id"
            ],
            "properties": {
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Agent",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_agent",
          "title": "Update Agent",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              "role": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              "persona": {
                "type": "string",
                "maxLength": 20000,
                "description": "Standing instructions: how the agent works and speaks."
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Agent",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "set_agent_status",
          "title": "Set Agent Status",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "status"
            ],
            "properties": {
              "status": {
                "enum": [
                  "active",
                  "paused",
                  "archived"
                ],
                "type": "string"
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Agent Status",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_agent_activity",
          "title": "List Agent Activity",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 20,
                "maximum": 100,
                "minimum": 1
              },
              "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)."
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "status": {
                "type": "string",
                "description": "Optional run status, for example completed, failed, blocked."
              },
              "agent_id": {
                "type": "string",
                "description": "Optional: one agent only."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Agent Activity",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_agent_approvals",
          "title": "List Agent Approvals",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 100,
                "minimum": 1
              },
              "status": {
                "enum": [
                  "pending",
                  "approved",
                  "rejected",
                  "executed",
                  "failed"
                ],
                "type": "string",
                "default": "pending"
              },
              "agent_id": {
                "type": "string",
                "description": "Optional: one agent only."
              },
              "language": {
                "enum": [
                  "en",
                  "he"
                ],
                "type": "string",
                "default": "en",
                "description": "Language of the descriptions."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Agent Approvals",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_credit_balance",
          "title": "Get Credit Balance",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {},
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Credit Balance",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_agent_task",
          "title": "Update Agent Task",
          "description": "Change a scheduled task: title, instructions, schedule (same shape as schedule_agent_task), max_runs, status active/paused, or deliver_results (same meaning as in schedule_agent_task). Only the fields given change. Returns the next run in UTC and in the schedule's timezone.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "task_id"
            ],
            "properties": {
              "title": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "status": {
                "enum": [
                  "active",
                  "paused"
                ],
                "type": "string"
              },
              "task_id": {
                "type": "string",
                "minLength": 1,
                "description": "The task id, from list_agent_tasks."
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              },
              "max_runs": {
                "type": "integer",
                "maximum": 1000,
                "minimum": 0
              },
              "schedule": {
                "type": "object"
              },
              "instructions": {
                "type": "string",
                "maxLength": 20000,
                "minLength": 1
              },
              "deliver_results": {
                "type": "boolean",
                "description": "Whether each run's final reply is sent to the user (WhatsApp, else their verified email): true when every run's result is what they asked for; false when the agent tells them itself only when something is found, so runs stay in the task log."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Agent Task",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "archive_agent_task",
          "title": "Archive Agent Task",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "task_id"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "minLength": 1,
                "description": "The task id, from list_agent_tasks."
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Archive Agent Task",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "run_agent_task_now",
          "title": "Run Agent Task Now",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "task_id"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "minLength": 1,
                "description": "The task id, from list_agent_tasks."
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Run Agent Task Now",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "stop_agent_task",
          "title": "Stop Agent Task",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "task_id"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 500,
                "description": "Optional reason, kept with the record."
              },
              "task_id": {
                "type": "string",
                "minLength": 1,
                "description": "The task id, from list_agent_tasks."
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Stop Agent Task",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "cancel_agent_run",
          "title": "Cancel Agent Run",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "run_id"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 500,
                "description": "Optional reason, kept with the record."
              },
              "run_id": {
                "type": "string",
                "minLength": 1
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Cancel Agent Run",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_agent_goals",
          "title": "List Agent Goals",
          "description": "An agent's goals: objective, success criteria, plan, status, progress, current step and the background runner task that works on it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100,
                "maximum": 300,
                "minimum": 1
              },
              "status": {
                "enum": [
                  "active",
                  "paused",
                  "completed",
                  "archived",
                  "blocked"
                ],
                "type": "string"
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Agent Goals",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_agent_goal",
          "title": "Create Agent Goal",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "objective"
            ],
            "properties": {
              "plan": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 500
                },
                "maxItems": 20
              },
              "title": {
                "type": "string",
                "maxLength": 200
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              },
              "objective": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 1
              },
              "max_iterations": {
                "type": "integer",
                "default": 20,
                "maximum": 200,
                "minimum": 1
              },
              "interval_minutes": {
                "type": "integer",
                "default": 15,
                "maximum": 1440,
                "minimum": 5
              },
              "success_criteria": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Agent Goal",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_agent_goal",
          "title": "Update Agent Goal",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "goal_id"
            ],
            "properties": {
              "plan": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 500
                },
                "maxItems": 20
              },
              "title": {
                "type": "string",
                "maxLength": 200
              },
              "status": {
                "enum": [
                  "active",
                  "paused",
                  "completed",
                  "archived"
                ],
                "type": "string"
              },
              "goal_id": {
                "type": "string",
                "minLength": 1,
                "description": "The goal id, from list_agent_goals."
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              },
              "objective": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 1
              },
              "max_iterations": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1
              },
              "success_criteria": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Agent Goal",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "archive_agent_goal",
          "title": "Archive Agent Goal",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "goal_id"
            ],
            "properties": {
              "goal_id": {
                "type": "string",
                "minLength": 1,
                "description": "The goal id, from list_agent_goals."
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Archive Agent Goal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "run_agent_goal_now",
          "title": "Run Agent Goal Now",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "goal_id"
            ],
            "properties": {
              "goal_id": {
                "type": "string",
                "minLength": 1,
                "description": "The goal id, from list_agent_goals."
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Run Agent Goal Now",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_org_goals",
          "title": "List Org Goals",
          "description": "The owner's company-wide goals, the shared objectives every agent aligns to, with progress.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "status": {
                "enum": [
                  "active",
                  "paused",
                  "done",
                  "cancelled",
                  "all"
                ],
                "type": "string",
                "default": "active"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Org Goals",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_org_goal",
          "title": "Create Org Goal",
          "description": "Add a company-wide goal for the whole agent team to align to.",
          "inputSchema": {
            "type": "object",
            "required": [
              "title"
            ],
            "properties": {
              "title": {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              "objective": {
                "type": "string",
                "maxLength": 4000
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Org Goal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_org_goal",
          "title": "Update Org Goal",
          "description": "Change a company-wide goal's title, objective, status (active, paused, done, cancelled) or progress (0-100). Only the fields given change.",
          "inputSchema": {
            "type": "object",
            "required": [
              "goal_id"
            ],
            "properties": {
              "title": {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              "status": {
                "enum": [
                  "active",
                  "paused",
                  "done",
                  "cancelled"
                ],
                "type": "string"
              },
              "goal_id": {
                "type": "string",
                "minLength": 1,
                "description": "The org goal id, from list_org_goals."
              },
              "progress": {
                "type": "integer",
                "maximum": 100,
                "minimum": 0
              },
              "objective": {
                "type": "string",
                "maxLength": 4000
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Org Goal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_org_goal_updates",
          "title": "List Org Goal Updates",
          "description": "The progress notes agents wrote on a company-wide goal, newest first.",
          "inputSchema": {
            "type": "object",
            "required": [
              "goal_id"
            ],
            "properties": {
              "goal_id": {
                "type": "string",
                "minLength": 1,
                "description": "The org goal id, from list_org_goals."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Org Goal Updates",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_agent_triggers",
          "title": "List Agent Triggers",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100,
                "maximum": 300,
                "minimum": 1
              },
              "status": {
                "enum": [
                  "active",
                  "paused"
                ],
                "type": "string"
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              },
              "trigger_type": {
                "enum": [
                  "event",
                  "schedule",
                  "watch",
                  "webhook"
                ],
                "type": "string"
              },
              "include_archived": {
                "type": "boolean",
                "default": false
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Agent Triggers",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_agent_trigger",
          "title": "Create Agent Trigger",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "source": {
                "type": "string",
                "maxLength": 120
              },
              "status": {
                "enum": [
                  "active",
                  "paused"
                ],
                "type": "string",
                "default": "active"
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              },
              "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\"}."
              },
              "event_type": {
                "type": "string",
                "maxLength": 120
              },
              "instructions": {
                "type": "string",
                "maxLength": 20000
              },
              "trigger_type": {
                "enum": [
                  "event",
                  "schedule",
                  "watch"
                ],
                "type": "string",
                "default": "event"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Agent Trigger",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_agent_trigger",
          "title": "Update Agent Trigger",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "trigger_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "source": {
                "type": "string",
                "maxLength": 120
              },
              "status": {
                "enum": [
                  "active",
                  "paused"
                ],
                "type": "string"
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              },
              "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\"}."
              },
              "event_type": {
                "type": "string",
                "maxLength": 120
              },
              "trigger_id": {
                "type": "string",
                "minLength": 1,
                "description": "The trigger id, from list_agent_triggers."
              },
              "instructions": {
                "type": "string",
                "maxLength": 20000
              },
              "trigger_type": {
                "enum": [
                  "event",
                  "schedule",
                  "watch"
                ],
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Agent Trigger",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "archive_agent_trigger",
          "title": "Archive Agent Trigger",
          "description": "Retire a trigger: it never starts the agent again and stays readable. Use this when the owner asks to delete a trigger.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "trigger_id"
            ],
            "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."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Archive Agent Trigger",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "run_agent_trigger_now",
          "title": "Run Agent Trigger Now",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id",
              "trigger_id"
            ],
            "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."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Run Agent Trigger Now",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_agent_memories",
          "title": "List Agent Memories",
          "description": "What an agent has learned and kept: long-term facts and insights, newest first, optionally only those about one customer.",
          "inputSchema": {
            "type": "object",
            "required": [
              "agent_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100,
                "maximum": 300,
                "minimum": 1
              },
              "agent_id": {
                "type": "string",
                "minLength": 1,
                "description": "The agent id, from list_agents."
              },
              "customer_id": {
                "type": "string",
                "maxLength": 200
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Agent Memories",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_team_templates",
          "title": "List Team Templates",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "lang": {
                "type": "string",
                "pattern": "^[a-z]{2}(-[A-Za-z]{2})?$",
                "description": "Language of the catalog text, e.g. en or he."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Team Templates",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_agent_team",
          "title": "Create Agent Team",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "template"
            ],
            "properties": {
              "lang": {
                "type": "string",
                "pattern": "^[a-z]{2}(-[A-Za-z]{2})?$",
                "description": "Language of the catalog text, e.g. en or he."
              },
              "template": {
                "type": "string",
                "maxLength": 80,
                "minLength": 1,
                "description": "A template key from list_team_templates."
              },
              "company_name": {
                "type": "string",
                "maxLength": 120
              },
              "requirements": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Agent Team",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_agent_templates",
          "title": "List Agent Templates",
          "description": "Ready-made single agent templates: role, description and suggested persona, for create_agent.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {},
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Agent Templates",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_connections",
          "title": "List Connections",
          "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",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "provider": {
                "type": "string",
                "maxLength": 60,
                "description": "Optional provider, for example mcp, imap, google_drive, zoom."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Connections",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_connection_catalog",
          "title": "List Connection Catalog",
          "description": "Every service the platform can connect, with whether this account has connected it, whether one-click sign-in is available, and its connections. Also social_publishing: the social networks the owner's agents can publish to (Facebook, Instagram, LinkedIn, TikTok and others), the accounts connected for it, how many places this account has, and where it is connected.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {},
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Connection Catalog",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_connection_access",
          "title": "Get Connection Access",
          "description": "Which of the owner's agents and apps may use one connection (from list_connections).",
          "inputSchema": {
            "type": "object",
            "required": [
              "connection_id"
            ],
            "properties": {
              "connection_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Connection Access",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_connection_status",
          "title": "Get Connection Status",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "refresh": {
                "type": "boolean",
                "default": false
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Connection Status",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_facebook_ad_accounts",
          "title": "List Facebook Ad Accounts",
          "description": "The ad accounts the connected Facebook account reaches, and which of them agents may use (an empty allowed list means all).",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {},
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Facebook Ad Accounts",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "search_connectable_apps",
          "title": "Search Connectable Apps",
          "description": "Third-party apps an agent can be connected to (thousands, through the apps lane), with the account's own connections. Search by name.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 30,
                "maximum": 100,
                "minimum": 1
              },
              "search": {
                "type": "string",
                "maxLength": 120
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Search Connectable Apps",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_connectable_app_tools",
          "title": "List Connectable App Tools",
          "description": "What an agent could do with one third-party app once it is connected: its actions.",
          "inputSchema": {
            "type": "object",
            "required": [
              "toolkit"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 30,
                "maximum": 100,
                "minimum": 1
              },
              "search": {
                "type": "string",
                "maxLength": 120
              },
              "toolkit": {
                "type": "string",
                "maxLength": 80,
                "minLength": 1,
                "description": "An app slug from search_connectable_apps."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Connectable App Tools",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_make_migration_report",
          "title": "Get Make Migration Report",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {},
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Make Migration Report",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_event_connections",
          "title": "List Event Connections",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {},
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Event Connections",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_event_connection_events",
          "title": "List Event Connection Events",
          "description": "The latest 100 events a source received and what each did: status, step results, errors.",
          "inputSchema": {
            "type": "object",
            "required": [
              "source_id"
            ],
            "properties": {
              "source_id": {
                "type": "string",
                "maxLength": 80,
                "minLength": 1,
                "description": "The source id (src_...), from list_event_connections."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Event Connection Events",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_event_connection_revisions",
          "title": "List Event Connection Revisions",
          "description": "The saved versions of a source's configuration.",
          "inputSchema": {
            "type": "object",
            "required": [
              "source_id"
            ],
            "properties": {
              "source_id": {
                "type": "string",
                "maxLength": 80,
                "minLength": 1,
                "description": "The source id (src_...), from list_event_connections."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Event Connection Revisions",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "preview_event_connection",
          "title": "Preview Event Connection",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "source_id",
              "event"
            ],
            "properties": {
              "event": {
                "type": "object",
                "description": "A sample event, as the external system sends it."
              },
              "source_id": {
                "type": "string",
                "maxLength": 80,
                "minLength": 1,
                "description": "The source id (src_...), from list_event_connections."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Preview Event Connection",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "pause_event_connection",
          "title": "Pause Event Connection",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "source_id"
            ],
            "properties": {
              "source_id": {
                "type": "string",
                "maxLength": 80,
                "minLength": 1,
                "description": "The source id (src_...), from list_event_connections."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Pause Event Connection",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_knowledge_notebooks",
          "title": "List Knowledge Notebooks",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Knowledge Notebooks",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_knowledge_folders",
          "title": "List Knowledge Folders",
          "description": "The folders the notebooks are filed in, nested.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Knowledge Folders",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_knowledge_documents",
          "title": "List Knowledge Documents",
          "description": "The documents (sources) of a notebook: name, type, status (queued, processing, ready, failed), size and error.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Knowledge Documents",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_notebook_overview",
          "title": "Get Knowledge Notebook Overview",
          "description": "A notebook's overview: the summary written from its sources, document counts by state, and which sources are ready.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Notebook Overview",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "read_knowledge_document",
          "title": "Read Knowledge Document",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "document_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "max_chars": {
                "type": "integer",
                "default": 50000,
                "maximum": 200000,
                "minimum": 1000
              },
              "document_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The document id, from list_knowledge_documents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Read Knowledge Document",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_knowledge_notes",
          "title": "List Knowledge Notes",
          "description": "The notes written in a notebook, with their full text.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Knowledge Notes",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_knowledge_chats",
          "title": "List Knowledge Chats",
          "description": "The conversations held with a notebook, newest first.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 200,
                "minimum": 1
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Knowledge Chats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_chat",
          "title": "Get Knowledge Chat",
          "description": "One conversation with a notebook: the questions and the answers with their sources.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "chat_session_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100,
                "maximum": 300,
                "minimum": 1
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              },
              "chat_session_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Chat",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_answer",
          "title": "Get Knowledge Answer",
          "description": "The state and, once ready, the answer of a question asked with ask_knowledge_notebook.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "query_job_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              },
              "query_job_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Answer",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_notebook_access",
          "title": "Get Knowledge Notebook Access",
          "description": "Who can use a notebook: the apps that answer from it and the owner's agents it is connected to.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Notebook Access",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_app_knowledge_access",
          "title": "Get App Knowledge Access",
          "description": "Which of the owner's notebooks an app's AI may answer from, and the ones it could be given.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get App Knowledge Access",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_knowledge_webhooks",
          "title": "List Knowledge Webhooks",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Knowledge Webhooks",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_redaction_run",
          "title": "Get Knowledge Redaction Run",
          "description": "A sensitive-data scan: per document its state and what was found (category, the text, the suggested replacement, confidence), and what was applied.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "run_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "run_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The scan id, from scan_knowledge_for_sensitive_data."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Redaction Run",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_redaction_policy",
          "title": "Get Knowledge Redaction Policy",
          "description": "A notebook's automatic redaction policy for new uploads.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Redaction Policy",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_redaction_log",
          "title": "Get Knowledge Redaction Log",
          "description": "What was redacted in one document, by category and count, and whether the original was kept.",
          "inputSchema": {
            "type": "object",
            "required": [
              "document_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "document_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The document id, from list_knowledge_documents."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Redaction Log",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_access_log",
          "title": "Get Knowledge Access Log",
          "description": "Who opened, asked or changed the notebooks, newest first: people, apps and agents.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 100,
                "maximum": 500,
                "minimum": 1
              },
              "action": {
                "type": "string",
                "maxLength": 40
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "offset": {
                "type": "integer",
                "default": 0,
                "minimum": 0
              },
              "actor_type": {
                "enum": [
                  "user",
                  "app",
                  "agent"
                ],
                "type": "string"
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional: one notebook only."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Access Log",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_failed_knowledge_documents",
          "title": "List Failed Knowledge Documents",
          "description": "Documents whose processing failed, with the error, so they can be retried or replaced.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Failed Knowledge Documents",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_knowledge_notebook",
          "title": "Create Knowledge Notebook",
          "description": "Create an empty notebook, optionally inside a folder.",
          "inputSchema": {
            "type": "object",
            "required": [
              "title"
            ],
            "properties": {
              "title": {
                "type": "string",
                "maxLength": 180,
                "minLength": 1
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "folder_id": {
                "type": "string",
                "maxLength": 120
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Knowledge Notebook",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "rename_knowledge_notebook",
          "title": "Rename Knowledge Notebook",
          "description": "Change a notebook's title; its documents and notes stay as they are.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "title"
            ],
            "properties": {
              "title": {
                "type": "string",
                "maxLength": 180,
                "minLength": 1
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Rename Knowledge Notebook",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_knowledge_folder",
          "title": "Create Knowledge Folder",
          "description": "Create a folder for notebooks, optionally inside another folder.",
          "inputSchema": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "parent_id": {
                "type": "string",
                "maxLength": 120
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Knowledge Folder",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_knowledge_folder",
          "title": "Update Knowledge Folder",
          "description": "Rename a folder, or move it: parent_id is the new parent, an empty string moves it to the top.",
          "inputSchema": {
            "type": "object",
            "required": [
              "folder_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "folder_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              "parent_id": {
                "type": "string",
                "maxLength": 120
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Knowledge Folder",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "move_knowledge_notebook",
          "title": "Move Knowledge Notebook",
          "description": "File a notebook in a folder; an empty or missing folder_id moves it to the top.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "folder_id": {
                "type": "string",
                "maxLength": 120
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Move Knowledge Notebook",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "set_app_knowledge_access",
          "title": "Set App Knowledge Access",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "notebook_ids"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app."
              },
              "notebook_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 120,
                  "minLength": 1
                },
                "maxItems": 200
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set App Knowledge Access",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "add_knowledge_note",
          "title": "Add Knowledge Note",
          "description": "Write a note into a notebook; agents and apps answer from it like from a document.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "content"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "content": {
                "type": "string",
                "maxLength": 100000,
                "minLength": 1
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Add Knowledge Note",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_knowledge_note",
          "title": "Update Knowledge Note",
          "description": "Replace the text of a note in a notebook with new text.",
          "inputSchema": {
            "type": "object",
            "required": [
              "note_id",
              "content"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "content": {
                "type": "string",
                "maxLength": 100000,
                "minLength": 1
              },
              "note_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Knowledge Note",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "add_knowledge_document",
          "title": "Add Knowledge Document",
          "description": "Add a document to a notebook: plain text, or a small file (PDF, Word, text, audio) as base64, up to 10 MB. It is processed in the background (audio is transcribed); list_knowledge_documents shows when it is ready. The same file twice is recognised. A recording or a file on the user's computer goes with create_knowledge_upload instead, so the bytes never pass through the conversation.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "filename"
            ],
            "properties": {
              "text": {
                "type": "string",
                "maxLength": 2000000,
                "minLength": 1
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "filename": {
                "type": "string",
                "pattern": "^[^/\\\\]+$",
                "maxLength": 200,
                "minLength": 1
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              },
              "content_type": {
                "type": "string",
                "maxLength": 120
              },
              "content_base64": {
                "type": "string",
                "maxLength": 14000000,
                "minLength": 4
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Add Knowledge Document",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "import_knowledge_audio_url",
          "title": "Import Knowledge Audio URL",
          "description": "Download a public audio file (a recording, a podcast episode) into a new notebook and transcribe it there.",
          "inputSchema": {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "pattern": "^https?://",
                "maxLength": 2000,
                "minLength": 8
              },
              "title": {
                "type": "string",
                "maxLength": 240
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "folder_id": {
                "type": "string",
                "maxLength": 120
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Import Knowledge Audio URL",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_knowledge_upload",
          "title": "Create Knowledge Upload",
          "description": "Send a file from the user's own computer into a notebook, for a client that can run a command there (Codex, Claude Code, Cursor): a recording to transcribe (.mp3 .m4a .wav .ogg .webm .flac .mp4 .mpeg .mpga, WhatsApp voice notes .opus, .aac .amr .3gp .3ga .wma .oga) or a document (.pdf .docx .txt .md .csv .tsv), up to 1 GB. Give the file name and its exact size_bytes, and sha256 when you can. Returns an upload_url and ready commands: one curl PUT for a file up to 32 MB, else a short Python script that sends 32 MB chunks with Content-Range and resumes after an interruption. Run the command on the computer that holds the file; the bytes never pass through the conversation. Without notebook_id a new notebook named after the file (or title) is made when the last byte arrives. A recording takes one place in the account's transcription allowance, which depends on its plan and renews with its credits; the reply says how many places are left. Follow it with get_knowledge_upload.",
          "inputSchema": {
            "type": "object",
            "required": [
              "filename",
              "size_bytes"
            ],
            "properties": {
              "title": {
                "type": "string",
                "maxLength": 240,
                "description": "Title for the new notebook, when notebook_id is omitted."
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "sha256": {
                "type": "string",
                "maxLength": 64,
                "description": "Optional hex sha256 of the file; a mismatch is refused."
              },
              "filename": {
                "type": "string",
                "pattern": "^[^/\\\\]+$",
                "maxLength": 200,
                "minLength": 1,
                "description": "The file's name with its extension, e.g. meeting-11-12.m4a."
              },
              "folder_id": {
                "type": "string",
                "maxLength": 120,
                "description": "Folder for the new notebook."
              },
              "size_bytes": {
                "type": "integer",
                "minimum": 1,
                "description": "The exact file size in bytes."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional: an existing notebook. Omitted: a new one."
              },
              "content_type": {
                "type": "string",
                "maxLength": 120
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Knowledge Upload",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_upload",
          "title": "Get Knowledge Upload",
          "description": "Where a create_knowledge_upload stands: the bytes received, then the document it became and its processing state (a recording is ready once transcribed; read_knowledge_document gives the text). Pass the same app_id the upload was made with.",
          "inputSchema": {
            "type": "object",
            "required": [
              "upload_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "upload_id": {
                "type": "string",
                "maxLength": 40,
                "minLength": 4,
                "description": "The upload_id create_knowledge_upload returned."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Upload",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "rename_knowledge_document",
          "title": "Rename Knowledge Document",
          "description": "Set the name a document is shown under (its file name stays); an empty name clears it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "document_id",
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "document_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The document id, from list_knowledge_documents."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Rename Knowledge Document",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "retry_knowledge_document",
          "title": "Retry Knowledge Document",
          "description": "Process a document again after it failed or stalled.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "document_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "document_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The document id, from list_knowledge_documents."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Retry Knowledge Document",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "ask_knowledge_notebook",
          "title": "Ask Knowledge Notebook",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "question"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "question": {
                "type": "string",
                "maxLength": 8000,
                "minLength": 1
              },
              "source_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 120,
                  "minLength": 1
                },
                "maxItems": 100,
                "description": "Optional: answer only from these documents."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              },
              "chat_session_id": {
                "type": "string",
                "maxLength": 120
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Ask Knowledge Notebook",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "set_knowledge_webhook_enabled",
          "title": "Set Knowledge Webhook Enabled",
          "description": "Turn an ingest webhook off (posts are refused) or on again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "webhook_id",
              "enabled"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "enabled": {
                "type": "boolean"
              },
              "webhook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Knowledge Webhook Enabled",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "scan_knowledge_for_sensitive_data",
          "title": "Scan Knowledge For Sensitive Data",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "document_ids"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              },
              "document_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 120,
                  "minLength": 1
                },
                "maxItems": 100,
                "minItems": 1
              },
              "instructions": {
                "type": "string",
                "maxLength": 4000,
                "description": "Optional: what to find, in the owner's words."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Scan Knowledge For Sensitive Data",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "apply_knowledge_redaction",
          "title": "Apply Knowledge Redaction",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "run_id",
              "approved"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "run_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The scan id, from scan_knowledge_for_sensitive_data."
              },
              "approved": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Apply Knowledge Redaction",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "revert_knowledge_redaction",
          "title": "Revert Knowledge Redaction",
          "description": "Undo an applied redaction: the documents get their original text back.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "run_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "run_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The scan id, from scan_knowledge_for_sensitive_data."
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Revert Knowledge Redaction",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "set_knowledge_redaction_policy",
          "title": "Set Knowledge Redaction Policy",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "notebook_id",
              "enabled"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional app whose notebooks to use. Omitted: the owner's own Business Brain."
              },
              "enabled": {
                "type": "boolean"
              },
              "auto_apply": {
                "type": "boolean",
                "default": true
              },
              "notebook_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The notebook id, from list_knowledge_notebooks."
              },
              "instructions": {
                "type": "string",
                "maxLength": 4000
              },
              "min_confidence": {
                "type": "number",
                "default": 0.75,
                "maximum": 1,
                "minimum": 0
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Knowledge Redaction Policy",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_whatsapp_triggers",
          "title": "List Whatsapp Triggers",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app the trigger belongs to."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Whatsapp Triggers",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_whatsapp_trigger_options",
          "title": "Get Whatsapp Trigger Options",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app the trigger belongs to."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Whatsapp Trigger Options",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_whatsapp_trigger_logs",
          "title": "List Whatsapp Trigger Logs",
          "description": "What the app's WhatsApp triggers sent, newest first, with the outcome of each send.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 80,
                "maximum": 200,
                "minimum": 1
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app the trigger belongs to."
              },
              "trigger_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional: one trigger only."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Whatsapp Trigger Logs",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_whatsapp_trigger",
          "title": "Create Whatsapp Trigger",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "page_name",
              "entity_name",
              "phone_field",
              "message_template"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app the trigger belongs to."
              },
              "flow_id": {
                "type": "string",
                "maxLength": 120,
                "description": "Optional WhatsApp flow the conversation continues in."
              },
              "page_name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "The page whose form creates the record."
              },
              "name_field": {
                "type": "string",
                "maxLength": 120
              },
              "entity_name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The entity whose new records fire it."
              },
              "phone_field": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The record field holding the customer's WhatsApp number."
              },
              "whatsapp_bot_id": {
                "type": "string",
                "maxLength": 120,
                "description": "The WhatsApp number that sends, from get_whatsapp_trigger_options."
              },
              "message_template": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 1,
                "description": "The message; {{ field_name }} inserts a record field."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Whatsapp Trigger",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_whatsapp_trigger",
          "title": "Update Whatsapp Trigger",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "trigger_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app the trigger belongs to."
              },
              "flow_id": {
                "type": "string",
                "maxLength": 120,
                "description": "Optional WhatsApp flow the conversation continues in."
              },
              "page_name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "The page whose form creates the record."
              },
              "name_field": {
                "type": "string",
                "maxLength": 120
              },
              "trigger_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The trigger id, from list_whatsapp_triggers."
              },
              "entity_name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The entity whose new records fire it."
              },
              "phone_field": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The record field holding the customer's WhatsApp number."
              },
              "whatsapp_bot_id": {
                "type": "string",
                "maxLength": 120,
                "description": "The WhatsApp number that sends, from get_whatsapp_trigger_options."
              },
              "message_template": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 1,
                "description": "The message; {{ field_name }} inserts a record field."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Whatsapp Trigger",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "disable_whatsapp_trigger",
          "title": "Disable Whatsapp Trigger",
          "description": "Switch a WhatsApp trigger off: new records no longer send its message. It stays saved.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "trigger_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app the trigger belongs to."
              },
              "trigger_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The trigger id, from list_whatsapp_triggers."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Disable Whatsapp Trigger",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "send_whatsapp_trigger_test",
          "title": "Send Whatsapp Trigger Test",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "trigger_id"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app the trigger belongs to."
              },
              "trigger_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The trigger id, from list_whatsapp_triggers."
              },
              "sample_record": {
                "type": "object",
                "description": "Field values to render the message with."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Send Whatsapp Trigger Test",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "suggest_whatsapp_trigger_message",
          "title": "Suggest Whatsapp Trigger Message",
          "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "app_id",
              "page_name"
            ],
            "properties": {
              "app_id": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "The app the trigger belongs to."
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 120
                },
                "maxItems": 100
              },
              "flow_id": {
                "type": "string",
                "maxLength": 120
              },
              "page_name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "entity_name": {
                "type": "string",
                "maxLength": 120
              },
              "whatsapp_bot_id": {
                "type": "string",
                "maxLength": 120
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Suggest Whatsapp Trigger Message",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [],
      "prompts": [
        {
          "name": "build_app",
          "description": "Generate a complete working application: pages, database, forms and logic, then publish it.",
          "arguments": [
            {
              "name": "subject",
              "required": false,
              "description": "What it is about, in your own words. Optional."
            }
          ]
        },
        {
          "name": "build_website",
          "description": "A multi-page site for a business: home, about, services, contact, with a working contact form.",
          "arguments": [
            {
              "name": "subject",
              "required": false,
              "description": "What it is about, in your own words. Optional."
            }
          ]
        },
        {
          "name": "build_landing_page",
          "description": "One focused page built to convert: headline, proof, and a form that captures leads.",
          "arguments": [
            {
              "name": "subject",
              "required": false,
              "description": "What it is about, in your own words. Optional."
            }
          ]
        },
        {
          "name": "build_online_store",
          "description": "A product catalogue with a cart and an order flow, and an admin view of the orders.",
          "arguments": [
            {
              "name": "subject",
              "required": false,
              "description": "What it is about, in your own words. Optional."
            }
          ]
        },
        {
          "name": "build_internal_tool",
          "description": "Something for a team rather than the public: records, roles and a login wall.",
          "arguments": [
            {
              "name": "subject",
              "required": false,
              "description": "What it is about, in your own words. Optional."
            }
          ]
        },
        {
          "name": "build_booking_system",
          "description": "Appointments or reservations: availability, a booking form, and a view of what is booked.",
          "arguments": [
            {
              "name": "subject",
              "required": false,
              "description": "What it is about, in your own words. Optional."
            }
          ]
        },
        {
          "name": "add_whatsapp_agent",
          "description": "Create a standing agent, verify my phone, and connect a number so it can reach me and I can reply.",
          "arguments": []
        },
        {
          "name": "publish_and_share",
          "description": "Take an existing app live and return the link that actually works for other people.",
          "arguments": []
        },
        {
          "name": "improve_existing_app",
          "description": "Edit an app you already built: wording, design, a new page or a new field.",
          "arguments": [
            {
              "name": "subject",
              "required": false,
              "description": "What it is about, in your own words. Optional."
            }
          ]
        },
        {
          "name": "fix_app_errors",
          "description": "Read the real runtime errors from a published app and repair them.",
          "arguments": []
        },
        {
          "name": "add_login_to_app",
          "description": "Gate pages so only signed-in people can see them, and invite the first members.",
          "arguments": []
        },
        {
          "name": "check_app_traffic",
          "description": "Real traffic for a published app: visitors, pages, and where they came from.",
          "arguments": []
        },
        {
          "name": "add_data_to_app",
          "description": "Define what an app stores, and put real records in it.",
          "arguments": []
        }
      ]
    },
    "instructions": "Fine Structure builds and hosts complete web applications for the connected account: React pages, a managed database (called entities), authentication, publishing, custom domains with automatic TLS, restorable Saved Versions, traffic analytics, and autonomous AI agents with real messaging channels.\n\nAgents are the part people do not expect, so offer them explicitly. An agent created with create_agent is a standing worker on the account, not a chat session: it gets its own email address, it can message its verified owner on WhatsApp and by email through the platform system channels, it can read and write the app database, and schedule_agent_task gives it recurring work (once, hourly, daily, weekly or cron, in the owner timezone). Typical uses: follow up new leads on WhatsApp every morning, watch a published app for runtime errors and report them, send a weekly summary of traffic and new records, answer inbound email.\n\nThe WhatsApp side is drivable from here, so offer it instead of sending the user to a settings screen. get_agent_whatsapp reports whether the owner phone is verified and which platform numbers are connectable. If it is not verified, ask for the owner own WhatsApp number, call start_owner_phone_verification, ask for the 6-digit code that arrives, and call confirm_owner_phone_verification. That one-time proof is what lets agents message the owner at all. Then attach_agent_whatsapp connects a platform number, and the owner can message that number from their verified phone and reach that specific agent. No WhatsApp Business account, no message template approval, nothing to buy. A number already used by another account is still a valid choice: it answers only this owner verified phone.\n\nMessaging people other than the verified owner needs a channel the owner connects in the Fine Structure Studio, so say that plainly rather than promising it. Call get_platform_guide with sections [\"agents\"] for the full capability list.\n\nExisting agents are managed from here too: get_agent and update_agent read and edit one, set_agent_status pauses, resumes or archives it, list_agent_activity shows what the agents did, list_agent_approvals shows what waits for the owner, get_credit_balance gives both balances, and update_agent_task, archive_agent_task, run_agent_task_now, stop_agent_task and cancel_agent_run control the work. Goals, triggers, org goals, memories and team templates have their own tools (list_agent_goals, create_agent_trigger, list_org_goals, list_agent_memories, create_agent_team), and list_connections and get_connection_status say which services the account has connected.\n\nWith the optional contracts, payments and members scopes: list_contract_workspaces opens the account's contracts and e-signature (read them, follow signing, prepare drafts from templates, and with contracts:send send them, remind signers or stop one; show the owner the recipients and the invitation and get a yes before send_contract), list_app_payments and get_app_payment_settings read what an app's customers paid through Cardcom, and verify_app_member and block_app_member manage the people who signed up to an app.\n\nKnowledge: the owner's Business Brain and each app keep knowledge notebooks. list_knowledge_notebooks, add_knowledge_document and ask_knowledge_notebook read, add to and answer from them, with sources. A recording or document on the user's computer (a meeting, a call, a folder of recordings) goes in with create_knowledge_upload when you can run a command there: it returns a curl or Python command that sends the file straight to the notebook, where a recording is transcribed, within the account's transcription allowance.\n\nFirst contact: when list_apps comes back empty, or the user connected this server and has not asked for anything specific, do not wait for instructions. Offer three concrete builds you can finish right now, for example a CRM with customers, jobs and invoices, a landing page with a lead form, or a booking system, and say pl"
  },
  "changes": {
    "total": 1,
    "latest": [
      {
        "observed_at": "2026-11-22T04:51:01.999Z",
        "from_sha": "f1944ff831826e90d01a0414872025e108838bddfafd48289ee476d153d2b5b8",
        "to_sha": "a9f25f2990b6335ac2c8886408f87f0a68b5608511be9e60b06a024bdb1de511",
        "summary": {
          "tool_changed": 1
        },
        "diff": [
          {
            "op": "changed",
            "kind": "tool",
            "name": "list_connection_catalog",
            "path": "/description",
            "after": "Every service the platform can connect, with whether this account has connected it, whether one-click sign-in is available, and its connections. Also social_publishing: the social networks the owner's agents can publish to (Facebook, Instagram, LinkedIn, TikTok and others), the accounts connected for it, how many places this account has, and where it is connected.",
            "before": "Every service the platform can connect, with whether this account has connected it, whether one-click sign-in is available, and its connections."
          }
        ],
        "withheld": false
      }
    ]
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}