{"name":"fine-structure-mcp","version":"1.0.0","description":"Fine Structure MCP Server - Create, update, and publish web applications using AI. Allows AI agents to generate complete web apps on behalf of users.","tools":[{"name":"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","properties":{"name":{"type":"string","description":"Name for the app (1-100 chars)"},"prompt":{"type":"string","description":"Detailed description of the app to build"},"description":{"type":"string","description":"Optional short description","default":""}},"required":["name","prompt"]},"title":"Create App","annotations":{"title":"Create App","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["create"]}]}},{"name":"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","properties":{"client_email":{"type":"string","description":"Client email that will be allowed to claim projects"},"client_full_name":{"type":"string","description":"Optional client display name","default":""},"note":{"type":"string","description":"Optional internal note for the agency","default":""}},"required":["client_email"]},"title":"Agency: Create Client","annotations":{"title":"Agency: Create Client","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agency:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agency:write"]}]}},{"name":"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","description":"Include claim links status without raw tokens","default":true}}},"title":"Agency: List Clients","annotations":{"title":"Agency: List Clients","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agency:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agency:read"]}]}},{"name":"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","properties":{"client_email":{"type":"string","description":"Client email allowed to claim ownership"},"client_full_name":{"type":"string","description":"Optional client display name","default":""},"name":{"type":"string","description":"Name for the app (1-100 chars)"},"prompt":{"type":"string","description":"Detailed description of the app to build"},"description":{"type":"string","description":"Optional short app description","default":""},"note":{"type":"string","description":"Optional internal client/project note","default":""},"keep_agent_collaborator":{"type":"boolean","description":"After claim, invite the agent back as an editor collaborator","default":true},"claim_expires_in_days":{"type":"integer","description":"Claim link lifetime, 1-90 days","default":14}},"required":["client_email","name","prompt"]},"title":"Agency: Create Client App","annotations":{"title":"Agency: Create Client App","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agency:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agency:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"Existing app ID owned by the agent"},"client_email":{"type":"string","description":"Client email allowed to claim ownership"},"client_full_name":{"type":"string","description":"Optional client display name","default":""},"note":{"type":"string","description":"Optional internal note","default":""},"keep_agent_collaborator":{"type":"boolean","description":"Invite agent as editor after claim","default":true},"claim_expires_in_days":{"type":"integer","description":"Claim link lifetime, 1-90 days","default":14}},"required":["app_id","client_email"]},"title":"Agency: Create Claim Link","annotations":{"title":"Agency: Create Claim Link","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agency:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agency:write"]}]}},{"name":"agency_get_claim_status","description":"Agency mode only. Inspect one handoff status without exposing the raw claim token.","inputSchema":{"type":"object","properties":{"handoff_id":{"type":"string","description":"Handoff ID returned by agency_create_claim_link or agency_create_client_app"}},"required":["handoff_id"]},"title":"Agency: Get Claim Status","annotations":{"title":"Agency: Get Claim Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agency:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agency:read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID to update"},"prompt":{"type":"string","description":"What to change in the app"}},"required":["app_id","prompt"]},"title":"Update App","annotations":{"title":"Update App","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","generate:edit"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","generate:edit"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID to publish"},"access_mode":{"type":"string","enum":["infer","public_open","public_auth","private","keep"],"default":"infer","description":"Live access policy. public_open = anyone can view. public_auth = public URL opens but app login is required. private = published snapshot remains owner/collaborator-only. keep = preserve current visibility/auth settings. infer = choose from existing settings and obvious app structure."},"auth_required":{"type":"boolean","description":"Optional explicit override for generated-app login requirement. Prefer access_mode when possible."},"make_public":{"type":"boolean","description":"Optional explicit override for whether published URLs are publicly reachable. Prefer access_mode when possible."}},"required":["app_id"]},"title":"Publish App","annotations":{"title":"Publish App","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["publish"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["publish"]}]}},{"name":"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","description":"Optional subset of guide sections to return.","items":{"type":"string","enum":["ab_testing","agency","agents","app_code","checklists","data_model","direct_file_edit","domains","file_model","generation","media","overview","publishing","saas","safety","sdk","secrets_integrations","security","validation"]}},"task_type":{"type":"string","description":"Optional task hint, for example edit_app, direct_file_edit, seed_data, or publish_app."}}},"title":"Get Platform Guide","annotations":{"title":"Get Platform Guide","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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":{"task_type":{"type":"string","description":"The task type to plan.","enum":["ab_test","agency_client_app","create_app","direct_file_edit","domain_setup","edit_app","fix_runtime_error","generate_media","inspect_preview","publish_app","saas_setup","schema_change","secrets_integration","security_setup","seed_data","unknown","version_restore"],"default":"unknown"},"goal":{"type":"string","description":"Optional short description of the user's goal.","default":""},"app_id":{"type":"string","description":"Optional app ID. If provided, the workflow includes a safe app context summary."}}},"title":"Get Recommended Workflow","annotations":{"title":"Get Recommended Workflow","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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","properties":{"job_id":{"type":"string","description":"The job_id returned by create_app or update_app"}},"required":["job_id"]},"title":"Get Job Status","annotations":{"title":"Get Job Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"get_app_status","description":"Get app overview: files, published state, URL, active jobs.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"Get App Status","annotations":{"title":"Get App Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"Get App Links","annotations":{"title":"Get App Links","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"List App Domains","annotations":{"title":"List App Domains","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Custom domain to connect, for example example.com or app.example.com"}},"required":["app_id","domain"]},"title":"Add Custom Domain","annotations":{"title":"Add Custom Domain","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["publish"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["publish"]}]}},{"name":"get_domain_verification","description":"Return the exact DNS records and instructions required to verify and route the app custom domain.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Optional configured custom domain. If omitted, uses the app's current custom domain."}},"required":["app_id"]},"title":"Get Domain Verification","annotations":{"title":"Get Domain Verification","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Optional configured custom domain. If omitted, uses the app's current custom domain."}},"required":["app_id"]},"title":"Check Domain Verification","annotations":{"title":"Check Domain Verification","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["publish"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["publish"]}]}},{"name":"set_primary_domain","description":"Set which app host should be treated as primary for generated links and custom-domain redirects.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Primary host, for example example.com, www.example.com, or the app subdomain host."}},"required":["app_id","domain"]},"title":"Set Primary Domain","annotations":{"title":"Set Primary Domain","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["publish"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["publish"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Optional configured custom domain. If omitted, removes the current custom domain."}},"required":["app_id"]},"title":"Remove Custom Domain","annotations":{"title":"Remove Custom Domain","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["publish"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["publish"]}]}},{"name":"get_domain_ssl_status","description":"Return SSL/certificate status and pending certificate validation DNS records for the app custom domain.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"domain":{"type":"string","description":"Optional configured custom domain. If omitted, uses the app's current custom domain."}},"required":["app_id"]},"title":"Get Domain SSL Status","annotations":{"title":"Get Domain SSL Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"configure_domain_redirects","description":"Configure custom-domain redirect policy: primary domain, optional www/root redirect, and HTTPS enforcement.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"primary_domain":{"type":"string","description":"Canonical primary domain, for example example.com"},"redirect_www":{"type":"boolean","description":"Redirect the www/root counterpart to primary_domain","default":true},"force_https":{"type":"boolean","description":"Redirect HTTP custom-domain requests to HTTPS","default":true}},"required":["app_id","primary_domain"]},"title":"Configure Domain Redirects","annotations":{"title":"Configure Domain Redirects","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["publish"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["publish"]}]}},{"name":"list_apps","description":"List applications owned by the authenticated user, newest activity first. Returns up to `limit` apps per call plus the total count; page with `offset` when the account has more.","inputSchema":{"type":"object","properties":{"limit":{"type":"integer","description":"Max apps to return (1-200)","default":50},"offset":{"type":"integer","description":"Apps to skip, for paging","default":0}}},"title":"List Apps","annotations":{"title":"List Apps","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"get_app_files","description":"Get the file tree for an app with paths and byte sizes.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"Get App Files","annotations":{"title":"Get App Files","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"path":{"type":"string","description":"Virtual file path, for example pages/Home.jsx"},"max_chars":{"type":"integer","description":"Maximum content characters to return","default":200000}},"required":["app_id","path"]},"title":"Read App File","annotations":{"title":"Read App File","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"paths":{"type":"array","items":{"type":"string"},"description":"Virtual file paths to read"},"max_chars_per_file":{"type":"integer","description":"Maximum characters per file","default":100000}},"required":["app_id","paths"]},"title":"Read App Files","annotations":{"title":"Read App Files","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"path":{"type":"string","description":"Virtual file path"},"content":{"type":"string","description":"Complete file contents"},"file_type":{"type":"string","description":"Optional file type override"}},"required":["app_id","path","content"]},"title":"Write App File","annotations":{"title":"Write App File","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"path":{"type":"string","description":"Virtual file path"},"old_text":{"type":"string","description":"Exact existing text to replace"},"new_text":{"type":"string","description":"Replacement text"},"replace_all":{"type":"boolean","description":"Replace all matches instead of the first match","default":false}},"required":["app_id","path","old_text","new_text"]},"title":"Patch App File","annotations":{"title":"Patch App File","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"old_path":{"type":"string","description":"Existing virtual file path to rename"},"new_path":{"type":"string","description":"New virtual file path"},"overwrite":{"type":"boolean","description":"Allow replacing an existing file at new_path","default":false},"force":{"type":"boolean","description":"Apply even if validation reports blocking errors","default":false}},"required":["app_id","old_path","new_path"]},"title":"Rename App File","annotations":{"title":"Rename App File","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"Get App Detail","annotations":{"title":"Get App Detail","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"Get Entities","annotations":{"title":"Get Entities","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"query_entity","description":"Query app data records for one entity with optional exact-match filters.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name, for example Patient"},"filters":{"type":"object","description":"Exact-match field filters","default":{}},"sort":{"type":"string","description":"Sort field, prefix with - for descending","default":"-created_date"},"limit":{"type":"integer","description":"Max records to return","default":100},"offset":{"type":"integer","description":"Pagination offset","default":0}},"required":["app_id","entity"]},"title":"Query Entity","annotations":{"title":"Query Entity","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","data:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","data:read"]}]}},{"name":"seed_entity","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","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"records":{"type":"array","items":{"type":"object"},"description":"Records to insert"},"mode":{"type":"string","enum":["append","skip_if_not_empty"],"description":"append always inserts; skip_if_not_empty inserts only when the entity is empty","default":"skip_if_not_empty"},"reason":{"type":"string","description":"Why these records should be created","default":""}},"required":["app_id","entity","records"]},"title":"Seed Entity Records","annotations":{"title":"Seed Entity Records","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"records":{"type":"array","items":{"type":"object"},"description":"Records to create"},"reason":{"type":"string","description":"Why these records should be created","default":""},"expected_count":{"type":"integer","description":"Optional safety check; the write aborts if the record count differs"}},"required":["app_id","entity","records"]},"title":"Create Entity Records","annotations":{"title":"Create Entity Records","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}]}},{"name":"update_entity_record","description":"Compatibility tool that updates one record by ID. Executes directly for the authenticated app owner.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"record_id":{"type":"string","description":"Record ID"},"data":{"type":"object","description":"Fields to merge into the record"},"reason":{"type":"string","description":"Why this record should be updated","default":""}},"required":["app_id","entity","record_id","data"]},"title":"Update Entity Record","annotations":{"title":"Update Entity Record","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"record_ids":{"type":"array","items":{"type":"string"},"description":"Exact record IDs to update"},"filters":{"oneOf":[{"type":"object"},{"type":"array","items":{"type":"object"}}],"description":"One exact-match selector or a list of exact-match selectors"},"changes":{"type":"object","description":"Shared fields to merge into every selected record"},"updates":{"type":"array","items":{"type":"object","properties":{"record_id":{"type":"string"},"changes":{"type":"object"}},"required":["record_id","changes"]},"description":"Per-record changes; use instead of shared changes"},"reason":{"type":"string","description":"Why these records should be updated","default":""},"expected_count":{"type":"integer","description":"Required match count safety check, when known"}},"required":["app_id","entity"]},"title":"Update Entity Records","annotations":{"title":"Update Entity Records","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"record_ids":{"type":"array","items":{"type":"string"},"description":"Exact record IDs to delete"},"filters":{"oneOf":[{"type":"object"},{"type":"array","items":{"type":"object"}}],"description":"One exact-match selector or a list of exact-match selectors"},"reason":{"type":"string","description":"Why these records should be deleted","default":""},"expected_count":{"type":"integer","description":"Required match count safety check, when known"}},"required":["app_id","entity"]},"title":"Delete Entity Records","annotations":{"title":"Delete Entity Records","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","data:write"]}]}},{"name":"get_pages","description":"Get all pages in an app with their file paths and sizes.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"Get Pages","annotations":{"title":"Get Pages","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"get_errors","description":"Get recent runtime errors for an app (last 20). Useful for diagnosing issues before updating.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"limit":{"type":"integer","description":"Max errors to return (default 20)","default":20}},"required":["app_id"]},"title":"Get Errors","annotations":{"title":"Get Errors","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"days":{"type":"integer","description":"Window in days (1-90, default 7)","default":7}},"required":["app_id"]},"title":"Get App Analytics","annotations":{"title":"Get App Analytics","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"get_preview_url","description":"Return editor preview and published/public URLs for an app.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"Get Preview URL","annotations":{"title":"Get Preview URL","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read"]}]}},{"name":"list_saved_versions","description":"List restorable Saved Versions for an app, including versions created by MCP writes.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"List Saved Versions","annotations":{"title":"List Saved Versions","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["versions:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["versions:read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"label":{"type":"string","description":"Optional short label"}},"required":["app_id"]},"title":"Create Change Set","annotations":{"title":"Create Change Set","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"change_set_id":{"type":"string","description":"Change set ID"},"path":{"type":"string","description":"Virtual file path"},"content":{"type":"string","description":"Complete file contents for upsert","default":""},"file_type":{"type":"string","description":"Optional file type override","default":""},"operation":{"type":"string","enum":["upsert","delete"],"default":"upsert"}},"required":["app_id","change_set_id","path"]},"title":"Add File Change","annotations":{"title":"Add File Change","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}]}},{"name":"validate_change_set","description":"Validate current app files plus staged change set files before applying.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"change_set_id":{"type":"string","description":"Change set ID"},"include_runtime_errors":{"type":"boolean","default":true}},"required":["app_id","change_set_id"]},"title":"Validate Change Set","annotations":{"title":"Validate Change Set","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"change_set_id":{"type":"string","description":"Change set ID"},"force":{"type":"boolean","description":"Apply even if validation has errors","default":false}},"required":["app_id","change_set_id"]},"title":"Apply Change Set","annotations":{"title":"Apply Change Set","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}]}},{"name":"discard_change_set","description":"Discard a pending staged change set without changing app files.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"change_set_id":{"type":"string","description":"Change set ID"}},"required":["app_id","change_set_id"]},"title":"Discard Change Set","annotations":{"title":"Discard Change Set","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","files:write"]}]}},{"name":"validate_app","description":"Run deterministic app checks: syntax, imports, routes/pages, entity schemas, missing entities, and recorded runtime errors.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"include_runtime_errors":{"type":"boolean","default":true}},"required":["app_id"]},"title":"Validate App","annotations":{"title":"Validate App","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}]}},{"name":"inspect_preview","description":"Return server-side preview context: URLs, persisted runtime/network errors, static clickable candidates, pages, and explicit live-browser availability.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"route":{"type":"string","description":"Optional route to inspect","default":""},"auth_as":{"type":"string","description":"Optional auth simulation: anonymous","default":""},"auth_as_role":{"type":"string","description":"Optional app role simulation, e.g. staff/admin/customer","default":""}},"required":["app_id"]},"title":"Inspect Live Preview","annotations":{"title":"Inspect Live Preview","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","files:read"]}]}},{"name":"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, and recent security audit entries. Does not return secrets and does not grant access to other apps.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"audit_limit":{"type":"integer","default":50}},"required":["app_id"]},"title":"Get App Security Context","annotations":{"title":"Get App Security Context","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["security:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["security:read"]}]}},{"name":"set_route_policy","description":"Create or update a server-owned route policy for a generated app route.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"route":{"type":"string","description":"Route or wildcard route, e.g. /admin/*"},"require_auth":{"type":"boolean","default":true},"allowed_roles":{"type":"array","items":{"type":"string"},"description":"Allowed app roles"},"redirect_to":{"type":"string","default":"/Login"}},"required":["app_id","route","require_auth","allowed_roles"]},"title":"Set Route Policy","annotations":{"title":"Set Route Policy","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}]}},{"name":"set_entity_policy","description":"Create or update server-side read/write role policy for an app entity.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name, e.g. Booking"},"read":{"type":"array","items":{"type":"string"},"description":"Roles allowed to read"},"write":{"type":"array","items":{"type":"string"},"description":"Roles allowed to write"}},"required":["app_id","entity","read","write"]},"title":"Set Entity Policy","annotations":{"title":"Set Entity Policy","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}]}},{"name":"list_app_members","description":"List generated-app runtime users/members for an app. This is separate from Studio project collaborators.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"List App Members","annotations":{"title":"List App Members","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["security:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["security:read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"email":{"type":"string","description":"Member email"},"role":{"type":"string","description":"App role, e.g. admin/staff/customer"},"full_name":{"type":"string","default":""},"password":{"type":"string","description":"The password this member signs in with, chosen by the account owner. Required, and never echoed back in the result."}},"required":["app_id","email","role","password"]},"title":"Invite App Member","annotations":{"title":"Invite App Member","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"user_id":{"type":"string","description":"Generated app user id"},"role":{"type":"string","description":"New role"}},"required":["app_id","user_id","role"]},"title":"Update App Member Role","annotations":{"title":"Update App Member Role","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}]}},{"name":"remove_app_member","description":"Remove a generated-app runtime member.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"user_id":{"type":"string","description":"Generated app user id"}},"required":["app_id","user_id"]},"title":"Remove App Member","annotations":{"title":"Remove App Member","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["security:write"]}]}},{"name":"get_app_security_audit","description":"Read recent server-side security audit events for an app.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"limit":{"type":"integer","default":100}},"required":["app_id"]},"title":"Get App Security Audit","annotations":{"title":"Get App Security Audit","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["security:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["security:read"]}]}},{"name":"compare_saved_versions","description":"Compare two Saved Versions and return per-file additions, removals, modifications, and compact diffs.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"base_snapshot_id":{"type":"string","description":"Older/base snapshot ID"},"target_snapshot_id":{"type":"string","description":"Newer/target snapshot ID"},"max_diff_chars":{"type":"integer","default":12000}},"required":["app_id","base_snapshot_id","target_snapshot_id"]},"title":"Compare Saved Versions","annotations":{"title":"Compare Saved Versions","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["versions:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["versions:read"]}]}},{"name":"compare_current_to_version","description":"Compare the current app files to a Saved Version and return compact per-file diffs.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"snapshot_id":{"type":"string","description":"Saved Version snapshot ID"},"max_diff_chars":{"type":"integer","default":12000}},"required":["app_id","snapshot_id"]},"title":"Compare Current To Version","annotations":{"title":"Compare Current To Version","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["versions:read","files:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["versions:read","files:read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"snapshot_id":{"type":"string","description":"Saved Version snapshot ID"},"path":{"type":"string","description":"Virtual file path to restore"},"confirm":{"type":"boolean","default":false}},"required":["app_id","snapshot_id","path","confirm"]},"title":"Restore File From Version","annotations":{"title":"Restore File From Version","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["versions:write","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["versions:write","files:write"]}]}},{"name":"create_entity_schema","description":"Create an entity schema file in entities/<Entity>.json. Creates a Saved Version before writing.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"schema":{"type":"object","description":"JSON schema object"},"relationships":{"type":"array","items":{"type":"object"},"default":[]},"indexes":{"type":"array","items":{"type":"object"},"default":[]},"metadata":{"type":"object","default":{}},"overwrite":{"type":"boolean","default":false}},"required":["app_id","entity","schema"]},"title":"Create Entity Schema","annotations":{"title":"Create Entity Schema","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","data:write","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","data:write","files:write"]}]}},{"name":"update_entity_schema","description":"Replace or shallow-merge an existing entity schema file. Creates a Saved Version before writing.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"schema":{"type":"object","description":"Schema fields to set or merge"},"relationships":{"type":"array","items":{"type":"object"},"default":[]},"indexes":{"type":"array","items":{"type":"object"},"default":[]},"metadata":{"type":"object","default":{}},"merge":{"type":"boolean","default":true}},"required":["app_id","entity","schema"]},"title":"Update Entity Schema","annotations":{"title":"Update Entity Schema","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","data:write","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","data:write","files:write"]}]}},{"name":"validate_entity_relationships","description":"Validate entity relationship metadata and *_id references against existing entity schemas.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"Validate Entity Relationships","annotations":{"title":"Validate Entity Relationships","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","data:read","files:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","data:read","files:read"]}]}},{"name":"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","properties":{"app_id":{"type":"string","description":"The app ID"},"entity":{"type":"string","description":"Entity name"},"relationships":{"type":"array","items":{"type":"object"},"default":[]},"indexes":{"type":"array","items":{"type":"object"},"default":[]},"metadata":{"type":"object","default":{}}},"required":["app_id","entity"]},"title":"Update Entity Metadata","annotations":{"title":"Update Entity Metadata","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","data:write","files:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","data:write","files:write"]}]}},{"name":"list_secret_keys","description":"List secret key names for an app. Secret values are never returned.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"List Secret Keys","annotations":{"title":"List Secret Keys","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","secrets:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","secrets:read"]}]}},{"name":"set_secret","description":"Create or update one encrypted app secret. The secret value is never returned.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"key":{"type":"string","description":"Secret key name"},"value":{"type":"string","description":"Secret value to encrypt and store"}},"required":["app_id","key","value"]},"title":"Set Secret","annotations":{"title":"Set Secret","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","secrets:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","secrets:write"]}]}},{"name":"delete_secret","description":"Delete one app secret by key.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"key":{"type":"string","description":"Secret key name"}},"required":["app_id","key"]},"title":"Delete Secret","annotations":{"title":"Delete Secret","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","secrets:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","secrets:write"]}]}},{"name":"list_integrations","description":"List supported integrations and safe connected integration metadata for an app. Tokens/secrets are never returned.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"List Integrations","annotations":{"title":"List Integrations","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","integrations:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","integrations:read"]}]}},{"name":"configure_integration","description":"Store safe non-secret integration metadata for an app. Use set_secret for API keys/tokens.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"provider":{"type":"string","description":"Integration provider ID"},"config":{"type":"object","description":"Safe metadata only, such as workspace/team/name/email"},"is_active":{"type":"boolean","description":"Set false to disconnect this integration metadata","default":true}},"required":["app_id","provider","config"]},"title":"Configure Integration","annotations":{"title":"Configure Integration","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["update","integrations:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","integrations:write"]}]}},{"name":"list_ab_tests","description":"List the platform A/B tests configured for an app.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"}},"required":["app_id"]},"title":"List A/B Tests","annotations":{"title":"List A/B Tests","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","ab:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","ab:read"]}]}},{"name":"create_ab_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","properties":{"app_id":{"type":"string","description":"The app ID"},"name":{"type":"string","description":"Experiment name"},"page_name":{"type":"string","description":"Base route page that triggers the experiment"},"variants":{"type":"array","items":{"type":"object","properties":{"page_name":{"type":"string","description":"Existing app page name or path"},"traffic_percent":{"type":"integer","description":"Traffic percentage for this variant"}},"required":["page_name","traffic_percent"]},"description":"At least two variants. Traffic must total 100."},"goal_event_type":{"type":"string","description":"Optional conversion goal type: entity_create, any, form_submit"},"goal_event_filter":{"type":"object","description":"Optional goal filter, for example {'entity_name': 'Lead'}"},"is_active":{"type":"boolean","description":"Whether to activate the test immediately","default":true}},"required":["app_id","name","page_name","variants"]},"title":"Create A/B Test","annotations":{"title":"Create A/B Test","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["update","generate:edit","ab:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","generate:edit","ab:write"]}]}},{"name":"update_ab_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","properties":{"app_id":{"type":"string","description":"The app ID"},"test_id":{"type":"string","description":"A/B test ID"},"name":{"type":"string","description":"Optional new name"},"page_name":{"type":"string","description":"Optional new base route page"},"variants":{"type":"array","items":{"type":"object"},"description":"Optional replacement variants. Traffic must total 100."},"is_active":{"type":"boolean","description":"Optional active state"},"goal_event_type":{"type":"string","description":"Optional conversion goal type"},"goal_event_filter":{"type":"object","description":"Optional conversion goal filter"}},"required":["app_id","test_id"]},"title":"Update A/B Test","annotations":{"title":"Update A/B Test","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["update","generate:edit","ab:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","generate:edit","ab:write"]}]}},{"name":"delete_ab_test","description":"Delete a native A/B test from an app. Creates a Saved Version before the change.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"test_id":{"type":"string","description":"A/B test ID"}},"required":["app_id","test_id"]},"title":"Delete A/B Test","annotations":{"title":"Delete A/B Test","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["update","generate:edit","ab:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["update","generate:edit","ab:write"]}]}},{"name":"get_ab_test_stats","description":"Get views, unique visitors, conversions, and conversion rates for an A/B test.","inputSchema":{"type":"object","properties":{"app_id":{"type":"string","description":"The app ID"},"test_id":{"type":"string","description":"A/B test ID"}},"required":["app_id","test_id"]},"title":"Get A/B Test Stats","annotations":{"title":"Get A/B Test Stats","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["read","ab:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["read","ab:read"]}]}},{"name":"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","properties":{"name":{"type":"string","description":"Agent display name (e.g. 'Lead Follow-up'). Auto-derived from role when omitted."},"role":{"type":"string","description":"Short role label (e.g. 'sales assistant')"},"description":{"type":"string","description":"What this agent is responsible for, one or two sentences"},"persona":{"type":"string","description":"Optional working style and tone instructions for the agent"},"app_id":{"type":"string","description":"Optional app to attach the agent to; account-level when omitted"}},"required":["role","description"]},"title":"Create Agent","annotations":{"title":"Create Agent","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}]}},{"name":"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"}}},"title":"List Agents","annotations":{"title":"List Agents","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agents:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:read"]}]}},{"name":"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.","inputSchema":{"type":"object","properties":{"agent_id":{"type":"string","description":"The agent id (from create_agent or list_agents)"},"title":{"type":"string","description":"Short task title"},"instructions":{"type":"string","description":"What the agent should do on each run, written as instructions to the agent"},"schedule":{"type":"object","description":"Schedule object, e.g. {\"type\":\"daily\",\"time\":\"08:30\",\"timezone\":\"Asia/Jerusalem\"} or {\"type\":\"weekly\",\"time\":\"09:00\",\"timezone\":\"Asia/Jerusalem\",\"days_of_week\":[0]} or {\"type\":\"once\",\"run_at\":\"2026-08-20T09:00\",\"timezone\":\"Asia/Jerusalem\"}"},"max_runs":{"type":"integer","description":"Optional cap on total runs (0 = unlimited)","default":0},"activate":{"type":"boolean","description":"Start the schedule immediately (true) or save as draft (false)","default":true}},"required":["agent_id","title","instructions","schedule"]},"title":"Schedule Agent Task","annotations":{"title":"Schedule Agent Task","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}]}},{"name":"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":{"agent_id":{"type":"string","description":"Optional agent id filter"},"status":{"type":"string","description":"Optional status filter: draft, active, paused, archived"},"limit":{"type":"integer","description":"Max tasks to return (1-100)","default":50}}},"title":"List Agent Tasks","annotations":{"title":"List Agent Tasks","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agents:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:read"]}]}},{"name":"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."}}},"title":"Get Agent Whatsapp","annotations":{"title":"Get Agent Whatsapp","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agents:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:read"]}]}},{"name":"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","properties":{"phone":{"type":"string","description":"The owner's own WhatsApp number, ideally in E.164 form such as +972501234567."},"region":{"type":"string","description":"Optional ISO region hint (for example IL, US) used when the number has no country code."}},"required":["phone"]},"title":"Start Owner Phone Verification","annotations":{"title":"Start Owner Phone Verification","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}]}},{"name":"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","properties":{"phone":{"type":"string","description":"The same phone number the code was sent to."},"code":{"type":"string","description":"The 6-digit code from the WhatsApp message."},"region":{"type":"string","description":"Optional ISO region hint, matching the one used when sending."}},"required":["phone","code"]},"title":"Confirm Owner Phone Verification","annotations":{"title":"Confirm Owner Phone Verification","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}]}},{"name":"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","properties":{"agent_id":{"type":"string","description":"The agent that should answer on this number."},"phone_number_id":{"type":"string","description":"phone_number_id from get_agent_whatsapp claimable_numbers."}},"required":["agent_id","phone_number_id"]},"title":"Attach Agent Whatsapp","annotations":{"title":"Attach Agent Whatsapp","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}]}},{"name":"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","properties":{"phone_number_id":{"type":"string","description":"The number to disconnect, from get_agent_whatsapp."}},"required":["phone_number_id"]},"title":"Detach Agent Whatsapp","annotations":{"title":"Detach Agent Whatsapp","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["agents:write"]}]}}],"authentication":{"type":"bearer","description":"Use an MCP token obtained from the Fine Structure dashboard. Pass it as: Authorization: Bearer fse2_mcp_<token>"}}