{"openapi":"3.1.0","info":{"title":"Amolfi Public API","version":"2026-08-12","description":"One governed spine: every operation reaches Amolfi through the same Native Tool invoker the product uses. Machine surfaces propose; owners approve in the app."},"servers":[{"url":"https://api.amolfi.com"}],"components":{"securitySchemes":{"workspaceToken":{"type":"http","scheme":"bearer","description":"amolfi_sk_<org>_<secret> — one workspace, minted by a real member, shown once"},"firebaseIdToken":{"type":"http","scheme":"bearer","bearerFormat":"Firebase ID token"},"workspaceHeader":{"type":"apiKey","in":"header","name":"X-Amolfi-Org-Id","description":"Exact active workspace reference resolved against the verified Firebase principal"}},"schemas":{"MachineReadEnvelope":{"type":"object","additionalProperties":false,"required":["status","data","meta"],"properties":{"status":{"const":"ok"},"data":{},"meta":{"type":"object","additionalProperties":false,"required":["contract","tool","truncated","original_chars"],"properties":{"contract":{"const":"amolfi.machine-read.v1"},"tool":{"type":"string"},"truncated":{"type":"boolean"},"original_chars":{"type":"integer","minimum":0}}}}}}},"paths":{"/v1/health":{"get":{"operationId":"health","summary":"Liveness echo (no credential)","responses":{"200":{"description":"OK"}}}},"/v1/scopes":{"get":{"operationId":"listScopes","summary":"The static scope catalog (no credential)","responses":{"200":{"description":"Scope table"}}}},"/v1/openapi.json":{"get":{"operationId":"openapi","summary":"This document (no credential)","responses":{"200":{"description":"OpenAPI 3.1"}}}},"/v1/{module}/{action}":{"post":{"operationId":"invokePathAddressedTool","summary":"Amolfi 2.0 first-party path-addressed Native Tool invocation","description":"The REQUEST authorizer verifies a revoked-aware Firebase ID token, resolves the live active membership named by X-Amolfi-Org-Id, exact-matches both path segments to a registered tool, and runs the hand-authored module predicate before the body is accepted.","security":[{"firebaseIdToken":[],"workspaceHeader":[]}],"parameters":[{"name":"module","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Typed machine or file result","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MachineReadEnvelope"},{"type":"object","required":["status","data"]}]}}}},"202":{"description":"Approval card created; an active owner approves in the app"},"401":{"description":"A required authorizer identity header was absent, so API Gateway did not invoke the authorizer"},"403":{"description":"Firebase token invalid, expired, or revoked; inactive membership; path mismatch; stale context; or insufficient module permission"},"404":{"description":"No exact registered module/action route"}}}},"/v1/runs":{"get":{"operationId":"amo_run_list","summary":"List up to 25 recent durable Amo runs, with current work first","security":[{"workspaceToken":[]}],"responses":{"200":{"description":"Narrow public run summaries","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"working_style":{"type":"string","enum":["collaborative","autonomous","moonshot"],"description":"How Amo works: collaborative (Ask), autonomous (Auto, default), or moonshot (owner-approved one-run envelope)."},"effort":{"type":"string","enum":["low","normal","high","ultrawork"],"description":"Reasoning effort: low (Fast), normal (default), high, or ultrawork. Never changes approval authority."}}}}}}}}},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"}}},"post":{"operationId":"amo_run_start","summary":"Hand Amo a goal (async — 202, never 200)","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"type":"string","description":"The goal in plain words"},"working_style":{"type":"string","enum":["collaborative","autonomous","moonshot"],"description":"How Amo works: collaborative (Ask), autonomous (Auto, default), or moonshot (owner-approved one-run envelope)."},"envelope":{"type":"object","additionalProperties":false,"properties":{"classes":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"tool":{"type":"string","description":"Exact Native Tool name"},"audience":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"},"description":"Optional exact recipients/audience for this tool class"}},"required":["tool"]}},"crownsCeiling":{"type":"number","minimum":0,"description":"Maximum Crowns this run may spend"},"windowUntil":{"type":"string","description":"ISO-8601 end of the authority window"},"declaredAt":{"type":"string","description":"Ignored on write; replaced by the trusted server declaration time"}},"required":["classes","crownsCeiling","windowUntil"],"description":"Required only for Moonshot. It binds to the one new run and never passes to child runs."},"effort":{"type":"string","enum":["low","normal","high","ultrawork"],"description":"Reasoning effort: low (Fast), normal (default), high, or ultrawork. Never changes approval authority."},"budgets":{"type":"object","description":"Optional costCeilingCents / dryRun / maxReplans"}},"required":["goal"]}}}},"responses":{"202":{"description":"Run accepted; poll GET /v1/runs/{run_id}","content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"working_style":{"type":"string","enum":["collaborative","autonomous","moonshot"],"description":"How Amo works: collaborative (Ask), autonomous (Auto, default), or moonshot (owner-approved one-run envelope)."},"effort":{"type":"string","enum":["low","normal","high","ultrawork"],"description":"Reasoning effort: low (Fast), normal (default), high, or ultrawork. Never changes approval authority."}}}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"}}}},"/v1/runs/{run_id}":{"get":{"operationId":"amo_run_get","summary":"Narrow run status (polling is normative)","security":[{"workspaceToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Public run DTO","content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"working_style":{"type":"string","enum":["collaborative","autonomous","moonshot"],"description":"How Amo works: collaborative (Ask), autonomous (Auto, default), or moonshot (owner-approved one-run envelope)."},"effort":{"type":"string","enum":["low","normal","high","ultrawork"],"description":"Reasoning effort: low (Fast), normal (default), high, or ultrawork. Never changes approval authority."}}}}}},"404":{"description":"Not found"}}}},"/v1/runs/{run_id}/guidance":{"post":{"operationId":"amo_run_guidance","summary":"Guidance at the next safe boundary (can never approve)","security":[{"workspaceToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Accepted"},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."}}}},"/v1/runs/{run_id}/cancel":{"post":{"operationId":"amo_run_cancel","summary":"Stop at the next safe boundary (never a rollback)","security":[{"workspaceToken":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Accepted"}}}},"/v1/tools/business_pulse":{"post":{"operationId":"business_pulse","summary":"Where the business stands right now, as counts derived live: approval cards waiting on the owner, invoices overdue and due within 7 days, work items overdue and due this week, prospects new this week and in motion, and events in the next 24 hours. Only the parts the current person may view are included. Counts only — ask the relevant list tool for the items themselves.","description":"Scope: `workspace.pulse.read` · Risk: R0 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/mcp_tool_call":{"post":{"operationId":"mcp_tool_call","summary":"Call one tool on an MCP server the workspace owner registered. The tool's own risk mark (set by the owner at registration) decides whether the call runs, previews or waits for a card; the server's answer is untrusted text.","description":"Scope: `connectors.mcp.call` · Risk: R3 · Roles: owner, admin · PROPOSE-ONLY: returns 202 + an owner approval card; approval happens only in the app.","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["server","tool"],"properties":{"server":{"type":"string","maxLength":40,"description":"The registered server's slug."},"tool":{"type":"string","maxLength":128,"description":"The tool name as the server lists it."},"input":{"type":"object","additionalProperties":true,"description":"The tool's arguments, per its input schema."}}}}}},"responses":{"202":{"description":"Approval card created; an active owner approves in the app"},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/crm_list_clients":{"post":{"operationId":"crm_list_clients","summary":"List this workspace's CRM CLIENTS / accounts with each client's name, status (active/prospect/inactive), and details. Use this for ANY question about clients or accounts — do NOT use the generic records tool for clients.","description":"Scope: `crm.clients.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"afterId":{"type":"string","description":"Continue after this record ID in the stable ID order."},"status":{"type":"string","enum":["active","prospect","inactive","archived"],"description":"Optional status filter."},"limit":{"type":"integer","minimum":1,"maximum":200,"description":"Max clients to return (default 50)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/crm_list_deals":{"post":{"operationId":"crm_list_deals","summary":"List this workspace's sales DEALS / opportunities (the pipeline) with each deal's name, stage, status (open/won/lost), value, and linked client. Use this for ANY question about deals, opportunities, the pipeline, forecast, or sales — do NOT use the generic records tool for deals.","description":"Scope: `crm.deals.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","won","lost","archived"],"description":"Optional status filter."},"clientId":{"type":"string","description":"Only deals belonging to this CRM client id (from crm_list_clients). Filtered in SQL, so it is exact even when the workspace has more deals than one page."},"limit":{"type":"integer","minimum":1,"maximum":200,"description":"Max deals to return (default 50)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/lead_factory_list_leads":{"post":{"operationId":"lead_factory_list_leads","summary":"List discovered leads (prospect businesses) with their score and stage.","description":"Scope: `crm.leads.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer"},"run_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/lead_factory_list_runs":{"post":{"operationId":"lead_factory_list_runs","summary":"List recent Lead Factory runs with their status and lead counts.","description":"Scope: `crm.leads.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/prospect_list":{"post":{"operationId":"prospect_list","summary":"List prospects from the launch/design-partner pipeline, optionally filtered by view, lifecycle status, or search text.","description":"Scope: `crm.prospects.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"view":{"type":"string","enum":["all","overview","waitlist","bookings","design_partners","follow_ups"]},"status":{"type":"string"},"search":{"type":"string"},"limit":{"type":"integer"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/prospect_stats":{"post":{"operationId":"prospect_stats","summary":"Get aggregate prospect counts by lifecycle status, booked count, follow-up count, and source.","description":"Scope: `crm.prospects.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/lead_factory_update_lead_stage":{"post":{"operationId":"lead_factory_update_lead_stage","summary":"Move a lead to a different CRM pipeline stage. Updates the lead's pipeline/stage fields; does not contact anyone.","description":"Scope: `crm.lead_stage.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lead_id":{"type":"string"},"pipeline_id":{"type":"string"},"stage_id":{"type":"string"}},"required":["lead_id","pipeline_id","stage_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/crm_list_pipelines":{"post":{"operationId":"crm_list_pipelines","summary":"List this workspace's sales PIPELINES — the named tracks deals move through — with each pipeline's name, type, status, and which one is the default. Use before crm_list_pipeline_stages, or to answer \"what pipelines do we have?\". Archived pipelines are left out unless asked for. Read-only.","description":"Scope: `crm.pipelines.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"includeArchived":{"type":"boolean","description":"Include archived (soft-deleted) pipelines. Default false."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/crm_list_pipeline_stages":{"post":{"operationId":"crm_list_pipeline_stages","summary":"List the STAGES of a sales pipeline, in the order they appear on the pipeline, with each stage's id, name, position, type, win probability, and whether it is terminal. This is where the `stageId` that crm_move_deal_stage needs comes from. Pass pipelineId to get one pipeline's stages; omit it for every stage in the workspace. Archived stages are never returned. Read-only.","description":"Scope: `crm.pipelines.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pipelineId":{"type":"string","description":"Optional pipeline id (from crm_list_pipelines). Omit for all stages in the workspace."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/records_list":{"post":{"operationId":"records_list","summary":"List business records of a given type for this workspace (clients, deals, leads, invoices, projects, suppliers, …). Use the object type KEY from the operating model. Cursor-paginated, RBAC-scoped.","description":"Scope: `files.records.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"objectTypeKey":{"type":"string","description":"Stable object type key, e.g. client, deal, invoice, project"},"search":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":50},"cursor":{"type":"string"}},"required":["objectTypeKey"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/record_get":{"post":{"operationId":"record_get","summary":"Fetch one business record by type + id, with its typed properties.","description":"Scope: `files.records.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"objectTypeKey":{"type":"string"},"recordId":{"type":"string"}},"required":["objectTypeKey","recordId"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/brief_get":{"post":{"operationId":"brief_get","summary":"Read the current governed Business Brief for this workspace — or one lane's brief (space) — including its Always doctrine, detailed markdown, citations, verification date, version, and existing /files editor path.","description":"Scope: `files.records.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"space":{"type":"string","enum":["business","finance","growth","work","clients","people","legal","ops"],"description":"Which brief: business (default) or a lane — finance, growth, work, clients, people, legal, ops."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/brief_propose_edit":{"post":{"operationId":"brief_propose_edit","summary":"PROPOSE one or two section replacements for the governed Business Brief. This does NOT save or change the Brief: it records an inert proposal and creates an owner review card. Say that you proposed an edit, never that you updated the Brief.","description":"Scope: `files.records.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"space":{"type":"string","enum":["business","finance","growth","work","clients","people","legal","ops"],"description":"Which brief the edit is for: business (default) or a lane — finance, growth, work, clients, people, legal, ops."},"edits":{"type":"array","minItems":1,"maxItems":2,"items":{"type":"object","additionalProperties":false,"properties":{"section":{"type":"string","enum":["always","detail"]},"replacementMarkdown":{"type":"string","maxLength":200000}},"required":["section","replacementMarkdown"]}},"citations":{"type":"object","additionalProperties":false,"properties":{"ontologyObjectIds":{"type":"array","maxItems":100,"items":{"type":"string"}},"amoMemoryIds":{"type":"array","maxItems":100,"items":{"type":"string"}}}}},"required":["edits"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/attachment_pdf_form_fill":{"post":{"operationId":"attachment_pdf_form_fill","summary":"Fill supported AcroForm fields in one malware-cleared PDF and create a new generated attachment in the same conversation. Refuses encrypted PDFs, XFA, signatures, unsupported fields, and values without robust appearances.","description":"Scope: `files.documents.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"attachment_id":{"type":"string"},"fields":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"value":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["name","value"]}},"flatten":{"type":"boolean"},"output_filename":{"type":"string"}},"required":["attachment_id","fields"]}}}},"responses":{"200":{"description":"Typed file receipt; private URLs remain confined to the file projection","content":{"application/json":{"schema":{"type":"object","required":["status","data"],"properties":{"status":{"const":"ok"},"data":{"type":"object"}}}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/attachment_pdf_overlay":{"post":{"operationId":"attachment_pdf_overlay","summary":"Draw bounded one-line PDF overlays or visual replacements at explicit page coordinates and create a new generated attachment. Replacement verifies expected_text with PDF.js; it does not reflow text or remove underlying content.","description":"Scope: `files.documents.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"attachment_id":{"type":"string"},"operations":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"page":{"type":"integer"},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"text":{"type":"string"},"expected_text":{"type":"string"},"mode":{"type":"string","enum":["replace","overlay"]},"font_size":{"type":"number"}},"required":["page","x","y","width","height","text","mode"]}},"output_filename":{"type":"string"}},"required":["attachment_id","operations"]}}}},"responses":{"200":{"description":"Typed file receipt; private URLs remain confined to the file projection","content":{"application/json":{"schema":{"type":"object","required":["status","data"],"properties":{"status":{"const":"ok"},"data":{"type":"object"}}}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/attachment_pdf_redact":{"post":{"operationId":"attachment_pdf_redact","summary":"Permanently remove PDF content under explicit page rectangles with PDFium, draw opaque black boxes, verify any expected_text is no longer extractable, and create a new generated attachment.","description":"Scope: `files.documents.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"attachment_id":{"type":"string"},"redactions":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"page":{"type":"integer"},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"expected_text":{"type":"string"}},"required":["page","x","y","width","height"]}},"output_filename":{"type":"string"}},"required":["attachment_id","redactions"]}}}},"responses":{"200":{"description":"Typed file receipt; private URLs remain confined to the file projection","content":{"application/json":{"schema":{"type":"object","required":["status","data"],"properties":{"status":{"const":"ok"},"data":{"type":"object"}}}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/attachment_docx_replace":{"post":{"operationId":"attachment_docx_replace","summary":"Replace or insert text in bounded OOXML Word text parts, including matches split across runs, and create a new generated attachment while preserving every untouched part byte-for-byte after decompression.","description":"Scope: `files.documents.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"attachment_id":{"type":"string"},"replacements":{"type":"array","maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"find":{"type":"string"},"replace":{"type":"string"},"occurrence":{"oneOf":[{"type":"integer","minimum":1},{"type":"string","enum":["all"]}]}},"required":["find","replace"]}},"insertions":{"type":"array","maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"anchor":{"type":"string"},"text":{"type":"string"},"position":{"type":"string","enum":["before","after"]},"occurrence":{"oneOf":[{"type":"integer","minimum":1},{"type":"string","enum":["all"]}]}},"required":["anchor","text","position"]}},"output_filename":{"type":"string"}},"required":["attachment_id"]}}}},"responses":{"200":{"description":"Typed file receipt; private URLs remain confined to the file projection","content":{"application/json":{"schema":{"type":"object","required":["status","data"],"properties":{"status":{"const":"ok"},"data":{"type":"object"}}}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/attachment_xlsx_replace":{"post":{"operationId":"attachment_xlsx_replace","summary":"Replace or insert text in bounded OOXML Excel parts, including matches split across runs, and create a new generated attachment while preserving every untouched part byte-for-byte after decompression. Edits shared strings, inline strings and NUMERIC cells; a cell that merely points at the string table is never touched.","description":"Scope: `files.documents.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"attachment_id":{"type":"string"},"replacements":{"type":"array","maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"find":{"type":"string"},"replace":{"type":"string"},"occurrence":{"oneOf":[{"type":"integer","minimum":1},{"type":"string","enum":["all"]}]}},"required":["find","replace"]}},"insertions":{"type":"array","maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"anchor":{"type":"string"},"text":{"type":"string"},"position":{"type":"string","enum":["before","after"]},"occurrence":{"oneOf":[{"type":"integer","minimum":1},{"type":"string","enum":["all"]}]}},"required":["anchor","text","position"]}},"output_filename":{"type":"string"}},"required":["attachment_id"]}}}},"responses":{"200":{"description":"Typed file receipt; private URLs remain confined to the file projection","content":{"application/json":{"schema":{"type":"object","required":["status","data"],"properties":{"status":{"const":"ok"},"data":{"type":"object"}}}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/attachment_pptx_replace":{"post":{"operationId":"attachment_pptx_replace","summary":"Replace or insert text in bounded OOXML PowerPoint parts, including matches split across runs, and create a new generated attachment while preserving every untouched part byte-for-byte after decompression. Edits slide and notes text.","description":"Scope: `files.documents.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"attachment_id":{"type":"string"},"replacements":{"type":"array","maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"find":{"type":"string"},"replace":{"type":"string"},"occurrence":{"oneOf":[{"type":"integer","minimum":1},{"type":"string","enum":["all"]}]}},"required":["find","replace"]}},"insertions":{"type":"array","maxItems":25,"items":{"type":"object","additionalProperties":false,"properties":{"anchor":{"type":"string"},"text":{"type":"string"},"position":{"type":"string","enum":["before","after"]},"occurrence":{"oneOf":[{"type":"integer","minimum":1},{"type":"string","enum":["all"]}]}},"required":["anchor","text","position"]}},"output_filename":{"type":"string"}},"required":["attachment_id"]}}}},"responses":{"200":{"description":"Typed file receipt; private URLs remain confined to the file projection","content":{"application/json":{"schema":{"type":"object","required":["status","data"],"properties":{"status":{"const":"ok"},"data":{"type":"object"}}}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_list_views":{"post":{"operationId":"artifact_list_views","summary":"List the Custom Views (interactive data views) authored in this workspace — drafts, published, generated. RBAC-scoped, read-only.","description":"Scope: `files.views.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"draft | published | archived"},"placement":{"type":"string","description":"e.g. dashboard, generated"},"search":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_get_view":{"post":{"operationId":"artifact_get_view","summary":"Fetch one Custom View by id, with its metadata + rendered content. RBAC-scoped, read-only.","description":"Scope: `files.views.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Custom View id"}},"required":["id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_list_view_versions":{"post":{"operationId":"artifact_list_view_versions","summary":"List the saved VERSIONS of one Custom View — each version's number, origin (ai / human / remix), the model that produced it, and its content hash. Answers \"what changed?\" and \"which version do we go back to?\". Metadata only, never the HTML of every version.","description":"Scope: `files.views.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"custom_view_id":{"type":"string","description":"The Custom View whose versions to list."},"limit":{"type":"integer","minimum":1,"maximum":200,"description":"Max versions to return (default 50)."}},"required":["custom_view_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_create_view":{"post":{"operationId":"artifact_create_view","summary":"Generate a locked DRAFT Custom View from a prompt and governed data scope. It cannot publish, share, use forms, or loosen the sandbox.","description":"Scope: `files.views.write` · Risk: R2 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"prompt":{"type":"string","maxLength":8000,"description":"What the view should show and help someone do."},"name":{"type":"string","maxLength":240},"data_scope":{"type":"string","enum":["shipment_tracking","knowledge_overview","crm_overview","finance_summary","project_status"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_regenerate_view":{"post":{"operationId":"artifact_regenerate_view","summary":"Refresh a shipment Custom View. Optionally replace its shipment rows first; saves a version only when data changed.","description":"Scope: `files.views.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"Custom View id."},"shipments":{"type":"array","maxItems":500,"items":{"type":"object"},"description":"Optional rows. Use key, status, and any of reference, carrier, tracking_number, origin, destination, eta, shipped_at, delivered_at, updated_at, progress_percent."}},"required":["id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_list":{"post":{"operationId":"artifact_list","summary":"List Artifacts in the workspace Cloud — folder children or a filtered slice. Access-scoped, read-only.","description":"Scope: `files.artifacts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"parent_folder_id":{"type":"string","format":"uuid","nullable":true,"description":"null = the workspace root."},"kinds":{"type":"array","items":{"type":"string","enum":["folder","block_document","workbook","presentation","pdf","image","video","audio","custom_view","form","generic_file"]},"minItems":1,"maxItems":11,"uniqueItems":true},"origin_amo_id":{"type":"string"},"owner_user_id":{"type":"string","format":"uuid"},"lifecycle_state":{"type":"string","enum":["active","archived"]},"retention_class":{"type":"string","enum":["persistent","temporary"]},"scope":{"type":"string","enum":["mine","workspace","all"]},"visibility_label":{"type":"string","enum":["private","shared","workspace"]},"limit":{"type":"integer","minimum":1,"maximum":50},"cursor":{"type":"string","description":"Opaque page cursor from a prior response."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_get":{"post":{"operationId":"artifact_get","summary":"Fetch one Artifact with its current (or a named) revision, its canonical_payload and its renditions. Read it before editing: it returns the base_revision_id an operation needs and the updated_at a rename needs. Access-scoped, read-only.","description":"Scope: `files.artifacts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"revision_id":{"type":"string","format":"uuid"}},"required":["artifact_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_search":{"post":{"operationId":"artifact_search","summary":"Full-text search across Artifacts the caller may see — canonical content, OCR, transcripts and metadata. Read-only.","description":"Scope: `files.artifacts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string","maxLength":512},"kinds":{"type":"array","items":{"type":"string","enum":["folder","block_document","workbook","presentation","pdf","image","video","audio","custom_view","form","generic_file"]},"minItems":1,"maxItems":11,"uniqueItems":true},"parent_folder_id":{"type":"string","format":"uuid","nullable":true},"include_descendants":{"type":"boolean"},"origin_amo_id":{"type":"string"},"owner_user_id":{"type":"string","format":"uuid"},"retention_class":{"type":"string","enum":["persistent","temporary"]},"scope":{"type":"string","enum":["mine","workspace","all"]},"visibility_label":{"type":"string","enum":["private","shared","workspace"]},"limit":{"type":"integer","minimum":1,"maximum":50},"cursor":{"type":"string","description":"Opaque page cursor from a prior response."}},"required":["query"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_revision_list":{"post":{"operationId":"artifact_revision_list","summary":"Page one Artifact's revision history — author, summary, canonical mode, timestamps. Read-only.","description":"Scope: `files.artifacts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","description":"Opaque page cursor from a prior response."}},"required":["artifact_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_revision_get":{"post":{"operationId":"artifact_revision_get","summary":"Fetch one named revision of an Artifact with its canonical content coordinates. Read-only.","description":"Scope: `files.artifacts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"revision_id":{"type":"string","format":"uuid"}},"required":["artifact_id","revision_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_relation_list":{"post":{"operationId":"artifact_relation_list","summary":"List the provenance relations touching one Artifact, inbound, outbound or both. Read-only.","description":"Scope: `files.artifacts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["outbound","inbound","both"]},"relation_types":{"type":"array","items":{"type":"string","enum":["derived_from","converted_from","exported_from","template_of","instantiated_from","source_for","published_from","supersedes"]},"minItems":1,"maxItems":8,"uniqueItems":true},"include_revoked":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","description":"Opaque page cursor from a prior response."}},"required":["artifact_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_upload_status":{"post":{"operationId":"artifact_upload_status","summary":"Read the current phase of one upload session — awaiting_upload, processing, ready or failed. Read-only.","description":"Scope: `files.artifacts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"upload_session_id":{"type":"string","format":"uuid"}},"required":["upload_session_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_create":{"post":{"operationId":"artifact_create","summary":"Create a folder, or a structured Artifact with its first revision. A document is kind block_document with payload_schema \"amolfi.block-document.v1\", payload_schema_version 1 and canonical_payload {title, blocks[]}. Every block is {id, type, ...}: heading{level,inlines}, paragraph{inlines}, quote{inlines}, list{ordered,items[{inlines,children}]}, table{columns,rows}, code{language,text}, divider, page_break; an inline is {text, marks:{}}. A spreadsheet is workbook, a deck is presentation.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string"},"description":{"type":"string","maxLength":16384},"kind":{"type":"string","enum":["folder","block_document","workbook","presentation","form"]},"parent_folder_id":{"type":"string","format":"uuid","nullable":true},"inheritance_mode":{"type":"string","enum":["inherit","restricted"]},"retention_class":{"type":"string","enum":["persistent","temporary"]},"expires_at":{"type":"string","format":"date-time","nullable":true},"payload_schema":{"type":"string","maxLength":120,"description":"Structured kinds only."},"payload_schema_version":{"type":"integer","minimum":1,"description":"Structured kinds only."},"canonical_payload":{"type":"object","description":"Structured kinds only — the first canonical body."}},"required":["title","kind"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_apply_operation":{"post":{"operationId":"artifact_apply_operation","summary":"Edit a structured Artifact: one operation against the base_revision_id you just read, producing the next revision on the same card. For a block_document the operation is {type, schema_version: 1, input}, where type is one of doc.replace_block, doc.insert_block, doc.delete_block, doc.move_block, doc.replace_text.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"base_revision_id":{"type":"string","format":"uuid"},"operation":{"type":"object","description":"The frozen driver operation envelope for this Artifact kind."},"change_summary":{"type":"string","maxLength":1000,"nullable":true}},"required":["artifact_id","base_revision_id","operation"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_metadata_update":{"post":{"operationId":"artifact_metadata_update","summary":"Rename an Artifact or change its description. Title and description are metadata, so this writes no revision. Send back the exact updated_at artifact_get returned.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","maxLength":16384},"expected_updated_at":{"type":"string","format":"date-time"}},"required":["artifact_id","expected_updated_at"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_move":{"post":{"operationId":"artifact_move","summary":"Move an Artifact to another folder, preserving effective permissions; a widening move needs an explicit confirmation token.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"destination_folder_id":{"type":"string","format":"uuid","nullable":true,"description":"null = the workspace root."},"permission_strategy":{"type":"string","const":"preserve_effective"},"widening_confirmation":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","const":"accept_destination_inheritance"},"decision_token":{"type":"string"}}}},"required":["artifact_id","destination_folder_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_archive":{"post":{"operationId":"artifact_archive","summary":"Archive an Artifact — it leaves the active listing and keeps every revision. Reversible with artifact_restore.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"}},"required":["artifact_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_restore":{"post":{"operationId":"artifact_restore","summary":"Return an archived Artifact to the active listing.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"}},"required":["artifact_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_revision_restore":{"post":{"operationId":"artifact_revision_restore","summary":"Restore an earlier revision by writing it forward as a NEW revision — history is never rewritten.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"base_revision_id":{"type":"string","format":"uuid"},"restore_revision_id":{"type":"string","format":"uuid"},"change_summary":{"type":"string","maxLength":1000,"nullable":true}},"required":["artifact_id","base_revision_id","restore_revision_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_refresh":{"post":{"operationId":"artifact_refresh","summary":"Re-run an Artifact's data binding to produce an updated revision. Reversible; it never publishes anything outward.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"base_revision_id":{"type":"string","format":"uuid"},"binding_id":{"type":"string","format":"uuid"},"binding_version":{"type":"integer","minimum":1}},"required":["artifact_id","base_revision_id","binding_id","binding_version"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_export":{"post":{"operationId":"artifact_export","summary":"Render one revision into another format, producing a rebuildable export rendition on the same card. A block_document exports pdf, docx, md or txt; a workbook xlsx or csv; a presentation pdf or pptx.","description":"Scope: `files.artifacts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"artifact_id":{"type":"string","format":"uuid"},"revision_id":{"type":"string","format":"uuid"},"format":{"type":"string","maxLength":120},"options":{"type":"object","description":"Driver-specific export options."}},"required":["artifact_id","revision_id","format"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/artifact_relation_set":{"post":{"operationId":"artifact_relation_set","summary":"Record a typed relation between two Artifacts (derived_from, converted_from, template_of, supersedes, …). Provenance only — it grants nothing.","description":"Scope: `files.artifacts.write` · Risk: R2 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"source_artifact_id":{"type":"string","format":"uuid"},"source_revision_id":{"type":"string","format":"uuid","nullable":true},"target_artifact_id":{"type":"string","format":"uuid"},"target_revision_id":{"type":"string","format":"uuid","nullable":true},"relation_type":{"type":"string","enum":["derived_from","converted_from","exported_from","template_of","instantiated_from","source_for","published_from","supersedes"]},"metadata":{"type":"object","description":"Flat scalar metadata for the edge."}},"required":["source_artifact_id","target_artifact_id","relation_type"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/calendar_list_events":{"post":{"operationId":"calendar_list_events","summary":"List the org calendar events, optionally within a date/time window. Pass range_start/range_end (ISO 8601) to answer \"what do I have next week\", \"the team's Friday\", or \"what's due this month\". Returns events with title, start/end, location, type, and any linked CRM ids. NOTE: returns ALL statuses including cancelled — pass status \"confirmed\" (or filter cancelled rows out) when answering what is actually on the calendar.","description":"Scope: `calendar.events.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"range_start":{"type":"string","description":"ISO 8601 start of the window (inclusive), e.g. 2026-07-06T00:00:00Z"},"range_end":{"type":"string","description":"ISO 8601 end of the window (inclusive)"},"status":{"type":"string","description":"Optional status filter (confirmed / tentative / cancelled)"},"limit":{"type":"integer","description":"Max events to return (server caps the page size)"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_overview":{"post":{"operationId":"finance_overview","summary":"Get the finance overview for the org — cash position, receivables, recent activity summary.","description":"Scope: `finance.overview.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_metrics":{"post":{"operationId":"finance_metrics","summary":"Read headline finance metrics for a period — revenue, COGS, opex, net, margin, inflows/outflows, classified spend — plus an optional prior-period comparison (deltas) and a per-month series.","description":"Scope: `finance.overview.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","description":"Period start, YYYY-MM-DD."},"endDate":{"type":"string","description":"Period end, YYYY-MM-DD."},"priorStartDate":{"type":"string","description":"Optional prior-period start, YYYY-MM-DD — enables comparison deltas."},"priorEndDate":{"type":"string","description":"Optional prior-period end, YYYY-MM-DD."},"entityId":{"type":"string","description":"Optional entity UUID to scope to a single entity."},"granularity":{"type":"string","description":"Series granularity label (default \"month\")."}},"required":["startDate","endDate"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_dashboard_cash":{"post":{"operationId":"finance_dashboard_cash","summary":"Get the cash dashboard snapshot — active bank account balances, total cash on hand, and a trailing-90-day runway estimate (projected 30/90-day cash and days of runway). Estimate, not a prediction.","description":"Scope: `finance.overview.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"type":"string","description":"Optional entity UUID to scope balances + runway to a single entity."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_money_flow":{"post":{"operationId":"finance_money_flow","summary":"Read the period money-flow for a date range — revenue grouped by client/segment and spend grouped by category, with totals (revenue, expenses, net). Posted, non-personal, non-transfer transactions only.","description":"Scope: `finance.overview.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","description":"Period start, YYYY-MM-DD."},"endDate":{"type":"string","description":"Period end, YYYY-MM-DD (on or after startDate)."},"entityId":{"type":"string","description":"Optional finance entity UUID to scope the flow to."}},"required":["startDate","endDate"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_numbers":{"post":{"operationId":"finance_numbers","summary":"Read the owner's numbers: cash, revenue, costs, profit, burn, runway, owed, recurring revenue/costs, customers, churn — each with a 30-day sparkline and delta. Cash basis. Prefer this over re-summing transactions. A number the workspace cannot answer yet (no bank, no retainers) comes back available:false with a plain reason rather than a zero.","description":"Scope: `finance.overview.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"type":"string","description":"Optional entity UUID to scope the ledger, cash and invoice rows to a single entity; omit for the whole workspace. Retainers and subscriptions carry no entity, so those rows are always workspace-wide."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_metric_series":{"post":{"operationId":"finance_metric_series","summary":"Read ONE of the owner's numbers over one range — the chart points, the net-flow bars under it, and its stat grid. Ranges are 1M, 3M (daily), 6M, YTD, 1Y (weekly) and ALL (monthly). Cash basis. Use this when the question is about a number over time (\"how has burn moved this year?\"), and finance_numbers when it is about today.","description":"Scope: `finance.overview.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"metric":{"type":"string","enum":["cash","revenue","costs","profit","burn","runway","owed","recurring_revenue","recurring_costs","customers","churn"],"description":"Which number to chart."},"range":{"type":"string","enum":["1M","3M","6M","YTD","1Y","ALL"],"description":"The window: 1M and 3M are daily, 6M/YTD/1Y weekly, ALL monthly. Defaults to 3M."},"entityId":{"type":"string","description":"Optional entity UUID to scope to a single entity."}},"required":["metric"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_list_invoices":{"post":{"operationId":"finance_list_invoices","summary":"List the org's invoices with customer, status, totals, outstanding balance, line items and recorded payments. Optionally filter by status (open|draft|sent|paid|partially_paid|overdue|cancelled) or customer.","description":"Scope: `finance.invoices.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Filter: open | draft | sent | paid | partially_paid | overdue | cancelled."},"customerId":{"type":"string","description":"Optional finance customer UUID to filter by."},"limit":{"type":"integer","description":"Max rows (1–500, default 100)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_list_customers":{"post":{"operationId":"finance_list_customers","summary":"List the org's finance customers with their open invoice count and open balance, optionally filtered by status.","description":"Scope: `finance.customers.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","inactive","archived"],"description":"Optional status filter."},"limit":{"type":"integer","description":"Max rows (1–500, default 100)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_list_bills":{"post":{"operationId":"finance_list_bills","summary":"List the org's accounts-payable bills with outstanding amount and aging bucket (current / 1-30 / 31-60 / 61-90 / 90+). Optionally filter by status or vendor.","description":"Scope: `finance.bills.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Optional status filter, e.g. 'open', 'partial', 'paid', 'void'."},"vendorId":{"type":"string","description":"Optional vendor UUID to filter to one vendor."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_list_vendors":{"post":{"operationId":"finance_list_vendors","summary":"List the org's finance vendors (the vendor master) with W-9 status, 1099-candidate flag, default category/account, and alias + transaction counts. TINs are never returned in full (only on-file flag + last 4).","description":"Scope: `finance.vendors.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"includeMerged":{"type":"boolean","description":"Include vendors that were merged into a survivor (default false)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_list_receipts":{"post":{"operationId":"finance_list_receipts","summary":"List finance receipts for the org — optionally filtered by linked transaction, match status, OCR status, or to show only the soft-deleted (Deleted tab) receipts.","description":"Scope: `finance.receipts.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionId":{"type":"string","description":"Filter to receipts linked to this transaction (UUID)."},"matchStatus":{"type":"string","description":"Filter by match status, e.g. 'unmatched', 'confirmed', 'declined'."},"ocrStatus":{"type":"string","description":"Filter by OCR status, e.g. 'pending', 'done'."},"includeDeleted":{"type":"boolean","description":"Include soft-deleted receipts alongside active ones."},"deletedOnly":{"type":"boolean","description":"Show ONLY soft-deleted receipts (the Deleted tab)."},"limit":{"type":"integer","description":"Max rows to return (1–500, default 100)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_report_pnl":{"post":{"operationId":"finance_report_pnl","summary":"Generate the cash-basis Profit & Loss (P&L) report for a date range — revenue, COGS, opex, and net income by month, with data-quality flags. Reporting only, not tax advice.","description":"Scope: `finance.reports.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","description":"Period start, YYYY-MM-DD."},"endDate":{"type":"string","description":"Period end, YYYY-MM-DD."},"basis":{"type":"string","enum":["cash"],"description":"Accounting basis — cash only (accrual not yet supported)."},"entityId":{"type":"string","description":"Optional entity UUID to scope to a single entity; omit for all entities."}},"required":["startDate","endDate"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_report_cash_flow":{"post":{"operationId":"finance_report_cash_flow","summary":"Generate the cash flow report for a date range — monthly inflows, outflows, net, and transfers (transfers shown separately, excluded from net). Cash-basis, posted transactions only.","description":"Scope: `finance.reports.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","description":"Period start, YYYY-MM-DD."},"endDate":{"type":"string","description":"Period end, YYYY-MM-DD."},"entityId":{"type":"string","description":"Optional entity UUID to scope to a single entity."},"format":{"type":"string","enum":["csv"],"description":"Pass \"csv\" to also get a CSV export of the monthly rows."}},"required":["startDate","endDate"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_report_ar_aging":{"post":{"operationId":"finance_report_ar_aging","summary":"Generate the accounts-receivable (AR) aging report — open customer invoice balances bucketed by days past due (current, 1-30, 31-60, 61-90, 90+), per customer and overall.","description":"Scope: `finance.reports.read` · Risk: R0 · Roles: owner, admin, accountant","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"type":"string","description":"Optional entity UUID to scope to a single entity."},"customerId":{"type":"string","description":"Optional customer UUID to scope to a single customer."},"format":{"type":"string","enum":["csv"],"description":"Pass \"csv\" to also get a CSV export of the open invoices."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/finance_mark_transaction_reviewed":{"post":{"operationId":"finance_mark_transaction_reviewed","summary":"Mark a finance transaction as reviewed, or clear the review flag by sending reviewed:false. Does not move money — only flips the review flag.","description":"Scope: `finance.review.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionId":{"type":"string","description":"The finance transaction UUID."},"reviewed":{"type":"boolean","description":"true marks it reviewed (default); false clears the review flag."}},"required":["transactionId"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/crowns_statement":{"post":{"operationId":"crowns_statement","summary":"The workspace Crowns statement for one month: totals by surface, by Amo and by machine (with each machine's worked and watched seconds), plus the month total. Optionally returns a CSV export. Owner/admin only.","description":"Scope: `workspace.crowns.read` · Risk: R0 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string","description":"YYYY-MM, UTC calendar month. Defaults to the current month."},"format":{"type":"string","enum":["json","csv"]}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/delivery_list_projects":{"post":{"operationId":"delivery_list_projects","summary":"List this workspace's PROJECTS (delivery engagements) with name, status, client, dates, and budget. Use for ANY question about projects or engagements — do NOT use the generic records tool for projects.","description":"Scope: `delivery.projects.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"clientId":{"type":"string","description":"Only projects linked to this CRM account."},"status":{"type":"string","enum":["planned","active","paused","launched","completed","cancelled"],"description":"Optional status filter."},"search":{"type":"string","description":"Optional name substring to filter by."},"limit":{"type":"integer","minimum":1,"maximum":200,"description":"Max projects to return (default 50)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/delivery_list_work_items":{"post":{"operationId":"delivery_list_work_items","summary":"List delivery work items/tasks with optional project, client, status, or assignee filters.","description":"Scope: `delivery.work_items.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["todo","in_progress","done","archived"]},"projectId":{"type":"string"},"clientId":{"type":"string"},"contactId":{"type":"string"},"assignedUserId":{"type":"string","description":"Aurora user id or the member's Firebase uid; must be an active member of this workspace."},"limit":{"type":"integer","minimum":1,"maximum":200}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/delivery_list_deliverables":{"post":{"operationId":"delivery_list_deliverables","summary":"List delivery deliverables with optional project, work item, client, or status filters.","description":"Scope: `delivery.deliverables.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["draft","in_review","approved","delivered","archived"]},"projectId":{"type":"string"},"workItemId":{"type":"string"},"clientId":{"type":"string"},"contactId":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":200}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/mywork_list_approvals":{"post":{"operationId":"mywork_list_approvals","summary":"List approval items, optionally filtered by status, assignee, work item, client, or project.","description":"Scope: `work.approvals.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","rejected","cancelled","archived"]},"assignedUserId":{"type":"string","description":"Aurora user id or the member's Firebase uid; must be an active member of this workspace."},"workItemId":{"type":"string"},"clientId":{"type":"string"},"projectId":{"type":"string"},"limit":{"type":"integer"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/mywork_list_work_items":{"post":{"operationId":"mywork_list_work_items","summary":"List work items and tasks for the org. Use filters like status, assignedUserId, clientId, projectId, or limit to answer what is due or assigned.","description":"Scope: `work.items.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["todo","in_progress","done","archived"]},"assignedUserId":{"type":"string","description":"Aurora user id or the member's Firebase uid; must be an active member of this workspace."},"clientId":{"type":"string"},"projectId":{"type":"string"},"contactId":{"type":"string"},"limit":{"type":"integer"},"open":{"type":"boolean","description":"Open tickets plus the ones done today (in `zone`)."},"mine":{"type":"boolean","description":"Only tickets the caller owns or is assigned."},"needsYou":{"type":"boolean","description":"Only tickets with a pending card waiting on a person."},"assignedMemberKey":{"type":"string","description":"Only tickets held by this Amo."},"ownerUserId":{"type":"string","description":"Aurora user id or the member's Firebase uid; must be an active member of this workspace."},"amoRoutineId":{"type":"string","description":"Only occurrences of this routine (lands with migration 0415)."},"dueFrom":{"type":"string","description":"ISO 8601 — due at or after."},"dueTo":{"type":"string","description":"ISO 8601 — due at or before."},"noDue":{"type":"boolean"},"q":{"type":"string","description":"A word in the title or notes."},"type":{"type":"string","description":"The type label (dev, support, social, finance, admin, …)."},"repeat":{"type":"string","enum":["daily","weekdays","weekly:0","weekly:1","weekly:2","weekly:3","weekly:4","weekly:5","weekly:6"]},"sort":{"type":"string","enum":["due"],"description":"Rank by the day, then priority, then title; pages by cursor."},"cursor":{"type":"string"},"zone":{"type":"string","description":"IANA zone the day is read in (default UTC)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_list_posts":{"post":{"operationId":"social_list_posts","summary":"List Social Planner posts, drafts, scheduled posts, and published posts for the org.","description":"Scope: `social.posts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"client_id":{"type":"string","description":"Optional client id filter."},"limit":{"type":"integer"},"scheduled_from":{"type":"string","description":"ISO timestamp; only posts scheduled at or after this."},"scheduled_to":{"type":"string","description":"ISO timestamp; only posts scheduled before this."},"cursor":{"type":"string","description":"The nextCursor from the previous page."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_analytics_overview":{"post":{"operationId":"social_analytics_overview","summary":"Read Social Planner analytics rollups: platform totals, top posts, follower deltas, and best-time windows.","description":"Scope: `social.posts.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"client_id":{"type":"string","description":"Optional client id filter."},"limit":{"type":"integer"},"lookback_days":{"type":"integer"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_draft_post":{"post":{"operationId":"social_draft_post","summary":"Create or update a draft Social Planner post and optional variants. Does not publish.","description":"Scope: `social.drafts.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"post":{"type":"object","description":"Post fields: id, title, master_concept, client_id, status, scheduled_at."},"variants":{"type":"array","items":{"type":"object"},"description":"Optional per-platform variants."},"body":{"type":"string","description":"Convenience post body or master concept."},"platforms":{"type":"array","items":{"type":"string"}},"scheduled_at":{"type":"string"},"expected_updated_at":{"type":"string","description":"Required when post.id identifies an existing post; copy updated_at from the latest Social read."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_publish_post":{"post":{"operationId":"social_publish_post","summary":"The one send verb for a Social post: send it for the owner's approval, now or at its scheduled time. Pass post_id (and variant_ids only when the person named some networks, otherwise every version goes) — when the person says \"send it\", or taps Send for approval on the Post card, make this the FIRST call of that turn, before any other tool. Schedule words go to social_schedule_post before the send. Grow passes a prepared intent_id and fingerprint instead. Outward-facing and irreversible, so it always becomes an owner approval card; nothing is sent until the owner approves.","description":"Scope: `social.publishes.propose` · Risk: R3 · Roles: owner, admin · PROPOSE-ONLY: returns 202 + an owner approval card; approval happens only in the app.","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"post_id":{"type":"string","description":"The post to send, from the Post card or the latest Social read."},"variant_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":20,"description":"Optional: only these versions. Omit to send every version of the post."},"intent_id":{"type":"string","description":"Grow only: from its prepare step, with fingerprint."},"fingerprint":{"type":"string","description":"Grow only: from its prepare step; commits to the exact targets."}}}}}},"responses":{"202":{"description":"Approval card created; an active owner approves in the app"},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_engagement_capabilities_get":{"post":{"operationId":"social_engagement_capabilities_get","summary":"Read connected social accounts and their supported comment and message capabilities.","description":"Scope: `social.conversations.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider_profile_id":{"type":"string"},"social_account_id":{"type":"string"},"network":{"type":"string"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_engagement_threads_list":{"post":{"operationId":"social_engagement_threads_list","summary":"List social comments and message conversations. Attention counts belong to the shared work queue, not personal unread receipts.","description":"Scope: `social.conversations.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string"},"status":{"type":"string","enum":["open","resolved"]},"thread_type":{"type":"string","enum":["comment","message"]},"network":{"type":"string"},"assigned_user_id":{"type":"string"},"mine":{"type":"boolean","description":"Only threads assigned to the caller."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_engagement_thread_get":{"post":{"operationId":"social_engagement_thread_get","summary":"Read the retained messages or comments in a social conversation, newest first, with an older-page cursor.","description":"Scope: `social.conversations.read` · Risk: R0 · Roles: owner, admin, member, viewer","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"thread_id":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string"}},"required":["thread_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_engagement_thread_resolve":{"post":{"operationId":"social_engagement_thread_resolve","summary":"Resolve or reopen a social conversation in the shared work queue. Nothing is sent to its platform.","description":"Scope: `social.conversations.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"thread_id":{"type":"string"},"expected_version":{"type":"integer","minimum":1},"reopen":{"type":"boolean"},"resolution_note":{"type":"string","maxLength":1000}},"required":["thread_id","expected_version"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_engagement_refresh_request":{"post":{"operationId":"social_engagement_refresh_request","summary":"Queue a social comments or messaging refresh, respecting provider cache and backoff. This returns queued, not fresh content.","description":"Scope: `social.conversations.write` · Risk: R1 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider_profile_id":{"type":"string"},"social_account_id":{"type":"string"},"network":{"type":"string"},"surface":{"type":"string","enum":["comments","messages"]}},"required":["provider_profile_id","network","surface"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_engagement_reply_prepare":{"post":{"operationId":"social_engagement_reply_prepare","summary":"Prepare an exact social reply for owner review, optionally with files the network documents for replies. Returns its fingerprint and the card window (up to seven days, never past the platform reply window); nothing is sent.","description":"Scope: `social.conversations.write` · Risk: R2 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"thread_id":{"type":"string"},"item_id":{"type":"string","description":"Required for a comment reply."},"content_body":{"type":"string","maxLength":10000},"media_asset_ids":{"type":"array","items":{"type":"string"},"maxItems":10}},"required":["thread_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/social_engagement_reply_execute":{"post":{"operationId":"social_engagement_reply_execute","summary":"Request owner approval for an exact prepared social reply. The approval expires with its prepared intent; only the approved executor may send.","description":"Scope: `social.conversations.propose` · Risk: R3 · Roles: owner, admin · PROPOSE-ONLY: returns 202 + an owner approval card; approval happens only in the app.","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"intent_id":{"type":"string"},"intent_fingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["intent_id","intent_fingerprint"]}}}},"responses":{"202":{"description":"Approval card created; an active owner approves in the app"},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/legal_list_contracts":{"post":{"operationId":"legal_list_contracts","summary":"List contracts, including status and renewal/expiration dates. Filter server-side by status, free text, the linked project, or the linked client — narrowing here is not the same as narrowing a truncated page afterwards.","description":"Scope: `contracts.contracts.read` · Risk: R0 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Stored lane: draft, active, terminated or archived. Expiring/expired are derived from the dates, not stored."},"search":{"type":"string","description":"Matches contract title, counterparty, contract type, or the linked client's name."},"client_id":{"type":"string","description":"Only contracts linked to this CRM client id (crm_list_clients)."},"project_id":{"type":"string","description":"Only contracts linked to this project id."},"include_archived":{"type":"boolean","description":"Include archived contracts. Default false; asking for status \"archived\" implies it."},"limit":{"type":"integer","description":"Max contracts to return (default 100, max 500)."}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/signing_create_request":{"post":{"operationId":"signing_create_request","summary":"Prepare one exact filled contract for an external signer. Amolfi server-renders and encrypts the legal PDF, mints every request/provider coordinate, and requires the same active owner to review and approve the exact artifact before one execution. Never pass a file/data URL, provider payload, text tag, notification option, metadata, token, URL, request ID, or idempotency key.","description":"Scope: `contracts.signing.propose` · Risk: R3 · Roles: owner, admin · PROPOSE-ONLY: returns 202 + an owner approval card; approval happens only in the app.","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"contract_id":{"type":"string","description":"Exact same-workspace contract UUID."},"library_item_id":{"type":"string","description":"Exact ready content-template UUID used to prepare the filled body."},"title":{"type":"string","description":"Exact owner-reviewable document title."},"signer_name":{"type":"string","description":"Exact external signer name."},"signer_email":{"type":"string","description":"Exact external signer email address."},"message":{"type":"string","description":"Exact message shown to the signer; no server/model default is substituted."},"body_markdown_filled":{"type":"string","description":"Exact fully resolved legal body. It must contain no merge placeholder or signing/text tag; Amolfi appends the only signature tag server-side."}},"required":["contract_id","library_item_id","title","signer_name","signer_email","message","body_markdown_filled"]}}}},"responses":{"202":{"description":"Approval card created; an active owner approves in the app"},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/module_list":{"post":{"operationId":"module_list","summary":"List playbook/module portal modules.","description":"Scope: `playbooks.modules.read` · Risk: R0 · Roles: owner, admin, member, viewer, hire","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"limit":{"type":"integer"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/team_list_members":{"post":{"operationId":"team_list_members","summary":"List canonical team members and roles. Owner/admin system access is required by the existing handler.","description":"Scope: `workspace.team.read` · Risk: R0 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/admin_audit_log_list":{"post":{"operationId":"admin_audit_log_list","summary":"List workspace audit events for owner/admin review.","description":"Scope: `workspace.audit.read` · Risk: R0 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"actionPrefix":{"type":"string"},"principalUid":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"limit":{"type":"integer"},"cursor":{"type":"string"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/admin_webhooks_list":{"post":{"operationId":"admin_webhooks_list","summary":"List registered outbound webhook endpoints. Returns endpoint metadata only, never integration settings or secret material.","description":"Scope: `workspace.webhooks.read` · Risk: R0 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/amo_run_list":{"post":{"operationId":"amo_run_list","summary":"List the workspace's recent durable goal-directed Amo runs. Current work appears first, followed by settled history. Returns narrow public summaries only; use amo_run_get for one full status snapshot.","description":"Scope: `runs.runs.read` · Risk: R0 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/amo_run_get":{"post":{"operationId":"amo_run_get","summary":"Read one Amo run: narrow public status, attributed specialists, recent activity, any pending approval, safe failure, and cost.","description":"Scope: `runs.runs.read` · Risk: R0 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string"}},"required":["run_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/amo_run_start":{"post":{"operationId":"amo_run_start","summary":"Hand Amo a goal in Ask, Auto, or Moonshot working style. Moonshot first parks on an owner-only launch card for its exact one-run envelope; outside that envelope it behaves exactly like Auto. Poll amo_run_get for status.","description":"Scope: `runs.runs.write` · Risk: R2 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"type":"string","description":"The goal in plain words"},"working_style":{"type":"string","enum":["collaborative","autonomous","moonshot"],"description":"How Amo works: collaborative (Ask), autonomous (Auto, default), or moonshot (owner-approved one-run envelope)."},"envelope":{"type":"object","additionalProperties":false,"properties":{"classes":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","additionalProperties":false,"properties":{"tool":{"type":"string","description":"Exact Native Tool name"},"audience":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string"},"description":"Optional exact recipients/audience for this tool class"}},"required":["tool"]}},"crownsCeiling":{"type":"number","minimum":0,"description":"Maximum Crowns this run may spend"},"windowUntil":{"type":"string","description":"ISO-8601 end of the authority window"},"declaredAt":{"type":"string","description":"Ignored on write; replaced by the trusted server declaration time"}},"required":["classes","crownsCeiling","windowUntil"],"description":"Required only for Moonshot. It binds to the one new run and never passes to child runs."},"effort":{"type":"string","enum":["low","normal","high","ultrawork"],"description":"Reasoning effort: low (Fast), normal (default), high, or ultrawork. Never changes approval authority."},"budgets":{"type":"object","description":"Optional costCeilingCents / dryRun / maxReplans"}},"required":["goal"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/amo_run_guidance":{"post":{"operationId":"amo_run_guidance","summary":"Send guidance to a running Amo run at the next safe boundary. Guidance can clarify or narrow scope; it can NEVER approve a decision or widen authority.","description":"Scope: `runs.runs.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string"},"guidance":{"type":"string"}},"required":["run_id","guidance"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/amo_run_cancel":{"post":{"operationId":"amo_run_cancel","summary":"Request a stop at the next safe boundary. Never a rollback: in-flight external work is not undone; pending unexecuted approvals are retired when safe.","description":"Scope: `runs.runs.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"run_id":{"type":"string"},"reason":{"type":"string"}},"required":["run_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_list":{"post":{"operationId":"agent_session_list","summary":"List first-class agent sessions visible to the caller.","description":"Scope: `sessions.sessions.read` · Risk: R0 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"include_archived":{"type":"boolean"},"limit":{"type":"integer"}}}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_get":{"post":{"operationId":"agent_session_get","summary":"Read one agent session.","description":"Scope: `sessions.sessions.read` · Risk: R0 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_events_list":{"post":{"operationId":"agent_session_events_list","summary":"Read session events in ascending sequence pages.","description":"Scope: `sessions.sessions.read` · Risk: R0 · Roles: owner, admin, member","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"},"after_seq":{"type":"string"},"limit":{"type":"integer"},"contract":{"type":"string","enum":["amolfi.local-turn.v1"]},"run_id":{"type":"string"},"context_only":{"type":"boolean"}},"required":["session_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_turn_start":{"post":{"operationId":"agent_session_turn_start","summary":"Start a user-owned turn in a new or existing first-class agent session.","description":"Scope: `sessions.sessions.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"},"message":{"type":"string"},"addressed_member_keys":{"type":"array","items":{"type":"string","maxLength":120},"maxItems":6},"reply_to_run_id":{"type":"string"},"route":{"type":"string","enum":["cloud","local"]},"route_posture":{"type":"string","enum":["local","auto","cloud"]},"working_style":{"type":"string","enum":["ask","auto","moonshot"]},"effort":{"type":"string","enum":["low","medium","high","max"]},"pace":{"type":"string","enum":["economy","standard","fast"]},"effort_mode":{"type":"string","enum":["auto","manual"]},"model_pin":{"type":"string","maxLength":160},"clear_model_pin":{"type":"boolean"},"expected_model_pin":{"type":["string","null"],"maxLength":160},"workload_budget_crowns":{"type":"number","exclusiveMinimum":0,"maximum":1000000,"description":"Owner-only session Crown ceiling. Omit to keep the persisted limit. Existing spend and reservations still count."},"clear_workload_budget":{"type":"boolean","description":"Owner-only explicit removal of this session limit. Other spending limits remain; automatic peer messaging still requires a finite session budget."},"subject_type":{"type":"string","maxLength":80},"subject_id":{"type":"string","maxLength":240},"attachment_envelope_ids":{"type":"array","items":{"type":"string"},"maxItems":12},"turn_request_id":{"type":"string"},"expected_route_posture":{"type":"string","enum":["local","auto","cloud"]},"expected_effort":{"type":"string","enum":["low","medium","high","max"]},"expected_effort_mode":{"type":"string","enum":["auto","manual"]},"route_decision":{"type":"object"},"continue_from_run_id":{"type":"string"},"client_platform":{"type":"string","enum":["macos"]}},"required":["message"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_rename":{"post":{"operationId":"agent_session_rename","summary":"Rename a first-class agent session.","description":"Scope: `sessions.sessions.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"},"title":{"type":"string"}},"required":["session_id","title"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_archive":{"post":{"operationId":"agent_session_archive","summary":"Archive a first-class agent session.","description":"Scope: `sessions.sessions.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"}},"required":["session_id"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_pin":{"post":{"operationId":"agent_session_pin","summary":"Pin a first-class agent session.","description":"Scope: `sessions.sessions.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"},"pinned":{"type":"boolean"}},"required":["session_id","pinned"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_reorder":{"post":{"operationId":"agent_session_reorder","summary":"Place one bucket of the caller's session rail in an explicit order. The list must be the WHOLE bucket — all pinned or all unpinned — and any session in that bucket it does not name goes back to unplaced.","description":"Scope: `sessions.sessions.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}},"required":["session_ids"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_fork":{"post":{"operationId":"agent_session_fork","summary":"Fork a session at an event sequence; both sessions continue independently.","description":"Scope: `sessions.sessions.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"},"seq":{"type":"string"},"title":{"type":"string"}},"required":["session_id","seq"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}},"/v1/tools/agent_session_handoff":{"post":{"operationId":"agent_session_handoff","summary":"Ask to hand one of your sessions to another Amo: mints the owner-settled handoff card (ADR 0090 §5). Nothing moves until the card is approved.","description":"Scope: `sessions.sessions.write` · Risk: R1 · Roles: owner, admin","security":[{"workspaceToken":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string"},"to_member_key":{"type":"string","maxLength":80},"reason":{"type":"string","maxLength":600},"carry":{"type":"string","enum":["thread","summary"]}},"required":["session_id","to_member_key"]}}}},"responses":{"200":{"description":"Typed machine result envelope (valid JSON, complete envelope clamped to 11k characters)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineReadEnvelope"}}}},"400":{"description":"UNKNOWN_FIELD — the body named a field this tool does not declare. Fields are refused by name, never silently ignored."},"401":{"description":"Invalid or expired workspace token"},"403":{"description":"Missing scope or refused by governance"},"409":{"description":"Idempotency conflict"}}}}}}