{"surface":"data","protocol":"mcp","endpoint":"/api/v1/mcp","catalogScope":"platform","tenantFiltered":false,"authoritativeTenantCatalog":"POST /api/v1/mcp — tools/list","count":380,"tools":[{"name":"list_leads","surface":"data","description":"List leads with optional filters and cursor pagination. Returns up to 50 leads by default, max 500; pagination.total is the full match count. For counts use countOnly=true, or groupBy=status|source for per-status / per-source counts over ALL matching leads (never count the page). Use for: dashboard refreshes, lead-list rendering, qualification queues.","entity":"lead","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"status":{"type":"string","enum":["new","contacted","qualifying","qualified","mql","sql","converted","disqualified"]},"source":{"type":"string","enum":["website","referral","campaign","event","outbound","partner","CaptivaHQ","business_card","other"]},"assignedTo":{"type":"string","minLength":1,"maxLength":64},"minScore":{"type":"integer","minimum":0,"maximum":100},"maxScore":{"type":"integer","minimum":0,"maximum":100},"groupBy":{"type":"string","enum":["status","source"]},"countOnly":{"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"First 50 most-recently-updated leads","input":{},"output":{"items":[],"pagination":{"limit":50}}},{"description":"Qualified leads owned by a specific rep","input":{"status":"qualified","assignedTo":"01HZ..."},"output":{"items":[]}}],"related":["get_lead","create_lead","update_lead"],"idempotent":true,"annotations":{"title":"List Leads","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["lead:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["lead:list"]}]}},{"name":"get_lead","surface":"data","description":"Get a single lead by ID. Returns the full lead record including identity fields, qualification status, score, and consent flags. Returns a `not_found` error if the lead doesn't exist or was deleted.","entity":"lead","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a lead by id","input":{"id":"01HZ..."},"output":{"id":"01HZ...","firstName":"Jane"}}],"related":["list_leads","update_lead"],"idempotent":true,"annotations":{"title":"Get Lead","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["lead:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["lead:read"]}]}},{"name":"create_lead","surface":"data","description":"Create a new lead. Identity rule: provide at least one of firstName / lastName / company, AND at least one contact channel (email, phone, or mobile). Defaults: source='other', status='new', score=0 (AI-computed). GDPR: consent flags (consentEmail/consentSms/consentCall) default to false and stamp a timestamp on the off→on transition.","entity":"lead","action":"create","inputSchema":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$"},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["website","referral","campaign","event","outbound","partner","CaptivaHQ","business_card","other"]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["new","contacted","qualifying","qualified","mql","sql","converted","disqualified"]},{"type":"null"}]},"score":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"null"}]},"assignedTo":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"consentEmail":{"type":"boolean"},"consentSms":{"type":"boolean"},"consentCall":{"type":"boolean"},"consentSource":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"salutation":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"mobile":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$"},{"type":"null"}]},"fax":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"rating":{"anyOf":[{"type":"string","enum":["hot","warm","cold"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"industry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"annualRevenue":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999999},{"type":"null"}]},"employeeCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000000},{"type":"null"}]},"addressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"addressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"campaignId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"estimatedValue":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999999},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"expectedCloseDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"externalId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"additionalProperties":false},"examples":[{"description":"Create a qualified inbound lead with email","input":{"firstName":"Jane","lastName":"Doe","email":"jane@example.com","source":"website","status":"qualified","consentEmail":true,"consentSource":"signup_form"},"output":{"id":"01HZ..."}},{"description":"Create a company-only lead with phone (no individual name yet)","input":{"company":"Acme Inc.","phone":"+1 555 0100","source":"outbound"},"output":{"id":"01HZ..."}}],"related":["update_lead","list_leads","get_lead"],"annotations":{"title":"Create Lead","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["lead:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["lead:create"]}]}},{"name":"update_lead","surface":"data","description":"Partial update of a lead. Only fields provided in `input` are changed; omitted fields are left unchanged. Identity rule is re-validated against the merged state. Consent transitions (false→true) stamp the matching timestamp column. Returns the updated lead.","entity":"lead","action":"update","inputSchema":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$"},{"type":"null"}]},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["website","referral","campaign","event","outbound","partner","CaptivaHQ","business_card","other"]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["new","contacted","qualifying","qualified","mql","sql","converted","disqualified"]},{"type":"null"}]},"score":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"null"}]},"assignedTo":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"consentEmail":{"type":"boolean"},"consentSms":{"type":"boolean"},"consentCall":{"type":"boolean"},"consentSource":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"salutation":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"mobile":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$"},{"type":"null"}]},"fax":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"rating":{"anyOf":[{"type":"string","enum":["hot","warm","cold"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"industry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"annualRevenue":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999999},{"type":"null"}]},"employeeCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000000},{"type":"null"}]},"addressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"addressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"campaignId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"estimatedValue":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999999},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"expectedCloseDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"externalId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"referenceNo":{},"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Move a lead from contacted to qualified and boost the score","input":{"id":"01HZ...","status":"qualified","score":75},"output":{"id":"01HZ..."}},{"description":"Record opt-in to email + capture source","input":{"id":"01HZ...","consentEmail":true,"consentSource":"demo_form"},"output":{"id":"01HZ..."}}],"related":["get_lead","list_leads","create_lead"],"idempotent":true,"annotations":{"title":"Update Lead","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["lead:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["lead:update"]}]}},{"name":"delete_lead","surface":"data","description":"Soft-delete a lead. The record is marked deleted_at=NOW() and excluded from list/get responses, but remains in the database for audit purposes (GDPR Art. 17 right-to-erasure is satisfied via the platform-level erasure flow at /admin/clients/:id, not via this tool).","entity":"lead","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a disqualified lead","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_lead","list_leads"],"idempotent":true,"annotations":{"title":"Delete Lead","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["lead:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["lead:delete"]}]}},{"name":"list_accounts","surface":"data","description":"List accounts (companies) with optional filters and cursor pagination. Returns up to 50 accounts by default, max 500. Filter by type (prospect/customer/partner/vendor/competitor/reseller), tier (strategic/enterprise/mid_market/smb/startup), lifecycleStage (lead/prospect/qualified/customer/evangelist/churned), owner, and active flag. pagination.total is the full match count; for 'how many customers' use type=customer with countOnly=true, or groupBy=type for counts per account type over all accounts.","entity":"account","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"type":{"type":"string","enum":["prospect","customer","partner","vendor","competitor","reseller"]},"tier":{"type":"string","enum":["strategic","enterprise","mid_market","smb","startup"]},"lifecycleStage":{"type":"string","enum":["lead","prospect","qualified","customer","evangelist","churned"]},"status":{"type":"string","enum":["active","inactive","do_not_contact","on_hold"]},"ownerUserId":{"type":"string","format":"uuid"},"isActive":{"type":"boolean"},"groupBy":{"type":"string","enum":["type","tier","lifecycle_stage","status"]},"countOnly":{"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Strategic accounts at risk","input":{"tier":"strategic","isActive":true},"output":{"items":[]}},{"description":"Reseller accounts searched by name","input":{"type":"reseller","q":"acme"},"output":{"items":[]}}],"related":["get_account","create_account","list_contacts"],"idempotent":true,"annotations":{"title":"List Accounts","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["account:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["account:list"]}]}},{"name":"get_account","surface":"data","description":"Get a single account with the full detail projection (identity, classification, addresses, financial metrics, AI signals, custom fields, ownership).","entity":"account","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch an account","input":{"id":"01HZ..."},"output":{"id":"01HZ...","name":"Acme"}}],"related":["list_accounts","update_account","list_contacts","list_deals","list_attachments"],"idempotent":true,"annotations":{"title":"Get Account","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["account:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["account:read"]}]}},{"name":"create_account","surface":"data","description":"Create a new account (company). Required: name. ownerUserId defaults to the calling user (required only when calling as an app/service principal). Optional tier values: strategic, enterprise, mid_market, smb, startup. Defaults: accountType='prospect', lifecycleStage='prospect', isActive=true, currency=tenant default (USD if unset). Do NOT set accountType='customer' by hand — the platform promotes an account to 'customer' automatically the moment it gets a won deal, project, work order, contract, or invoice. Optional: domain, website, phone, industry, description, employeeCount, annualRevenue, foundedYear, arr, taxId, vatNumber, tickerSymbol, sicCode, naicsCode, linkedinUrl, twitterUrl, facebookUrl, billingAddress fields, shippingAddress fields, tags (string array for segmentation), customFields (key/value object for tenant-defined properties), isActive, isAtRisk, isRetentionFocus flags, region, parentAccountId, acquisitionChannel.","entity":"account","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"legalName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"fax":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"accountNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"logoShape":{"type":"string","enum":["square","circular","rectangular"]},"logoZoom":{"anyOf":[{"type":"number","minimum":0.5,"maximum":3},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"accountType":{"type":"string","enum":["prospect","customer","partner","vendor","competitor","reseller"]},"industry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"subIndustry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"ownershipType":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"rating":{"anyOf":[{"type":"string","enum":["hot","warm","cold"]},{"type":"null"}]},"lifecycleStage":{"type":"string","enum":["lead","prospect","qualified","customer","evangelist","churned"]},"acquisitionChannel":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","do_not_contact","on_hold"]},"isActive":{"type":"boolean"},"isAtRisk":{"type":"boolean"},"isRetentionFocus":{"type":"boolean"},"tier":{"anyOf":[{"type":"string","enum":["strategic","enterprise","mid_market","smb","startup"]},{"type":"null"}]},"employeeCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"annualRevenue":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"foundedYear":{"anyOf":[{"type":"integer","minimum":1700,"maximum":2200},{"type":"null"}]},"ownerUserId":{"type":"string","format":"uuid"},"parentAccountId":{"type":["string","null"]},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"twitterUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"facebookUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"billingAddressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"billingAddressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"billingCity":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"billingState":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"billingPostalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"billingCountry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shippingSameAsBilling":{"type":"boolean"},"shippingAddressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"shippingAddressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"shippingCity":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shippingState":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shippingPostalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"shippingCountry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"arr":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.99},{"type":"null"}]},"nextRenewalAt":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"npsScore":{"anyOf":[{"type":"integer","minimum":-100,"maximum":100},{"type":"null"}]},"customerSince":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"taxId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"vatNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"healthScore":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"tickerSymbol":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"sicCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"naicsCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"externalId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["name","website","linkedinUrl","twitterUrl","facebookUrl"],"additionalProperties":false},"examples":[{"description":"Create an account (owner defaults to you)","input":{"name":"Acme Inc.","domain":"acme.com","industry":"Manufacturing"},"output":{"id":"01HZ..."}},{"description":"Create a mid-market account for a teammate","input":{"name":"Globex","tier":"mid_market","ownerUserId":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_account","list_accounts"],"annotations":{"title":"Create Account","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["account:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["account:create"]}]}},{"name":"update_account","surface":"data","description":"Partial update of an account. Only provided fields are changed; omitted fields are untouched. Returns the updated account. Can set any field including tags (replaces the array), customFields (merges keys), tickerSymbol, sicCode, naicsCode, isAtRisk, isRetentionFocus, arr, healthScore.","entity":"account","action":"update","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"legalName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"fax":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"accountNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"logoUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"logoShape":{"type":"string","enum":["square","circular","rectangular"]},"logoZoom":{"anyOf":[{"type":"number","minimum":0.5,"maximum":3},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"accountType":{"type":"string","enum":["prospect","customer","partner","vendor","competitor","reseller"]},"industry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"subIndustry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"ownershipType":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"rating":{"anyOf":[{"type":"string","enum":["hot","warm","cold"]},{"type":"null"}]},"lifecycleStage":{"type":"string","enum":["lead","prospect","qualified","customer","evangelist","churned"]},"acquisitionChannel":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive","do_not_contact","on_hold"]},"isActive":{"type":"boolean"},"isAtRisk":{"type":"boolean"},"isRetentionFocus":{"type":"boolean"},"tier":{"anyOf":[{"type":"string","enum":["strategic","enterprise","mid_market","smb","startup"]},{"type":"null"}]},"employeeCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"annualRevenue":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"foundedYear":{"anyOf":[{"type":"integer","minimum":1700,"maximum":2200},{"type":"null"}]},"ownerUserId":{"type":"string","format":"uuid"},"parentAccountId":{"type":["string","null"]},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"twitterUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"facebookUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"billingAddressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"billingAddressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"billingCity":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"billingState":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"billingPostalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"billingCountry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shippingSameAsBilling":{"type":"boolean"},"shippingAddressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"shippingAddressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"shippingCity":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shippingState":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shippingPostalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"shippingCountry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"arr":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.99},{"type":"null"}]},"nextRenewalAt":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"npsScore":{"anyOf":[{"type":"integer","minimum":-100,"maximum":100},{"type":"null"}]},"customerSince":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"taxId":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"vatNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"healthScore":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"tickerSymbol":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"sicCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"naicsCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"externalId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"referenceNo":{},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Upgrade tier and mark at-risk","input":{"id":"01HZ...","tier":"enterprise","isAtRisk":true},"output":{"id":"01HZ..."}}],"related":["get_account","list_accounts"],"idempotent":true,"annotations":{"title":"Update Account","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["account:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["account:update"]}]}},{"name":"delete_account","surface":"data","description":"Soft-delete an account. Excludes from list/get; record retained for audit. Does NOT cascade to contacts/deals — those need to be deleted or reassigned separately.","entity":"account","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete an account","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_account"],"idempotent":true,"annotations":{"title":"Delete Account","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["account:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["account:delete"]}]}},{"name":"list_contacts","surface":"data","description":"List contacts (people associated with accounts). Filter by account_id, role (decision_maker/influencer/champion/economic_buyer/technical_buyer/end_user), and owner. Cursor pagination, max 500/page.","entity":"contact","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"accountId":{"type":"string"},"accountIds":{"type":"string","maxLength":8000},"role":{"type":"string","enum":["decision_maker","influencer","champion","economic_buyer","technical_buyer","end_user","gatekeeper"]},"ownerUserId":{"type":"string","format":"uuid"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"All contacts at a specific account","input":{"accountId":"01HZ..."},"output":{"items":[]}},{"description":"Decision-makers across the workspace","input":{"role":"decision_maker"},"output":{"items":[]}}],"related":["get_contact","create_contact","list_accounts"],"idempotent":true,"annotations":{"title":"List Contacts","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["contact:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contact:list"]}]}},{"name":"get_contact","surface":"data","description":"Get a single contact by ID with full detail (identity, channels, role, preferences).","entity":"contact","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a contact","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_contacts","update_contact","list_attachments"],"idempotent":true,"annotations":{"title":"Get Contact","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["contact:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contact:read"]}]}},{"name":"create_contact","surface":"data","description":"Create a new contact. Identity rule: provide at least one of firstName / lastName. accountId (the company) and email are optional. Optional: title, department, role (decision_maker/economic_buyer/technical_buyer/influencer/champion/end_user/gatekeeper), phone, mobilePhone, homePhone, fax, birthday, mailingAddressLine1, mailingAddressLine2, mailingCity, mailingState, mailingPostalCode, mailingCountry, leadSource, lifecycleStage, buyerPersona, isPrimary, isChampion, portalAccess flags, GDPR consent flags: emailOptOut, doNotCall, smsOptOut, marketingOptIn, tags (string array), customFields (key/value for tenant-defined properties), linkedinUrl, description.","entity":"contact","action":"create","inputSchema":{"type":"object","properties":{"accountId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"salutation":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"middleName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"preferredName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"secondaryEmail":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"mobilePhone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"homePhone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"fax":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"reportsToId":{"type":["string","null"]},"role":{"anyOf":[{"type":"string","enum":["decision_maker","influencer","champion","economic_buyer","technical_buyer","end_user","gatekeeper"]},{"type":"null"}]},"preferredContactMethod":{"anyOf":[{"type":"string","enum":["email","phone","sms","linkedin"]},{"type":"null"}]},"preferredLanguage":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"timeZone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"twitterUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"pictureUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"pictureShape":{"type":"string","enum":["square","circular","rectangular"]},"pictureZoom":{"anyOf":[{"type":"number","minimum":0.5,"maximum":3},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"mailingAddressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"mailingAddressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"mailingCity":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"mailingState":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"mailingPostalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"mailingCountry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"leadSource":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"lifecycleStage":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"buyerPersona":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"isPrimary":{"type":"boolean"},"isChampion":{"type":"boolean"},"portalAccess":{"type":"boolean"},"emailOptOut":{"type":"boolean"},"doNotCall":{"type":"boolean"},"smsOptOut":{"type":"boolean"},"marketingOptIn":{"type":"boolean"},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"bio":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seniority":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"function":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"location":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"decisionMakerScore":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"null"}]},"expertise":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},{"type":"null"}]},"externalId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["linkedinUrl","twitterUrl","pictureUrl"],"additionalProperties":false},"examples":[{"description":"Create a contact","input":{"accountId":"01HZ...","firstName":"Jane","lastName":"Doe","email":"jane@acme.com","role":"champion"},"output":{"id":"01HZ..."}}],"related":["update_contact","list_contacts"],"annotations":{"title":"Create Contact","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["contact:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contact:create"]}]}},{"name":"update_contact","surface":"data","description":"Partial update of a contact. Only provided fields are changed; omitted fields are untouched. The merged record must keep at least one of firstName / lastName; accountId and email may be cleared with null. Can update any field: role, lifecycle, buying flags, GDPR consent, tags, customFields, address fields, etc.","entity":"contact","action":"update","inputSchema":{"type":"object","properties":{"accountId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"salutation":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"middleName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"suffix":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"preferredName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"secondaryEmail":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"mobilePhone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"homePhone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"fax":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"department":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"reportsToId":{"type":["string","null"]},"role":{"anyOf":[{"type":"string","enum":["decision_maker","influencer","champion","economic_buyer","technical_buyer","end_user","gatekeeper"]},{"type":"null"}]},"preferredContactMethod":{"anyOf":[{"type":"string","enum":["email","phone","sms","linkedin"]},{"type":"null"}]},"preferredLanguage":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}]},"timeZone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"twitterUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"pictureUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"pictureShape":{"type":"string","enum":["square","circular","rectangular"]},"pictureZoom":{"anyOf":[{"type":"number","minimum":0.5,"maximum":3},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"mailingAddressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"mailingAddressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"mailingCity":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"mailingState":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"mailingPostalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"mailingCountry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"leadSource":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"lifecycleStage":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"buyerPersona":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"isPrimary":{"type":"boolean"},"isChampion":{"type":"boolean"},"portalAccess":{"type":"boolean"},"emailOptOut":{"type":"boolean"},"doNotCall":{"type":"boolean"},"smsOptOut":{"type":"boolean"},"marketingOptIn":{"type":"boolean"},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"bio":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"seniority":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"function":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"location":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"decisionMakerScore":{"anyOf":[{"type":"integer","minimum":0,"maximum":100},{"type":"null"}]},"expertise":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},{"type":"null"}]},"externalId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"referenceNo":{},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Change role to economic buyer","input":{"id":"01HZ...","role":"economic_buyer"},"output":{"id":"01HZ..."}}],"related":["get_contact"],"idempotent":true,"annotations":{"title":"Update Contact","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["contact:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contact:update"]}]}},{"name":"delete_contact","surface":"data","description":"Soft-delete a contact by ID. The person record is hidden from lists but retained for audit; use anonymisation for GDPR erasure. Returns the deleted record id.","entity":"contact","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a contact","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_contact"],"idempotent":true,"annotations":{"title":"Delete Contact","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["contact:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contact:delete"]}]}},{"name":"list_assets","surface":"data","description":"List Asset Inventory records (equipment, vehicles, IT hardware, intellectual property such as domains/trademarks). Search across tag, serial, name, brand, manufacturer, model. Cursor pagination, max 500/page.","entity":"asset","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"categoryId":{"type":"string","maxLength":200},"statusId":{"type":"string","maxLength":200},"locationId":{"type":"string","maxLength":200},"departmentId":{"type":"string","maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Search assets","input":{"q":"MacBook"},"output":{"items":[]}}],"related":["get_asset","create_asset","update_asset"],"idempotent":true,"annotations":{"title":"List Assets","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["asset:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["asset:list"]}]}},{"name":"get_asset","surface":"data","description":"Get a single asset by ID with full detail (identity, classification, assignment, procurement, vehicle/equipment/IP fields).","entity":"asset","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch an asset","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_assets","update_asset"],"idempotent":true,"annotations":{"title":"Get Asset","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["asset:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["asset:read"]}]}},{"name":"create_asset","surface":"data","description":"Create an Asset Inventory record. Required: assetTag (unique per tenant), name. Optional: serialNumber, brand, manufacturer, modelName, description, categoryId, statusId, modelId, locationId, assignedToEmployeeId, departmentId, purchaseDate, purchaseCost, currency, supplier, invoiceNumber, warrantyExpiresAt, vehicle fields (vin, licensePlate, …), equipment fields (hourMeter, capacity, …), IP fields (jurisdiction, registrationNumber, …) and customFields. Call get_asset meta via the UI/REST /meta for the full field list.","entity":"asset","action":"create","inputSchema":{"type":"object","properties":{"assetTag":{"type":"string","minLength":1,"maxLength":120},"serialNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":300},"brand":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"manufacturer":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"modelName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"countryOfManufacture":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"description":{"type":["string","null"]},"categoryId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"modelId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"assignedToEmployeeId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"usageCount":{"type":["number","null"]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expectedReplacementDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"purchaseDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"purchaseCost":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}]},"vendorId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"supplier":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"invoiceNumber":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"warrantyExpiresAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"warrantyMonths":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"customFields":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"vin":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"licensePlate":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"registrationExpiresAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"odometerReading":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"odometerUnit":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}]},"fuelType":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"insurancePolicyId":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"hourMeter":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"capacity":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"lastInspectedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nextInspectionDue":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"jurisdiction":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"registrationNumber":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"filingDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"grantedDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"expiryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"applicant":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"inventor":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"renewalDue":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"propertyAddress":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]},"propertyAreaSqm":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"propertyUse":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"ownershipType":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"lessor":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"leaseStartDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"leaseEndDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"depreciationMethod":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"usefulLifeMonths":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"salvageValue":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"glAccount":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"costCenter":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"costCenterId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"notes":{"type":["string","null"]},"imageUrl":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["assetTag","name"],"additionalProperties":false},"examples":[{"description":"Register a domain name as an IP asset","input":{"assetTag":"AST-00002","name":"example.com","purchaseCost":1200,"currency":"EUR","jurisdiction":"Global"},"output":{"id":"01HZ..."}}],"related":["update_asset","list_assets"],"annotations":{"title":"Create Asset","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["asset:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["asset:create"]}]}},{"name":"update_asset","surface":"data","description":"Partial update of an asset. Only provided fields change; omitted fields are untouched.","entity":"asset","action":"update","inputSchema":{"type":"object","properties":{"assetTag":{"type":"string","maxLength":120},"serialNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"name":{"type":"string","maxLength":300},"brand":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"manufacturer":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"modelName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"countryOfManufacture":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"description":{"type":["string","null"]},"categoryId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"modelId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"assignedToEmployeeId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"departmentId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"usageCount":{"type":["number","null"]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expectedReplacementDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"purchaseDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"purchaseCost":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}]},"vendorId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"supplier":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"invoiceNumber":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"warrantyExpiresAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"warrantyMonths":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"customFields":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"vin":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"licensePlate":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"registrationExpiresAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"odometerReading":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"odometerUnit":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}]},"fuelType":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"insurancePolicyId":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"hourMeter":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"capacity":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"lastInspectedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nextInspectionDue":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"jurisdiction":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"registrationNumber":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"filingDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"grantedDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"expiryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"applicant":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"inventor":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"renewalDue":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"propertyAddress":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}]},"propertyAreaSqm":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"propertyUse":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"ownershipType":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"lessor":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"leaseStartDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"leaseEndDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"depreciationMethod":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"usefulLifeMonths":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"salvageValue":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"glAccount":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"costCenter":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"costCenterId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"notes":{"type":["string","null"]},"imageUrl":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Update the cost","input":{"id":"01HZ...","purchaseCost":900},"output":{"id":"01HZ..."}}],"related":["get_asset"],"idempotent":true,"annotations":{"title":"Update Asset","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["asset:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["asset:update"]}]}},{"name":"list_locations","surface":"data","description":"List a customer's physical locations (offices, owned properties, service sites). Filter by accountId. Cursor pagination, max 500/page.","entity":"location","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"accountId":{"type":"string"},"accountIds":{"type":"string","maxLength":8000},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"All locations for an account","input":{"accountId":"01HZ..."},"output":{"items":[]}}],"related":["get_location","create_location","list_accounts"],"idempotent":true,"annotations":{"title":"List Locations","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["location:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["location:list"]}]}},{"name":"get_location","surface":"data","description":"Get a single location by ID with full detail (address, type, on-site contact, geo coordinates).","entity":"location","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a location","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_locations","update_location"],"idempotent":true,"annotations":{"title":"Get Location","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["location:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["location:read"]}]}},{"name":"create_location","surface":"data","description":"Create a new location under a customer. Required: accountId, name. Optional: locationType (office/owned_property/service_site/other), isPrimary (at most one primary per customer — setting it unsets any sibling primary), primaryContactId (on-site contact), addressLine1, addressLine2, city, state, postalCode, country, lat, lng, notes, customFields (key/value for tenant-defined properties).","entity":"location","action":"create","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"locationType":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"isPrimary":{"type":"boolean"},"primaryContactId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"addressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"addressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"lat":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"lng":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}}},"required":["accountId","name"],"additionalProperties":false},"examples":[{"description":"Create a primary location","input":{"accountId":"01HZ...","name":"Headquarters","isPrimary":true,"city":"Austin","state":"TX"},"output":{"id":"01HZ..."}}],"related":["update_location","list_locations"],"annotations":{"title":"Create Location","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["location:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["location:create"]}]}},{"name":"update_location","surface":"data","description":"Partial update of a location. Only provided fields are changed; omitted fields are untouched. Setting isPrimary=true unsets any sibling primary on the same customer.","entity":"location","action":"update","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"locationType":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"isPrimary":{"type":"boolean"},"primaryContactId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"addressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"addressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"lat":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"lng":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"referenceNo":{},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Make this the primary location","input":{"id":"01HZ...","isPrimary":true},"output":{"id":"01HZ..."}}],"related":["get_location"],"idempotent":true,"annotations":{"title":"Update Location","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["location:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["location:update"]}]}},{"name":"delete_location","surface":"data","description":"Soft-delete an account location (site) by ID. Hidden from lists and pickers but retained for audit. Returns the deleted record id.","entity":"location","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a location","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_location"],"idempotent":true,"annotations":{"title":"Delete Location","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["location:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["location:delete"]}]}},{"name":"list_deals","surface":"data","description":"List deals (deals in the sales pipeline). Filter by status (open = not won and not lost, regardless of close date; won; lost), account_id, stage, forecast_category (omitted/pipeline/best_case/commit/closed), owner, amount range, and close-date range. Returns up to 50 per page with pagination.total = the full match count. For 'how many' or 'total value' questions use countOnly=true or groupBy=stage|outcome|forecast_category — the result carries groups with counts (and amounts when visible) over ALL matching deals.","entity":"deal","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"accountId":{"type":"string"},"contactId":{"type":"string"},"excludeContactId":{"type":"string"},"leadId":{"type":"string"},"stage":{"type":"string"},"recordTypeId":{"type":"string","maxLength":64},"forecastCategory":{"type":"string","enum":["omitted","pipeline","best_case","commit","closed"]},"ownerUserId":{"type":"string","format":"uuid"},"campaignId":{"type":"string","maxLength":64},"partnerId":{"type":"string","maxLength":64},"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0},"closeAfter":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"closeBefore":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"type":"string","enum":["open","won","lost"]},"groupBy":{"type":"string","enum":["stage","outcome","forecast_category"]},"countOnly":{"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Open deals at a specific account","input":{"accountId":"01HZ..."},"output":{"items":[]}},{"description":"Every open deal (any close date) plus stage breakdown and total value","input":{"status":"open","groupBy":"stage"},"output":{"items":[],"groups":[]}},{"description":"Q4 commits over $50k","input":{"forecastCategory":"commit","minAmount":50000,"closeAfter":"2026-10-01"},"output":{"items":[]}}],"related":["get_deal","create_deal","transition_deal"],"idempotent":true,"annotations":{"title":"List Deals","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["deal:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal:list"]}]}},{"name":"get_deal","surface":"data","description":"Get a single deal by ID with full detail.","entity":"deal","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a deal","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_deals","update_deal","transition_deal","list_attachments"],"idempotent":true,"annotations":{"title":"Get Deal","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["deal:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal:read"]}]}},{"name":"get_deal_loss_lessons","surface":"data","description":"Recorded loss reasons from comparable LOST bids, to flag pitfalls while preparing a deal. Comparable = lost to the same customer, same customer industry in the same pipeline, or similar value (0.5x-2x) in the same pipeline; each lost bid lists matchedOn. Returns lessons (reason, count, dealIds) plus the lostBids behind them and unrecordedCount. Present lessons as what past bids recorded, cite the deals, and do not invent causes beyond the recorded reasons/details.","entity":"deal","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Pitfalls from comparable lost bids before pricing a new bid","input":{"id":"01HZ..."},"output":{"dealId":"01HZ...","lessons":[{"reason":"Price","count":3,"dealIds":["01HA...","01HB...","01HC..."]}],"lostBids":[],"unrecordedCount":1}}],"related":["get_deal","get_win_loss_reasons","transition_deal"],"idempotent":true,"annotations":{"title":"Get Deal Loss Lessons","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["deal:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal:read"]}]}},{"name":"create_deal","surface":"data","description":"Create a new deal. Required: accountId, name, stage, closeDate (YYYY-MM-DD). Money is integer cents + ISO 4217 currency; default forecastCategory='pipeline'; probability defaults to the stage's configured probability when omitted (pass probability to override).","entity":"deal","action":"create","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"accountIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"participantContactIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"primaryContactId":{"type":["string","null"]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"customerNeed":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"proposedSolution":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"dealType":{"type":"string","enum":["new_business","existing_business","renewal","upgrade","downgrade","expansion"]},"leadSource":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"stage":{"type":"string","minLength":1,"maxLength":60},"probability":{"type":"number","minimum":0,"maximum":100},"forecastCategory":{"type":"string","enum":["omitted","pipeline","best_case","commit","closed"]},"closeDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nextStep":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"amount":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"priority":{"anyOf":[{"type":"string","enum":["low","normal","high","urgent"]},{"type":"null"}]},"estimatedHours":{"type":"number","minimum":0,"maximum":9999999999.99},"recordTypeId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"campaignId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"campaignName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"partnerName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"discountPercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"taxPercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"contractLengthMonths":{"anyOf":[{"type":"integer","minimum":0,"maximum":600},{"type":"null"}]},"billingFrequency":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"revenueModel":{"anyOf":[{"type":"string","enum":["one_time","recurring"]},{"type":"null"}]},"contractStartDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"contractEndDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"isRenewal":{"type":"boolean"},"budgetConfirmed":{"type":"boolean"},"authorityIdentified":{"type":"boolean"},"needIdentified":{"type":"boolean"},"timelineConfirmed":{"type":"boolean"},"decisionCriteria":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"decisionProcess":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"championContactId":{"type":["string","null"]},"economicBuyerContactId":{"type":["string","null"]},"vendorIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"ownerIds":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":64}},"commissionRateOverride":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"commissionFixedAmount":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.99},{"type":"null"}]},"competitors":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"threat":{"type":"string","maxLength":20},"threat_level":{"type":"string","maxLength":20}},"required":["name"],"additionalProperties":{}}},"commissionSplits":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"role":{"type":"string","maxLength":40},"percentage":{"type":"number","minimum":0,"maximum":100},"fixedAmount":{"type":"number"},"note":{"type":"string","maxLength":500}},"required":["userId"],"additionalProperties":{}}},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"referenceNo":{"type":"string","minLength":1,"maxLength":120},"externalId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["accountId","name","stage","closeDate"],"additionalProperties":false},"examples":[{"description":"Create a new-business deal in 'qualification' for $50k","input":{"accountId":"01HZ...","name":"Acme Q4 Deal","stage":"qualification","closeDate":"2026-12-31","amount":50000,"currency":"USD","dealType":"new_business"},"output":{"id":"01HZ..."}}],"related":["update_deal","transition_deal"],"annotations":{"title":"Create Deal","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["deal:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal:create"]}]}},{"name":"update_deal","surface":"data","description":"Partial update. Use this for non-stage changes (amount, owner, next step, close date, and the long-text customerNeed / proposedSolution narrative — draft those with suggest_text_rewrite first and confirm with the user). To move stage use `transition_deal` instead — it emits the right webhook events (deal.transitioned, deal.won/lost on terminal stages) and auto-sets forecast_category.","entity":"deal","action":"update","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"accountIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"}},"participantContactIds":{"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"}},"primaryContactId":{"type":["string","null"]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"customerNeed":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"proposedSolution":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"dealType":{"type":"string","enum":["new_business","existing_business","renewal","upgrade","downgrade","expansion"]},"leadSource":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"stage":{"type":"string","minLength":1,"maxLength":60},"probability":{"type":"number","minimum":0,"maximum":100},"forecastCategory":{"type":"string","enum":["omitted","pipeline","best_case","commit","closed"]},"closeDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nextStep":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"amount":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"priority":{"anyOf":[{"type":"string","enum":["low","normal","high","urgent"]},{"type":"null"}]},"estimatedHours":{"type":"number","minimum":0,"maximum":9999999999.99},"recordTypeId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"campaignId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"campaignName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"partnerId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"partnerName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"region":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"discountPercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"taxPercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"contractLengthMonths":{"anyOf":[{"type":"integer","minimum":0,"maximum":600},{"type":"null"}]},"billingFrequency":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"revenueModel":{"anyOf":[{"type":"string","enum":["one_time","recurring"]},{"type":"null"}]},"contractStartDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"contractEndDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"isRenewal":{"type":"boolean"},"budgetConfirmed":{"type":"boolean"},"authorityIdentified":{"type":"boolean"},"needIdentified":{"type":"boolean"},"timelineConfirmed":{"type":"boolean"},"decisionCriteria":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"decisionProcess":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"championContactId":{"type":["string","null"]},"economicBuyerContactId":{"type":["string","null"]},"vendorIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}},"ownerIds":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":64}},"commissionRateOverride":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"commissionFixedAmount":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.99},{"type":"null"}]},"competitors":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"threat":{"type":"string","maxLength":20},"threat_level":{"type":"string","maxLength":20}},"required":["name"],"additionalProperties":{}}},"commissionSplits":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"role":{"type":"string","maxLength":40},"percentage":{"type":"number","minimum":0,"maximum":100},"fixedAmount":{"type":"number"},"note":{"type":"string","maxLength":500}},"required":["userId"],"additionalProperties":{}}},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]},{"maxItems":500,"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}]}},"referenceNo":{"type":"string","minLength":1,"maxLength":120},"externalId":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Bump amount and push close date","input":{"id":"01HZ...","amount":75000,"closeDate":"2027-01-15"},"output":{"id":"01HZ..."}},{"description":"Record the customer need and proposed solution","input":{"id":"01HZ...","customerNeed":"Spare parts reach remote sites in 6+ days…","proposedSolution":"Regional consignment stock plus…"},"output":{"id":"01HZ..."}}],"related":["transition_deal","get_deal","suggest_text_rewrite"],"idempotent":true,"annotations":{"title":"Update Deal","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["deal:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal:update"]}]}},{"name":"transition_deal","surface":"data","description":"Move a deal to a new pipeline stage. Emits webhook events: deal.transitioned (always), deal.won (when stage='closed_won'), deal.lost (when stage='closed_lost'). Auto-sets forecast_category to 'closed' on terminal stages. Use this instead of update_deal for stage changes so downstream integrations get the right events. When moving to a won stage, response includes requiresFulfillment: true and fulfillmentDefaults. Use get_win_loss_reasons to get valid reason values for terminal stages.","entity":"deal","action":"transition","inputSchema":{"type":"object","properties":{"stage":{"type":"string","minLength":1,"maxLength":120},"reason":{"type":"string","maxLength":500},"winLossDetail":{"type":"string","maxLength":2000},"previousStage":{"type":"string","maxLength":120},"probability":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string"},"win_loss_reason":{"type":"string"}},"required":["stage","id"],"additionalProperties":false},"examples":[{"description":"Move to negotiation","input":{"id":"01HZ...","stage":"negotiation"},"output":{"id":"01HZ..."}},{"description":"Close-won with reason","input":{"id":"01HZ...","stage":"closed_won","reason":"PO signed by CFO","win_loss_reason":"Best price"},"output":{"id":"01HZ..."}}],"related":["update_deal","get_deal","get_win_loss_reasons"],"idempotent":true,"annotations":{"title":"Transition Deal","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["deal:transition"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal:transition"]}]}},{"name":"delete_deal","surface":"data","description":"Soft-delete a deal by ID. The deal disappears from pipelines and lists but stays recoverable and audited. Returns the deleted record id.","entity":"deal","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a disqualified deal","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_deal","transition_deal"],"idempotent":true,"annotations":{"title":"Delete Deal","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["deal:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal:delete"]}]}},{"name":"list_pipelines","surface":"data","description":"List the sales pipelines configured for this tenant. Most tenants have one (the default 'Sales Pipeline'). Returns id, name, isDefault, and currency.","entity":"pipeline","action":"list","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"List all pipelines","input":{},"output":{"items":[]}}],"related":["list_pipeline_stages","list_deals"],"idempotent":true,"annotations":{"title":"List Pipelines","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["pipeline:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["pipeline:list"]}]}},{"name":"list_pipeline_stages","surface":"data","description":"List stages for a pipeline including probability, required fields, exit criteria rules, and which stage is the won/lost terminal stage. Call this before transition_deal to know valid stage names.","entity":"pipeline","action":"read","inputSchema":{"type":"object","properties":{"pipeline_id":{"type":"string"}},"required":["pipeline_id"],"additionalProperties":false},"examples":[{"description":"List stages for default pipeline","input":{"pipeline_id":"p1"},"output":{"items":[]}}],"related":["list_pipelines","transition_deal"],"idempotent":true,"annotations":{"title":"List Pipeline Stages","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["pipeline:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["pipeline:read"]}]}},{"name":"get_deal_stage_history","surface":"data","description":"Return the stage transition history for a specific deal — useful for velocity analysis, stuck-deal detection, and understanding deal progression. Results are ordered newest-first and paginated (default 50, max 500); pass `cursor` for the next page.","entity":"deal_stage_history","action":"list","inputSchema":{"type":"object","properties":{"deal_id":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"required":["deal_id"],"additionalProperties":false},"examples":[{"description":"Stage history for a deal","input":{"deal_id":"opp1"},"output":{"items":[]}}],"related":["get_deal","transition_deal"],"idempotent":true,"annotations":{"title":"Get Deal Stage History","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["deal_stage_history:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal_stage_history:list"]}]}},{"name":"get_win_loss_reasons","surface":"data","description":"Return the configured win and loss reason options for this tenant. Call this before transition_deal on terminal (won/lost) stages to know which reason values are valid. Returns empty arrays if not configured (free-text allowed).","entity":"pipeline","action":"read","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"Get configured reasons","input":{},"output":{"winReasons":[],"lossReasons":[]}}],"related":["transition_deal"],"idempotent":true,"annotations":{"title":"Get Win Loss Reasons","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["pipeline:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["pipeline:read"]}]}},{"name":"list_activities","surface":"data","description":"List logged activities (calls, emails, meetings, notes) across the workspace. Filter by type, account, contact, deal, or lead. Returns up to `limit` records plus `total` — use `total` for count answers. To navigate to the full activity log on screen, additionally call open_route with destination=\"activities\".","entity":"activity","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"type":{"type":"string","enum":["call","email","meeting","note","task"]},"contactId":{"type":"string","maxLength":64},"leadId":{"type":"string","maxLength":64},"accountId":{"type":"string","maxLength":64},"dealId":{"type":"string","maxLength":64},"sentiment":{"type":"string","enum":["positive","neutral","negative"]},"dateFrom":{"type":"string","format":"date-time"},"dateTo":{"type":"string","format":"date-time"},"relatedToType":{"type":"string","enum":["project","work_order","ict_provider"]},"relatedToId":{"type":"string","maxLength":64},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Last 5 activities for an account","input":{"accountId":"01HZ...","limit":5,"sort":"-date"},"output":{"items":[]}},{"description":"All calls this week","input":{"type":"call"},"output":{"items":[]}}],"related":["get_activity","create_activity","list_tasks"],"idempotent":true,"annotations":{"title":"List Activities","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["activity:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["activity:list"]}]}},{"name":"get_activity","surface":"data","description":"Get a single activity (call, email, meeting, note) by ID. Returns the full activity record including type, summary, timestamps and the linked record.","entity":"activity","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch an activity","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_activities"],"idempotent":true,"annotations":{"title":"Get Activity","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["activity:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["activity:read"]}]}},{"name":"create_activity","surface":"data","description":"Log an activity (call, email, meeting, note) against a customer, contact, deal, or lead. Required: type, date (ISO datetime), summary. Optional: subject (short title), direction (inbound/outbound — for calls/emails/meetings), ownerUserId (defaults to the calling user). Optionally link to accountId / contactId / dealId / leadId.","entity":"activity","action":"create","inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["call","email","meeting","note","task"]},"contactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"leadId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"dealId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"date":{"type":"string","format":"date-time"},"summary":{"type":"string","minLength":1,"maxLength":20000},"subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"source":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"nextAction":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"durationMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":86400},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"participants":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"email":{"type":"string","maxLength":320,"format":"email"},"name":{"type":"string","maxLength":200},"role":{"type":"string","maxLength":80}},"additionalProperties":{}}},"sentiment":{"anyOf":[{"type":"string","enum":["positive","neutral","negative"]},{"type":"null"}]},"aiSummary":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"direction":{"anyOf":[{"type":"string","enum":["inbound","outbound"]},{"type":"null"}]}},"required":["type","date","summary"],"additionalProperties":false},"examples":[{"description":"Log a call with a customer","input":{"type":"call","date":"2026-06-10T14:00:00Z","summary":"Discussed renewal","accountId":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_activities","create_task"],"idempotent":false,"annotations":{"title":"Create Activity","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["activity:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["activity:create"]}]}},{"name":"update_activity","surface":"data","description":"Update an existing activity's fields (summary, type, occurred-at, linked record). Returns the updated activity record.","entity":"activity","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["call","email","meeting","note","task"]},"contactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"leadId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"dealId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"date":{"type":"string","format":"date-time"},"summary":{"type":"string","minLength":1,"maxLength":20000},"subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"source":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"nextAction":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"durationMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":86400},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"participants":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"email":{"type":"string","maxLength":320,"format":"email"},"name":{"type":"string","maxLength":200},"role":{"type":"string","maxLength":80}},"additionalProperties":{}}},"sentiment":{"anyOf":[{"type":"string","enum":["positive","neutral","negative"]},{"type":"null"}]},"aiSummary":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"direction":{"anyOf":[{"type":"string","enum":["inbound","outbound"]},{"type":"null"}]}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Update the summary of a call","input":{"id":"01HZ...","summary":"Updated notes"},"output":{"id":"01HZ..."}}],"related":["get_activity","create_activity"],"idempotent":true,"annotations":{"title":"Update Activity","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["activity:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["activity:update"]}]}},{"name":"delete_activity","surface":"data","description":"Soft-delete an activity by ID. The record is hidden from lists and timelines but retained for audit. Returns { ok: true }.","entity":"activity","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Delete an activity","input":{"id":"01HZ..."},"output":{"ok":true}}],"related":["list_activities"],"idempotent":false,"annotations":{"title":"Delete Activity","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["activity:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["activity:delete"]}]}},{"name":"list_groups","surface":"data","description":"List permission groups (each holds ACL permissions + a record-visibility scope: all/team/own).","entity":"group","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":120},"ids":{"type":"string","maxLength":8000}},"additionalProperties":false},"examples":[{"description":"All groups","input":{},"output":{"items":[]}}],"related":["create_group"],"idempotent":true,"annotations":{"title":"List Groups","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["group:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["group:list"]}]}},{"name":"create_group","surface":"data","description":"Create a permission group. Optionally start from a preset (admin, sales_rep, finance, …) then refine permissions.","entity":"group","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"recordScope":{"default":"own","type":"string","enum":["all","team","own"]},"permissions":{"default":[],"maxItems":2000,"type":"array","items":{"type":"string","minLength":3,"maxLength":80}},"enabledModules":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"preset":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"financialAccess":{"anyOf":[{"type":"object","properties":{"default":{"type":"boolean"},"modules":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"type":"boolean"}}},"required":["default"],"additionalProperties":false},{"type":"null"}]},"recordScopes":{"default":{},"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":80},"additionalProperties":{"type":"string","enum":["all","team","own"]}},"hiddenModules":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["name"],"additionalProperties":false},"examples":[{"description":"Reps from preset","input":{"name":"Reps","preset":"sales_rep","recordScope":"own"},"output":{"id":"..."}}],"related":["list_groups"],"idempotent":false,"annotations":{"title":"Create Group","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["group:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["group:create"]}]}},{"name":"list_products","surface":"data","description":"List products and services in the workspace catalog, with optional filters and cursor pagination. The `q` filter matches product name or SKU and tolerates partial words and minor spelling differences. Returns up to 50 items per page by default (max 500), newest first unless `sort` is set.","entity":"product","action":"list","inputSchema":{"type":"object","properties":{"q":{"description":"Text to match against product name or SKU.","type":"string","maxLength":200},"category":{"description":"Exact catalog category.","type":"string"},"productType":{"description":"Billing type of the product.","type":"string","enum":["one_time","recurring","usage_based","tiered"]},"kind":{"description":"Catalog item kind: product, service or subscription.","type":"string","enum":["product","service","subscription"]},"pricingModel":{"description":"Pricing model of the item.","type":"string","enum":["one_time","variable","subscription","time_materials","hybrid"]},"active":{"description":"true for active items only, false for inactive only.","type":"boolean"},"limit":{"description":"Page size (1-500, default 50).","default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"description":"Opaque cursor from a previous page's pagination.nextCursor.","type":"string"},"sort":{"description":"Sort field: updated_at, created_at, name, sku or unit_price; prefix with '-' for descending. Default -created_at.","type":"string"}},"additionalProperties":{}},"examples":[{"description":"Find a product by partial name","input":{"q":"accessiq"},"output":{"items":[{"id":"01HZ...","name":"AccessIQ Base Access - 5 users","sku":"ACC-BASE-5"}]}},{"description":"List active services","input":{"kind":"service","active":true},"output":{"items":[],"pagination":{"limit":50}}}],"related":["get_product","get_product_components"],"idempotent":true,"annotations":{"title":"List Products","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["product:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["product:list"]}]}},{"name":"get_product","surface":"data","description":"Get a single product by ID. Returns the full record including price, currency, billing mode, category, and active flag. Returns `not_found` if the product is deleted or doesn't exist.","entity":"product","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a product by id","input":{"id":"01HZ..."},"output":{"id":"01HZ...","name":"AccessIQ Base Access - 5 users"}}],"related":["list_products"],"idempotent":true,"annotations":{"title":"Get Product","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["product:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["product:read"]}]}},{"name":"create_product","surface":"data","description":"Create a catalog item the business sells: a product, service, or subscription. Set `kind` (product|service|subscription) and `pricingModel`: `one_time` (fixed price), `time_materials` (hourly — set unitPrice as the rate, unitLabel='hour', estimatedHours for provided/cap hours), `subscription` (recurring — set billingInterval + subscriptionTermMonths), or `hybrid`. `paymentSchedule` is one-time milestones, e.g. [{label:'Signature',percent:50},{label:'Completion',percent:50}]. `fulfillmentOnWon` lists what happens when a deal containing this item is Won: any of create_project, create_invoice, create_subscription, create_work_order, create_contract, create_support_ticket, create_manufacturing_job. This is the canonical voice/agent path for adding catalog items.","entity":"product","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"sku":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"productType":{"type":"string","enum":["one_time","recurring","usage_based","tiered"]},"kind":{"anyOf":[{"type":"string","enum":["product","service","subscription"]},{"type":"null"}]},"pricingModel":{"anyOf":[{"type":"string","enum":["one_time","variable","subscription","time_materials","hybrid"]},{"type":"null"}]},"unitPrice":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"costPrice":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"unitLabel":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"role":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"taxRatePercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"billingInterval":{"anyOf":[{"type":"string","enum":["monthly","quarterly","annual"]},{"type":"null"}]},"subscriptionTermMonths":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"paymentSchedule":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"percent":{"type":"number","minimum":0,"maximum":100},"trigger":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"due_days_after":{"type":"integer","minimum":0,"maximum":3650},"dueDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":{}}},{"type":"null"}]},"fulfillmentOnWon":{"anyOf":[{"type":"array","items":{"type":"string","enum":["create_project","create_invoice","create_subscription","create_work_order","create_manufacturing_job","create_support_ticket","create_contract"]}},{"type":"null"}]},"wonActionTarget":{"anyOf":[{"type":"string","enum":["none","project","support_ticket","manufacturing_job","work_order","subscription"]},{"type":"null"}]},"prices":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","minLength":3,"maxLength":3},"unit_price":{"type":"number","minimum":0},"unitPrice":{"type":"number","minimum":0}},"required":["currency"],"additionalProperties":{}}},{"type":"null"}]},"autoFx":{"type":"boolean"},"trackInventory":{"type":"boolean"},"quantityOnHand":{"type":["number","null"]},"lowStockThreshold":{"type":["number","null"]},"skuUnit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"weightValue":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.9999},{"type":"null"}]},"weightUnit":{"anyOf":[{"type":"string","enum":["g","kg","oz","lb"]},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"validFrom":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"validTo":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"],"additionalProperties":false},"examples":[{"description":"A Time & Material service that becomes a project when won","input":{"name":"Senior Engineer (T&M)","kind":"service","pricingModel":"time_materials","unitPrice":185,"unitLabel":"hour","estimatedHours":160,"fulfillmentOnWon":["create_project"]},"output":{"id":"01HZ..."}},{"description":"A monthly subscription with a 12-month term","input":{"name":"Platform — Pro","kind":"subscription","pricingModel":"subscription","unitPrice":499,"billingInterval":"monthly","subscriptionTermMonths":12,"fulfillmentOnWon":["create_subscription"]},"output":{"id":"01HZ..."}}],"related":["update_product","list_products"],"annotations":{"title":"Create Product","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["product:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["product:create"]}]}},{"name":"update_product","surface":"data","description":"Partial update of a catalog item — change pricing, switch the pricing model, edit the payment schedule, or reconfigure the on-Won fulfillment actions (fulfillmentOnWon).","entity":"product","action":"update","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"sku":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"productType":{"type":"string","enum":["one_time","recurring","usage_based","tiered"]},"kind":{"anyOf":[{"type":"string","enum":["product","service","subscription"]},{"type":"null"}]},"pricingModel":{"anyOf":[{"type":"string","enum":["one_time","variable","subscription","time_materials","hybrid"]},{"type":"null"}]},"unitPrice":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"costPrice":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"unitLabel":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"role":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"taxRatePercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"billingInterval":{"anyOf":[{"type":"string","enum":["monthly","quarterly","annual"]},{"type":"null"}]},"subscriptionTermMonths":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"estimatedHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"paymentSchedule":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"percent":{"type":"number","minimum":0,"maximum":100},"trigger":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"due_days_after":{"type":"integer","minimum":0,"maximum":3650},"dueDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":{}}},{"type":"null"}]},"fulfillmentOnWon":{"anyOf":[{"type":"array","items":{"type":"string","enum":["create_project","create_invoice","create_subscription","create_work_order","create_manufacturing_job","create_support_ticket","create_contract"]}},{"type":"null"}]},"wonActionTarget":{"anyOf":[{"type":"string","enum":["none","project","support_ticket","manufacturing_job","work_order","subscription"]},{"type":"null"}]},"prices":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","minLength":3,"maxLength":3},"unit_price":{"type":"number","minimum":0},"unitPrice":{"type":"number","minimum":0}},"required":["currency"],"additionalProperties":{}}},{"type":"null"}]},"autoFx":{"type":"boolean"},"trackInventory":{"type":"boolean"},"quantityOnHand":{"type":["number","null"]},"lowStockThreshold":{"type":["number","null"]},"skuUnit":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"weightValue":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.9999},{"type":"null"}]},"weightUnit":{"anyOf":[{"type":"string","enum":["g","kg","oz","lb"]},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"validFrom":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"validTo":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"active":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"referenceNo":{"type":["string","null"]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Make a product also spin up a subscription on Won","input":{"id":"01HZ...","fulfillmentOnWon":["create_invoice","create_subscription"]},"output":{"id":"01HZ..."}}],"related":["create_product","get_product"],"idempotent":true,"annotations":{"title":"Update Product","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["product:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["product:update"]}]}},{"name":"find_tasks","surface":"data","description":"Find tasks on the user's canonical Tasks list — the SAME set the /tasks page shows: tasks assigned to the user, tasks they are a co-assignee on, tasks they created for OTHER people, and the wider team/all set when their record-visibility allows. NOT limited to the user's own assignments — use this for 'the Dr. Martin task', 'what did I hand to Carlos', or 'Carlos's open tasks'. Filters: q (free-text over title + description), assignedTo (a teammate's user id — resolve a spoken name to an id with find_user first), mine=true (only the user's own assignments), watching=true (tasks the user follows or was added to as a VIEWER), lifecycle ('open' | 'closed'). Returns up to 50 matches — narrow with the filters if too broad. To bring a result on screen, call open_record(entity='task', id=<task id>).","entity":"task","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string"},"assignedTo":{"type":"string"},"mine":{"type":"boolean"},"watching":{"type":"boolean"},"lifecycle":{"type":"string","enum":["open","closed"]}},"additionalProperties":false},"examples":[{"description":"Find a task by topic regardless of assignee","input":{"q":"Dr. Martin","lifecycle":"open"},"output":{"items":[]}},{"description":"A teammate's open tasks (id from find_user)","input":{"assignedTo":"01HZ...","lifecycle":"open"},"output":{"items":[]}},{"description":"My own open tasks","input":{"mine":true,"lifecycle":"open"},"output":{"items":[]}}],"related":["create_task","list_tasks"],"idempotent":true,"annotations":{"title":"Find Tasks","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:list"]}]}},{"name":"list_tasks","surface":"data","description":"List LEGACY record-pinned CRM tasks (the crm_tasks store behind the per-record task tabs). Filter by status (open/in_progress/done/cancelled/blocked), priority (low/medium/high/urgent), assignedTo, due-date range, and any of the polymorphic associations (account_id, contact_id, deal_id, lead_id, ticket_id). NOTE: the user-facing Tasks page reads the canonical unified task store — use find_tasks for that.","entity":"task","action":"list","inputSchema":{"type":"object","properties":{"ids":{"type":"string","maxLength":10000},"q":{"type":"string","maxLength":200},"status":{"type":"string","enum":["open","in_progress","done","cancelled","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"assignedTo":{"type":"string"},"relatedToType":{"type":"string"},"relatedToId":{"type":"string"},"dueAfter":{"type":"string"},"dueBefore":{"type":"string"},"mine":{"type":"string","const":"1"},"mineCreated":{"type":"string","const":"1"},"lifecycle":{"type":"string","enum":["open","closed"]},"escalated":{"type":"string","const":"1"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Open tasks pinned to records, due this week","input":{"status":"open","dueBefore":"2026-05-26"},"output":{"items":[]}},{"description":"All tasks for a deal","input":{"dealId":"01HZ..."},"output":{"items":[]}}],"related":["get_task","find_tasks"],"idempotent":true,"annotations":{"title":"List Tasks","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:list"]}]}},{"name":"get_task","surface":"data","description":"Get a single LEGACY record-pinned CRM task (crm_tasks) by ID.","entity":"task","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a task","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_tasks","update_task"],"idempotent":true,"annotations":{"title":"Get Task","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:read"]}]}},{"name":"create_task","surface":"data","description":"Create a task in the canonical Tasks workspace — the same store used by /tasks, My Day, find_tasks, Atlas chat, and Atlas voice. Required: subject. Optionally provide assignedTo (a workspace master-user id resolved with find_user), assignees, dueDate, priority, tags, and relatedToType + relatedToId, plus viewerIds (people who are NOT assignees but want to track the due date — master-user ids from find_user; distinct, never an assignee). Defaults: status='open', priority='normal', assigned to the calling user; OAuth apps default to the active workspace member who created the app. The returned task is immediately discoverable with find_tasks.","entity":"task","action":"create","inputSchema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":300},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"status":{"type":"string","enum":["open","in_progress","done","cancelled","blocked"]},"priority":{"type":"string","enum":["low","normal","medium","high","urgent"]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T.*)?$"},{"type":"null"}]},"assignedTo":{"type":["string","null"]},"assignees":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"assigneeIds":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"relatedToType":{"anyOf":[{"type":"string","enum":["account","contact","deal","lead","ticket","task","unified_task","project","work_order","ict_provider"]},{"type":"null"}]},"relatedToId":{"type":["string","null"]},"boardId":{"type":"string","minLength":1,"maxLength":100},"groupId":{"type":"string","minLength":1,"maxLength":100},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"viewerIds":{"anyOf":[{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_.:@-]+$"}},{"type":"null"}]}},"required":["subject"],"additionalProperties":false},"examples":[{"description":"Create a follow-up in the shared Tasks workspace","input":{"subject":"Follow up with Jane","relatedToType":"lead","relatedToId":"01HZ...","dueDate":"2026-08-06","priority":"high"},"output":{"id":"task_...","subject":"Follow up with Jane"}},{"description":"Assign a task to a teammate","input":{"subject":"Review vibration report","assignedTo":"01HX...","priority":"urgent"},"output":{"id":"task_...","assignedTo":"01HX..."}}],"related":["find_tasks","find_user"],"annotations":{"title":"Create Task","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:create"]}]}},{"name":"update_task","surface":"data","description":"Partial update of a LEGACY record-pinned CRM task (crm_tasks). Common uses: mark done, change priority, reassign, reschedule.","entity":"task","action":"update","inputSchema":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":300},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"status":{"type":"string","enum":["open","in_progress","done","cancelled","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T.*)?$"},{"type":"null"}]},"assignedTo":{"type":["string","null"]},"assigneeIds":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},{"type":"null"}]},"assignees":{"anyOf":[{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},{"type":"null"}]},"assigneeContactId":{"type":["string","null"]},"relatedToType":{"anyOf":[{"type":"string","enum":["account","contact","deal","lead","ticket","task","unified_task","project","work_order","ict_provider"]},{"type":"null"}]},"relatedToId":{"type":["string","null"]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"taskType":{"type":"string","enum":["call","email","todo","meeting"]},"reminderAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Mark a task done","input":{"id":"01HZ...","status":"done"},"output":{"id":"01HZ..."}},{"description":"Reassign and bump priority","input":{"id":"01HZ...","assignedTo":"01HX...","priority":"urgent"},"output":{"id":"01HZ..."}}],"related":["get_task","list_tasks"],"idempotent":true,"annotations":{"title":"Update Task","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}]}},{"name":"delete_task","surface":"data","description":"Soft-delete a LEGACY record-pinned CRM task (crm_tasks). Cancelled legacy tasks should use update_task with status='cancelled' instead — that preserves a record visible in legacy lists.","entity":"task","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a task","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_task","find_tasks"],"idempotent":true,"annotations":{"title":"Delete Task","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:delete"]}]}},{"name":"list_task_viewers","surface":"data","description":"List the VIEWERS of a task — people who are not assignees but track its due date. taskId comes from find_tasks (taskSource='unified', the default) or list_tasks (taskSource='crm').","entity":"task","action":"read","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1},"taskSource":{"default":"unified","type":"string","enum":["unified","crm"]},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"required":["taskId"],"additionalProperties":false},"examples":[{"description":"Who is watching this task's due date?","input":{"taskId":"task_..."},"output":{"items":[]}}],"related":["add_task_viewers","remove_task_viewer","find_tasks"],"idempotent":true,"annotations":{"title":"List Task Viewers","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:read"]}]}},{"name":"add_task_viewers","surface":"data","description":"Add one or more VIEWERS to a task: people who are not assignees but want to track when it is expected to be completed ('keep Maria posted on the Acme rollout task'). Resolve each spoken name to a user id with find_user first. Viewers get read-only access to the task and are notified when its due date changes or it is completed. Ids must be distinct active workspace members and must not be assignees. Already-present viewers are ignored. Requires edit rights on the task.","entity":"task","action":"update","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1},"taskSource":{"default":"unified","type":"string","enum":["unified","crm"]},"userIds":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_.:@-]+$"}}},"required":["taskId","userIds"],"additionalProperties":false},"examples":[{"description":"Add a teammate as a viewer","input":{"taskId":"task_...","userIds":["01HX..."]},"output":{"added":["01HX..."],"removed":[],"viewerCount":1}}],"related":["find_user","find_tasks","list_task_viewers","remove_task_viewer"],"idempotent":true,"annotations":{"title":"Add Task Viewers","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}]}},{"name":"remove_task_viewer","surface":"data","description":"Remove one VIEWER from a task (they lose the read-only access and the due-date/completion pings). Requires edit rights on the task.","entity":"task","action":"update","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1},"taskSource":{"default":"unified","type":"string","enum":["unified","crm"]},"userId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_.:@-]+$"}},"required":["taskId","userId"],"additionalProperties":false},"examples":[{"description":"Stop sharing a task with a viewer","input":{"taskId":"task_...","userId":"01HX..."},"output":{"added":[],"removed":["01HX..."],"viewerCount":0}}],"related":["list_task_viewers","add_task_viewers"],"idempotent":true,"annotations":{"title":"Remove Task Viewer","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}]}},{"name":"list_task_boards","surface":"data","description":"List task boards the caller can access. Returns board IDs, configuration and paginated results. Sharing and task visibility are independent; listing a board does not grant access to every task. Use get_task_board for the current version and list_task_board_items for scoped tasks.","entity":"task","action":"list","inputSchema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":1000},"secondaryCursor":{"type":"string","maxLength":1000},"selection":{"default":"created_or_assigned","type":"string","enum":["all","created","assigned","created_or_assigned"]},"lifecycle":{"default":"all","type":"string","enum":["all","active","closed"]},"sort":{"default":"position","type":"string","enum":["position","due_asc","due_desc","created_desc","created_asc"]}},"additionalProperties":false},"outputSchema":{"type":"object","properties":{"items":{"readOnly":true,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ownerId":{"type":"string"},"config":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sharing":{"default":{"mode":"everyone","users":[],"groups":[]},"type":"object","properties":{"mode":{"default":"everyone","type":"string","enum":["private","everyone","custom"]},"users":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}},"groups":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}}},"required":["mode","users","groups"],"additionalProperties":false},"taskVisibility":{"default":"created_or_assigned","type":"string","enum":["all","assigned","created_or_assigned"]},"memberIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"groups":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["id","label"],"additionalProperties":false}},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["open","in_progress","blocked","done","cancelled"]}},"required":["id","label","status"],"additionalProperties":false}}},"required":["name","sharing","taskVisibility","memberIds","groups","columns"],"additionalProperties":false},"version":{"type":"number"},"isDefault":{"type":"boolean"},"viewerRole":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","ownerId","config","version"],"additionalProperties":false}},"pagination":{}},"required":["items","pagination"],"additionalProperties":false},"examples":[{"description":"Discover accessible boards","input":{"limit":20},"output":{"items":[],"pagination":{"hasMore":false}}},{"description":"Continue a board listing","input":{"limit":20,"cursor":"cursor from nextCursor"},"output":{"items":[],"pagination":{"hasMore":false}}}],"related":["get_task_board","list_task_board_items"],"idempotent":true,"annotations":{"title":"List Task Boards","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:list"]}]}},{"name":"get_task_board","surface":"data","description":"Read one accessible task board's configuration, current version and caller role. Explains its sharing, row visibility, group IDs and column IDs without changing anything. Fetch this before proposing a configuration or move; never infer access from board ownership alone.","entity":"task","action":"read","inputSchema":{"type":"object","properties":{"boardId":{"type":"string","minLength":1,"maxLength":100,"description":"Board ID returned by list_task_boards"}},"required":["boardId"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"ownerId":{"type":"string"},"config":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sharing":{"default":{"mode":"everyone","users":[],"groups":[]},"type":"object","properties":{"mode":{"default":"everyone","type":"string","enum":["private","everyone","custom"]},"users":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}},"groups":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}}},"required":["mode","users","groups"],"additionalProperties":false},"taskVisibility":{"default":"created_or_assigned","type":"string","enum":["all","assigned","created_or_assigned"]},"memberIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"groups":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["id","label"],"additionalProperties":false}},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["open","in_progress","blocked","done","cancelled"]}},"required":["id","label","status"],"additionalProperties":false}}},"required":["name","sharing","taskVisibility","memberIds","groups","columns"],"additionalProperties":false},"version":{"type":"number"},"isDefault":{"type":"boolean"},"viewerRole":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","ownerId","config","version"],"additionalProperties":false},"examples":[{"description":"Inspect Main","input":{"boardId":"board_default"},"output":{"id":"board_default","ownerId":"user_example","config":{"name":"Main","sharing":{"mode":"everyone","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"open","label":"open","status":"open"},{"id":"in_progress","label":"in_progress","status":"in_progress"},{"id":"blocked","label":"blocked","status":"blocked"},{"id":"done","label":"done","status":"done"},{"id":"cancelled","label":"cancelled","status":"cancelled"}]},"version":1,"isDefault":true}},{"description":"Inspect a selected custom board","input":{"boardId":"board_example"},"output":{"id":"board_example","ownerId":"user_example","config":{"name":"Delivery","sharing":{"mode":"private","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]},"version":3}}],"related":["list_task_boards","list_task_board_items","configure_task_board"],"idempotent":true,"annotations":{"title":"Get Task Board","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:read"]}]}},{"name":"list_task_board_items","surface":"data","description":"Read a page of authorized tasks in a board. lifecycle=active returns every open, in-progress or blocked task (follow nextCursor to load them all); lifecycle=closed pages completed and cancelled tasks. counts gives real totals per group and lane for the selection, independent of paging. Personal selection only narrows board access. Canonical items are mutable through approved task operations; secondary CRM/project references in Main are readonly and have independent secondaryCursor pagination, returned on the first all or active page only. Preserve their source IDs and original statuses; never pass secondary references to canonical move tools.","entity":"task","action":"list","inputSchema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":1000},"secondaryCursor":{"type":"string","maxLength":1000},"selection":{"default":"created_or_assigned","type":"string","enum":["all","created","assigned","created_or_assigned"]},"lifecycle":{"default":"all","type":"string","enum":["all","active","closed"]},"sort":{"default":"position","type":"string","enum":["position","due_asc","due_desc","created_desc","created_asc"]},"boardId":{"type":"string","minLength":1,"maxLength":100,"description":"Board ID returned by list_task_boards"}},"required":["boardId"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"board":{"type":"object","properties":{"id":{"type":"string"},"ownerId":{"type":"string"},"config":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sharing":{"default":{"mode":"everyone","users":[],"groups":[]},"type":"object","properties":{"mode":{"default":"everyone","type":"string","enum":["private","everyone","custom"]},"users":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}},"groups":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}}},"required":["mode","users","groups"],"additionalProperties":false},"taskVisibility":{"default":"created_or_assigned","type":"string","enum":["all","assigned","created_or_assigned"]},"memberIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"groups":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["id","label"],"additionalProperties":false}},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["open","in_progress","blocked","done","cancelled"]}},"required":["id","label","status"],"additionalProperties":false}}},"required":["name","sharing","taskVisibility","memberIds","groups","columns"],"additionalProperties":false},"version":{"type":"number"},"isDefault":{"type":"boolean"},"viewerRole":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","ownerId","config","version"],"additionalProperties":false},"items":{"readOnly":true,"type":"array","items":{}},"pagination":{},"counts":{},"secondary":{"type":"object","properties":{"items":{"readOnly":true,"type":"array","items":{}},"pagination":{}},"required":["items","pagination"],"additionalProperties":false}},"required":["board","items","pagination","secondary"],"additionalProperties":false},"examples":[{"description":"My tasks in Main","input":{"boardId":"board_default","selection":"created_or_assigned","limit":20},"output":{"board":{"id":"board_default","ownerId":"user_example","config":{"name":"Main","sharing":{"mode":"everyone","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"open","label":"open","status":"open"},{"id":"in_progress","label":"in_progress","status":"in_progress"},{"id":"blocked","label":"blocked","status":"blocked"},{"id":"done","label":"done","status":"done"},{"id":"cancelled","label":"cancelled","status":"cancelled"}]},"version":1,"isDefault":true},"items":[],"pagination":{"hasMore":false},"secondary":{"items":[],"pagination":{"hasMore":false}}}},{"description":"All rows my board permissions allow","input":{"boardId":"board_example","selection":"all","limit":20},"output":{"board":{"id":"board_example","ownerId":"user_example","config":{"name":"Delivery","sharing":{"mode":"private","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]},"version":1},"items":[],"pagination":{"hasMore":false},"secondary":{"items":[],"pagination":{"hasMore":false}}}}],"related":["get_task_board","find_tasks","move_task_on_board"],"idempotent":true,"annotations":{"title":"List Task Board Items","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:list"]}]}},{"name":"create_task_board","surface":"data","description":"Create a task board after the user approves its configuration and audience. Uses the exact workspace board schema; columns map to supported task lifecycles. This creates a new board and is not automatically retried. A real user principal is required to own the board; OAuth/service identities are rejected, not silently attributed to another person.","entity":"task","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sharing":{"default":{"mode":"everyone","users":[],"groups":[]},"type":"object","properties":{"mode":{"default":"everyone","type":"string","enum":["private","everyone","custom"]},"users":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}},"groups":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}}},"additionalProperties":false},"taskVisibility":{"default":"created_or_assigned","type":"string","enum":["all","assigned","created_or_assigned"]},"memberIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"groups":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["id","label"],"additionalProperties":false}},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["open","in_progress","blocked","done","cancelled"]}},"required":["id","label","status"],"additionalProperties":false}}},"required":["name","groups","columns"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"ownerId":{"type":"string"},"config":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sharing":{"default":{"mode":"everyone","users":[],"groups":[]},"type":"object","properties":{"mode":{"default":"everyone","type":"string","enum":["private","everyone","custom"]},"users":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}},"groups":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}}},"required":["mode","users","groups"],"additionalProperties":false},"taskVisibility":{"default":"created_or_assigned","type":"string","enum":["all","assigned","created_or_assigned"]},"memberIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"groups":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["id","label"],"additionalProperties":false}},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["open","in_progress","blocked","done","cancelled"]}},"required":["id","label","status"],"additionalProperties":false}}},"required":["name","sharing","taskVisibility","memberIds","groups","columns"],"additionalProperties":false},"version":{"type":"number"},"isDefault":{"type":"boolean"},"viewerRole":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","ownerId","config","version"],"additionalProperties":false},"examples":[{"description":"Create a personal delivery board","input":{"name":"Delivery","sharing":{"mode":"private","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]},"output":{"id":"board_new","ownerId":"user_example","config":{"name":"Delivery","sharing":{"mode":"private","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]},"version":0}},{"description":"Create a shared board with personal task visibility","input":{"name":"Team work","sharing":{"mode":"everyone","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]},"output":{"id":"board_new","ownerId":"user_example","config":{"name":"Team work","sharing":{"mode":"everyone","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]},"version":0}}],"related":["list_task_boards","configure_task_board"],"idempotent":false,"annotations":{"title":"Create Task Board","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:create"]}]}},{"name":"configure_task_board","surface":"data","description":"Replace a board configuration only after the user approves the complete proposed sharing, task visibility, groups and columns. Requires board manage rights and the latest version; stale versions fail without applying changes. Fetch the current configuration first and preserve unrelated settings. Main must stay shared with everyone and retain all task lifecycles. Do not automatically retry a conflict.","entity":"task","action":"update","inputSchema":{"type":"object","properties":{"config":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sharing":{"default":{"mode":"everyone","users":[],"groups":[]},"type":"object","properties":{"mode":{"default":"everyone","type":"string","enum":["private","everyone","custom"]},"users":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}},"groups":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}}},"additionalProperties":false},"taskVisibility":{"default":"created_or_assigned","type":"string","enum":["all","assigned","created_or_assigned"]},"memberIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"groups":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["id","label"],"additionalProperties":false}},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["open","in_progress","blocked","done","cancelled"]}},"required":["id","label","status"],"additionalProperties":false}}},"required":["name","groups","columns"],"additionalProperties":false},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"boardId":{"type":"string","minLength":1,"maxLength":100,"description":"Board ID returned by list_task_boards"}},"required":["config","version","boardId"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"ownerId":{"type":"string"},"config":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sharing":{"default":{"mode":"everyone","users":[],"groups":[]},"type":"object","properties":{"mode":{"default":"everyone","type":"string","enum":["private","everyone","custom"]},"users":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}},"groups":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","role"],"additionalProperties":false}}},"required":["mode","users","groups"],"additionalProperties":false},"taskVisibility":{"default":"created_or_assigned","type":"string","enum":["all","assigned","created_or_assigned"]},"memberIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"groups":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["id","label"],"additionalProperties":false}},"columns":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"label":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["open","in_progress","blocked","done","cancelled"]}},"required":["id","label","status"],"additionalProperties":false}}},"required":["name","sharing","taskVisibility","memberIds","groups","columns"],"additionalProperties":false},"version":{"type":"number"},"isDefault":{"type":"boolean"},"viewerRole":{"type":"string","enum":["view","comment","edit","manage"]}},"required":["id","ownerId","config","version"],"additionalProperties":false},"examples":[{"description":"Rename a board while retaining its reviewed settings","input":{"boardId":"board_example","version":2,"config":{"name":"Delivery team","sharing":{"mode":"private","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]}},"output":{"id":"board_example","ownerId":"user_example","config":{"name":"Delivery team","sharing":{"mode":"private","users":[],"groups":[]},"taskVisibility":"created_or_assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]},"version":3}},{"description":"Apply reviewed assigned-only visibility","input":{"boardId":"board_example","version":3,"config":{"name":"Delivery","sharing":{"mode":"private","users":[],"groups":[]},"taskVisibility":"assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]}},"output":{"id":"board_example","ownerId":"user_example","config":{"name":"Delivery","sharing":{"mode":"private","users":[],"groups":[]},"taskVisibility":"assigned","memberIds":[],"groups":[{"id":"work","label":"Work"}],"columns":[{"id":"new","label":"New","status":"open"},{"id":"done","label":"Done","status":"done"}]},"version":4}}],"related":["get_task_board","list_task_boards"],"idempotent":false,"annotations":{"title":"Configure Task Board","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}]}},{"name":"move_task_on_board","surface":"data","description":"Move a canonical task to an approved destination board group and column, optionally before a visible anchor. This can change the task lifecycle and transfer its primary board; it is not a copy. Requires edit and row access on the source and destination, plus the destination's current version. Do not use CRM/project readonly source references or automatically retry a conflict.","entity":"task","action":"update","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1,"maxLength":100},"groupId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"columnId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"},"beforeTaskId":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"boardId":{"type":"string","minLength":1,"maxLength":100,"description":"Board ID returned by list_task_boards"}},"required":["taskId","groupId","columnId","version","boardId"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"ok":{"type":"boolean"},"version":{"type":"number"}},"required":["ok"],"additionalProperties":false},"examples":[{"description":"Move a canonical task into a reviewed column","input":{"boardId":"board_example","taskId":"task_example","groupId":"work","columnId":"done","version":4},"output":{"ok":true,"version":5}},{"description":"Place a task before a visible task","input":{"boardId":"board_example","taskId":"task_example","groupId":"work","columnId":"new","beforeTaskId":"task_anchor","version":5},"output":{"ok":true,"version":6}}],"related":["get_task_board","list_task_board_items","find_tasks"],"idempotent":false,"annotations":{"title":"Move Task On Board","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}]}},{"name":"return_task_to_main_board","surface":"data","description":"Return a canonical task from a custom board to Main after the user approves. Preserves the task record and verifies Main's current sharing and visibility. Requires source edit rights and current source version. Cannot remove tasks from Main or operate on readonly CRM/project references.","entity":"task","action":"update","inputSchema":{"type":"object","properties":{"boardId":{"type":"string","minLength":1,"maxLength":100,"description":"Board ID returned by list_task_boards"},"taskId":{"type":"string","minLength":1,"maxLength":100,"description":"Canonical task ID in the source board"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Current board version returned by get_task_board; refetch after a conflict"}},"required":["boardId","taskId","version"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"ok":{"type":"boolean"},"version":{"type":"number"}},"required":["ok"],"additionalProperties":false},"examples":[{"description":"Return an owned task to Main","input":{"boardId":"board_example","taskId":"task_owned","version":5},"output":{"ok":true,"version":6}},{"description":"Return an assigned task to Main","input":{"boardId":"board_example","taskId":"task_assigned","version":6},"output":{"ok":true,"version":7}}],"related":["get_task_board","move_task_on_board"],"idempotent":false,"annotations":{"title":"Return Task To Main Board","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}]}},{"name":"delete_task_board","surface":"data","description":"Delete an empty custom task board only after explicit user approval. The board owner must have task delete permission and supply the current version. Main and populated boards are rejected; no task records are deleted. Move remaining tasks first and fetch the board again before deleting. This operation is not automatically retried.","entity":"task","action":"delete","inputSchema":{"type":"object","properties":{"boardId":{"type":"string","minLength":1,"maxLength":100,"description":"Board ID returned by list_task_boards"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Current board version returned by get_task_board; refetch after a conflict"}},"required":["boardId","version"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"ok":{"type":"boolean"},"version":{"type":"number"}},"required":["ok"],"additionalProperties":false},"examples":[{"description":"Delete an approved empty personal board","input":{"boardId":"board_empty","version":4},"output":{"ok":true}},{"description":"Delete an approved empty shared board","input":{"boardId":"board_retired","version":8},"output":{"ok":true}}],"related":["get_task_board","move_task_on_board"],"idempotent":false,"annotations":{"title":"Delete Task Board","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:delete"]}]}},{"name":"list_projects","surface":"data","description":"List projects (delivery engagements with budget, status, and billing model). Filter by account, folder, status (planning/active/on_hold/completed/cancelled), healthScore (green/yellow/red), or billingModel.","entity":"project","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"accountId":{"type":"string"},"folderId":{"type":"string"},"ownerId":{"type":"string"},"assignedTo":{"type":"string"},"phase":{"type":"string"},"status":{"type":"string","minLength":1,"maxLength":80},"recordTypeId":{"type":"string","maxLength":64},"healthScore":{"type":"string","enum":["green","yellow","red"]},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"dealId":{"type":"string"},"locationId":{"type":"string"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Active projects in red health","input":{"status":"active","healthScore":"red"},"output":{"items":[]}}],"related":["get_project","create_project"],"idempotent":true,"annotations":{"title":"List Projects","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:list"]}]}},{"name":"get_project","surface":"data","description":"Get a single project by ID with full detail (budget, billing config, dates, health).","entity":"project","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a project","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_projects","update_project","list_attachments"],"idempotent":true,"annotations":{"title":"Get Project","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:read"]}]}},{"name":"create_project","surface":"data","description":"Create a new project. Required: name, startDate (YYYY-MM-DD), endDate, billingModel (fixed_price | time_and_materials | milestone | retainer | subscription | cost_plus | value_based | hybrid_fixed_tm | capped_tm). Optional: folderId, accountId, dealId, primaryContactId, quoteId, ownerId, phase, templateId, budget, currency, description. Defaults: status='planning', healthScore='green', currency=tenant default (USD if unset).","entity":"project","action":"create","inputSchema":{"type":"object","properties":{"folderId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"contractId":{"type":["string","null"]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"assignedTo":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"phase":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"templateId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"dealId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"commercialTermsSnapshotId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"primaryContactId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"contactIds":{"type":"array","items":{"type":"string","minLength":1}},"quoteId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","minLength":1,"maxLength":80},"pipelineId":{"type":"string","minLength":1},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"budget":{"type":"number","minimum":0},"estimatedHours":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"recordTypeId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"healthScore":{"type":"string","enum":["green","yellow","red"]},"timelineHealthOverride":{"anyOf":[{"type":"string","enum":["green","yellow","red"]},{"type":"null"}]},"budgetHealthOverride":{"anyOf":[{"type":"string","enum":["green","yellow","red"]},{"type":"null"}]},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"billingConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{}}},"required":["name","startDate","endDate","billingModel"],"additionalProperties":false},"examples":[{"description":"Fixed-price project for an account","input":{"folderId":"01HZ...","accountId":"01HZ...","name":"Q4 Implementation","startDate":"2026-10-01","endDate":"2026-12-31","budget":75000,"currency":"USD","billingModel":"fixed_price"},"output":{"id":"01HZ..."}}],"related":["update_project","list_projects"],"annotations":{"title":"Create Project","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:create"]}]}},{"name":"update_project","surface":"data","description":"Partial update of a project. Common uses: change status (planning → active → completed), update healthScore based on milestones, adjust budget, push end date.","entity":"project","action":"update","inputSchema":{"type":"object","properties":{"folderId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"contractId":{"type":["string","null"]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"assignedTo":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"phase":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"templateId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"dealId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"commercialTermsSnapshotId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"primaryContactId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"contactIds":{"type":"array","items":{"type":"string","minLength":1}},"quoteId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","minLength":1,"maxLength":80},"pipelineId":{"type":"string","minLength":1},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"budget":{"type":"number","minimum":0},"estimatedHours":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"recordTypeId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"healthScore":{"type":"string","enum":["green","yellow","red"]},"timelineHealthOverride":{"anyOf":[{"type":"string","enum":["green","yellow","red"]},{"type":"null"}]},"budgetHealthOverride":{"anyOf":[{"type":"string","enum":["green","yellow","red"]},{"type":"null"}]},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"billingConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"customFields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{}},"referenceNo":{"type":["string","null"]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Mark project red after slippage","input":{"id":"01HZ...","healthScore":"red"},"output":{"id":"01HZ..."}},{"description":"Close out project","input":{"id":"01HZ...","status":"completed"},"output":{"id":"01HZ..."}}],"related":["get_project"],"idempotent":true,"annotations":{"title":"Update Project","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:update"]}]}},{"name":"delete_project","surface":"data","description":"Soft-delete a project. For cancellation, prefer update_project with status='cancelled' which preserves the record visible in lists.","entity":"project","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a project","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_project"],"idempotent":true,"annotations":{"title":"Delete Project","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:delete"]}]}},{"name":"transition_project","surface":"data","description":"Move a project to another stage of its pipeline, enforcing that stage's EXIT GATES (required fields, exit criteria, approval-to-exit). Provide the project id and the target stage key (toStageKey — read the project /meta or get_project for this tenant's stage keys). Owner/admins may pass force=true to bypass the field/criteria gates (audited in history). If the current stage requires an APPROVAL to exit, the move is PARKED: this returns { ok: false, blocked: 'pending_approval', requestId } — tell the user it needs approval (name the requestId) and that it completes automatically once approved. It does NOT error.","entity":"project","action":"transition","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"toStageKey":{"type":"string","minLength":1},"reason":{"type":"string","maxLength":500},"detail":{"type":"string","maxLength":2000},"force":{"type":"boolean"}},"required":["id","toStageKey"],"additionalProperties":false},"examples":[{"description":"Advance a project to delivery","input":{"id":"01HZ...","toStageKey":"delivery"},"output":{"ok":true,"status":"delivery"}},{"description":"Blocked pending approval","input":{"id":"01HZ...","toStageKey":"closed"},"output":{"ok":false,"blocked":"pending_approval","requestId":"apr_..."}}],"related":["get_project_gates","get_project","list_projects"],"annotations":{"title":"Transition Project","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:transition"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:transition"]}]}},{"name":"get_project_burn","surface":"data","description":"Get the burn read-model for a project — budget, planned vs logged vs approved hours, billable value, cost, budget-consumed %, %-complete, EAC (estimate at completion), ETC, margin, unbilled WIP, and a per-week series. The `view` field names the burn framing that fits the billing model (hours_burndown / budget_burnup / tm_burnup / budget_vs_cost). Use for 'how much budget has the Acme project burned', 'are we over on hours', 'what's the margin on <project>'.","entity":"project","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Burn KPIs for a project","input":{"id":"01HZ..."},"output":{"budget":75000,"loggedHours":120,"margin":12000}}],"related":["get_project","get_project_gates","generate_project_summary"],"idempotent":true,"annotations":{"title":"Get Project Burn","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:read"]}]}},{"name":"get_project_gates","surface":"data","description":"Check whether a project can EXIT its current stage: returns { ok, missingFields, failedCriteria, approval: { required, state, requestId? } }. Call this before transition_project to see what's blocking the move — 'what's needed to advance the Acme project', 'why is the stage locked', 'does moving this project forward need approval'.","entity":"project","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Gate readiness for a project","input":{"id":"01HZ..."},"output":{"ok":false,"missingFields":["close_summary"],"approval":{"required":false,"state":"none"}}}],"related":["transition_project","get_project"],"idempotent":true,"annotations":{"title":"Get Project Gates","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:read"]}]}},{"name":"generate_project_summary","surface":"data","description":"Generate (or return the cached) Atlas AI summary for a project — a narrative plus risks, predictions, nextActions and an overall health rating (green/yellow/red). Pass refresh=true to bypass the 6-hour cache and force a fresh generation. Credit-gated and degrade-never (a budget-exhausted call returns an unavailable summary, never an error). Use for 'summarize the Acme project', 'what are the risks and next steps on <project>'.","entity":"project","action":"summary","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"refresh":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Summarize a project","input":{"id":"01HZ..."},"output":{"health":"yellow","risks":[],"nextActions":[]}}],"related":["get_project","get_project_burn"],"idempotent":true,"annotations":{"title":"Generate Project Summary","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:summary"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:summary"]}]}},{"name":"accrue_project_charges","surface":"data","description":"Roll a project's approved, billable, not-yet-invoiced time (and expenses) into ONE billable CHARGE on the project's account — the T&M accrual the monthly invoice cron later rolls up. This WRITES: it creates a charge and stamps the source rows so they aren't double-billed. ALWAYS run with dryRun=true FIRST (returns the amount + row ids, writes nothing) and confirm with the user before running it for real. Idempotent: already-accrued rows are excluded, so a second real run creates nothing.","entity":"project","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"dryRun":{"type":"boolean"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Preview an accrual (no write)","input":{"id":"01HZ...","dryRun":true},"output":{"chargesCreated":0,"totalAmount":1200,"dryRun":true}},{"description":"Accrue for real","input":{"id":"01HZ..."},"output":{"chargesCreated":1,"totalAmount":1200}}],"related":["get_project_burn","get_project"],"annotations":{"title":"Accrue Project Charges","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:update"]}]}},{"name":"list_milestones","surface":"data","description":"List project milestones (deliverable checkpoints that can trigger billing). Filter by projectId or status (pending/in_progress/completed/cancelled).","entity":"milestone","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"projectId":{"type":"string","maxLength":64},"status":{"type":"string","enum":["pending","in_progress","completed","cancelled"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Open milestones for a project","input":{"projectId":"01HZ...","status":"in_progress"},"output":{"items":[]}}],"related":["get_milestone","create_milestone","list_project_tasks"],"idempotent":true,"annotations":{"title":"List Milestones","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["milestone:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["milestone:list"]}]}},{"name":"get_milestone","surface":"data","description":"Get a single project milestone by ID (due date, deliverables, billing trigger, approval state).","entity":"milestone","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a milestone","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_milestones","update_milestone"],"idempotent":true,"annotations":{"title":"Get Milestone","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["milestone:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["milestone:read"]}]}},{"name":"create_milestone","surface":"data","description":"Create a project milestone. Required: projectId, name, dueDate (YYYY-MM-DD). Optional: description, deliverables[], billingTrigger, billingAmount, approvalRequired, orderIndex, status (pending | in_progress | completed | cancelled).","entity":"milestone","action":"create","inputSchema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64},"phaseId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"deliverables":{"type":"array","items":{"type":"string","maxLength":500}},"billingTrigger":{"type":"boolean"},"billingAmount":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"approvalRequired":{"type":"boolean"},"status":{"type":"string","enum":["pending","in_progress","completed","cancelled"]},"orderIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"ownerUserId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["projectId","name","dueDate"],"additionalProperties":false},"examples":[{"description":"Billing milestone at project mid-point","input":{"projectId":"01HZ...","name":"Phase 1 sign-off","dueDate":"2026-11-15","billingTrigger":true,"billingAmount":25000},"output":{"id":"01HZ..."}}],"related":["update_milestone","list_milestones"],"annotations":{"title":"Create Milestone","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["milestone:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["milestone:create"]}]}},{"name":"update_milestone","surface":"data","description":"Partial update of a milestone. Common uses: mark completed, push dueDate, adjust billingAmount, toggle approvalRequired.","entity":"milestone","action":"update","inputSchema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64},"phaseId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"deliverables":{"type":"array","items":{"type":"string","maxLength":500}},"billingTrigger":{"type":"boolean"},"billingAmount":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"approvalRequired":{"type":"boolean"},"status":{"type":"string","enum":["pending","in_progress","completed","cancelled"]},"orderIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"ownerUserId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"referenceNo":{"type":["string","null"]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Complete a milestone","input":{"id":"01HZ...","status":"completed"},"output":{"id":"01HZ..."}}],"related":["get_milestone"],"idempotent":true,"annotations":{"title":"Update Milestone","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["milestone:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["milestone:update"]}]}},{"name":"delete_milestone","surface":"data","description":"Soft-delete a milestone. To cancel without removing, prefer update_milestone with status='cancelled'.","entity":"milestone","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a milestone","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_milestone"],"idempotent":true,"annotations":{"title":"Delete Milestone","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["milestone:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["milestone:delete"]}]}},{"name":"list_project_tasks","surface":"data","description":"List project tasks (work items under a project, optionally nested under a milestone or parent task). Filter by projectId, milestoneId, assigneeId, status (a tenant-configurable project_task pipeline stage key; defaults are backlog/todo/in_progress/in_review/done/cancelled — read the project_task /meta for this tenant's actual stages) or priority (critical/high/medium/low).","entity":"project_task","action":"list","inputSchema":{"type":"object","properties":{"overdue":{"type":"string","enum":["true","false"]},"q":{"type":"string","maxLength":200},"projectId":{"type":"string","maxLength":64},"milestoneId":{"type":"string","maxLength":64},"phaseId":{"type":"string","maxLength":64},"status":{"type":"string","minLength":1,"maxLength":80},"priority":{"type":"string","enum":["critical","high","medium","low"]},"assigneeId":{"type":"string","maxLength":64},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"In-progress tasks for a project","input":{"projectId":"01HZ...","status":"in_progress"},"output":{"items":[]}}],"related":["get_project_task","create_project_task","list_milestones"],"idempotent":true,"annotations":{"title":"List Project Tasks","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project_task:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:list"]}]}},{"name":"get_project_task","surface":"data","description":"Get a single project task by ID (assignees, status, priority, estimated/actual hours, dependencies).","entity":"project_task","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a project task","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_project_tasks","update_project_task"],"idempotent":true,"annotations":{"title":"Get Project Task","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project_task:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:read"]}]}},{"name":"create_project_task","surface":"data","description":"Create a project task. Required: projectId, title. Optional: milestoneId, parentTaskId, description, assigneeIds[], status (a tenant-configurable project_task pipeline stage key — defaults backlog | todo | in_progress | in_review | done | cancelled; see project_task /meta), priority (critical | high | medium | low), dueDate (YYYY-MM-DD), estimatedHours, actualHours, dependencyIds[], isClientFacing, isInternal, tags[].","entity":"project_task","action":"create","inputSchema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64},"milestoneId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"phaseId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"parentTaskId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"assigneeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"status":{"type":"string","minLength":1,"maxLength":80},"priority":{"type":"string","enum":["critical","high","medium","low"]},"startDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"estimatedHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"actualHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"dependencyIds":{"type":"array","items":{"type":"string"}},"isClientFacing":{"type":"boolean"},"isInternal":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["projectId","title"],"additionalProperties":false},"examples":[{"description":"High-priority task under a milestone","input":{"projectId":"01HZ...","milestoneId":"01HZ...","title":"Wire up SSO","priority":"high","estimatedHours":8},"output":{"id":"01HZ..."}}],"related":["update_project_task","list_project_tasks"],"annotations":{"title":"Create Project Task","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_task:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:create"]}]}},{"name":"update_project_task","surface":"data","description":"Partial update of a project task. Common uses: advance status (e.g. to 'done' to complete it — a project_task pipeline stage key; see list_project_tasks/project_task /meta for the tenant's keys), reassign, log actualHours, change priority, attach to a milestone.","entity":"project_task","action":"update","inputSchema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64},"milestoneId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"phaseId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"parentTaskId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"assigneeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"status":{"type":"string","minLength":1,"maxLength":80},"priority":{"type":"string","enum":["critical","high","medium","low"]},"startDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"estimatedHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"actualHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"dependencyIds":{"type":"array","items":{"type":"string"}},"isClientFacing":{"type":"boolean"},"isInternal":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"referenceNo":{"type":["string","null"]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Move task to review","input":{"id":"01HZ...","status":"in_review"},"output":{"id":"01HZ..."}}],"related":["get_project_task"],"idempotent":true,"annotations":{"title":"Update Project Task","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:update"]}]}},{"name":"delete_project_task","surface":"data","description":"Soft-delete a project task. To cancel without removing, prefer update_project_task with status='cancelled'.","entity":"project_task","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a project task","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_project_task"],"idempotent":true,"annotations":{"title":"Delete Project Task","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_task:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:delete"]}]}},{"name":"list_project_task_viewers","surface":"data","description":"List the VIEWERS of a project task — people who are not assignees but track its due date.","entity":"project_task","action":"read","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"required":["taskId"],"additionalProperties":false},"examples":[{"description":"Who is viewing this project task?","input":{"taskId":"01HZ..."},"output":{"items":[]}}],"related":["add_project_task_viewers","list_project_tasks"],"idempotent":true,"annotations":{"title":"List Project Task Viewers","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project_task:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:read"]}]}},{"name":"add_project_task_viewers","surface":"data","description":"Add VIEWERS to a project task: non-assignees who get read-only access and are notified when the due date changes or it is completed. Resolve names with find_user; ids must be distinct active members and not assignees. Requires edit rights on the task.","entity":"project_task","action":"update","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1},"userIds":{"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_.:@-]+$"}}},"required":["taskId","userIds"],"additionalProperties":false},"examples":[{"description":"Add a viewer","input":{"taskId":"01HZ...","userIds":["01HX..."]},"output":{"added":["01HX..."],"removed":[],"viewerCount":1}}],"related":["find_user","list_project_task_viewers","remove_project_task_viewer"],"idempotent":true,"annotations":{"title":"Add Project Task Viewers","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:update"]}]}},{"name":"remove_project_task_viewer","surface":"data","description":"Remove one VIEWER from a project task. Requires edit rights on the task.","entity":"project_task","action":"update","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1},"userId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_.:@-]+$"}},"required":["taskId","userId"],"additionalProperties":false},"examples":[{"description":"Remove a viewer","input":{"taskId":"01HZ...","userId":"01HX..."},"output":{"added":[],"removed":["01HX..."],"viewerCount":0}}],"related":["list_project_task_viewers"],"idempotent":true,"annotations":{"title":"Remove Project Task Viewer","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:update"]}]}},{"name":"escalate_task","surface":"data","description":"Escalate (or de-escalate) a task. An escalated task shows a red 'Escalating' pill and a red row everywhere it appears, and every assignee plus the creator is notified. Use when the user says 'escalate the Acme onboarding task' or 'this is blocking, flag it'. escalate=false clears the flag ('de-escalate', 'it's under control now'). Optional short reason (≤500 chars). taskId comes from find_tasks (taskSource='unified', the default) or list_tasks (taskSource='crm'). Project tasks use escalate_project_task. Requires edit rights on the task.","entity":"task","action":"update","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1,"maxLength":128},"taskSource":{"default":"unified","type":"string","enum":["unified","crm"]},"escalate":{"default":true,"type":"boolean"},"reason":{"type":"string","maxLength":500}},"required":["taskId"],"additionalProperties":false},"examples":[{"description":"Escalate with a reason","input":{"taskId":"task_...","reason":"Customer go-live at risk"},"output":{"escalated":true,"changed":true}},{"description":"De-escalate","input":{"taskId":"task_...","escalate":false},"output":{"escalated":false,"changed":true}}],"related":["find_tasks","set_task_assignees","escalate_project_task"],"idempotent":true,"annotations":{"title":"Escalate Task","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}]}},{"name":"escalate_project_task","surface":"data","description":"Escalate (or de-escalate with escalate=false) a PROJECT task (taskId from list_project_tasks). Escalated tasks show a red 'Escalating' pill on the project board and list, and every assignee plus the creator is notified. Optional short reason (≤500 chars). Requires edit rights on the task.","entity":"project_task","action":"update","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1,"maxLength":128},"escalate":{"default":true,"type":"boolean"},"reason":{"type":"string","maxLength":500}},"required":["taskId"],"additionalProperties":false},"examples":[{"description":"Escalate a project task","input":{"taskId":"01HZ...","reason":"Vendor slipped two weeks"},"output":{"escalated":true,"changed":true}}],"related":["list_project_tasks","update_project_task","escalate_task"],"idempotent":true,"annotations":{"title":"Escalate Project Task","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_task:update"]}]}},{"name":"set_task_assignees","surface":"data","description":"Replace the full set of assignees on a task. A task can have several assignees. The first id becomes the primary assignee unless the current primary is kept in the set. Resolve every spoken name to a user id with find_user first. 'Assign the launch task to Maria and Carlos' → assigneeIds=[mariaId, carlosId]. To ADD someone, pass the current assignees (from find_tasks) plus the new id. taskSource='unified' (default, find_tasks ids) or 'crm' (list_tasks ids). Every assignee must be an active workspace member and is notified. Project tasks: use update_project_task with assigneeIds.","entity":"task","action":"update","inputSchema":{"type":"object","properties":{"taskId":{"type":"string","minLength":1,"maxLength":128},"taskSource":{"default":"unified","type":"string","enum":["unified","crm"]},"assigneeIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}}},"required":["taskId","assigneeIds"],"additionalProperties":false},"examples":[{"description":"Assign two people","input":{"taskId":"task_...","assigneeIds":["01HX...","01HY..."]},"output":{"id":"task_...","assignees":[]}}],"related":["find_user","find_tasks","escalate_task"],"idempotent":true,"annotations":{"title":"Set Task Assignees","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:update"]}]}},{"name":"list_time_entries","surface":"data","description":"List time entries (hours logged against a project assignment, optionally a task). Filter by assignmentId, userId, billable, approvalStatus (pending/approved/rejected), or a date window (dateFrom/dateTo, YYYY-MM-DD).","entity":"time_entry","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"assignmentId":{"type":"string","maxLength":64},"userId":{"type":"string","maxLength":64},"approvalStatus":{"type":"string","enum":["pending","approved","rejected"]},"billable":{"type":"boolean"},"dateFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dateTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Pending billable time for a user","input":{"userId":"01HZ...","billable":true,"approvalStatus":"pending"},"output":{"items":[]}}],"related":["get_time_entry","create_time_entry","list_assignments"],"idempotent":true,"annotations":{"title":"List Time Entries","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["time_entry:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["time_entry:list"]}]}},{"name":"get_time_entry","surface":"data","description":"Get a single time entry by ID (assignment, user, date, hours, billable flag, approval status).","entity":"time_entry","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a time entry","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_time_entries","update_time_entry"],"idempotent":true,"annotations":{"title":"Get Time Entry","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["time_entry:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["time_entry:read"]}]}},{"name":"create_time_entry","surface":"data","description":"Log a time entry. Required: assignmentId, userId, date (YYYY-MM-DD), hours (0-24). Optional: taskId, billable, description, approvalStatus (pending | approved | rejected), invoiceId.","entity":"time_entry","action":"create","inputSchema":{"type":"object","properties":{"assignmentId":{"type":"string","minLength":1,"maxLength":64},"taskId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"userId":{"type":"string","minLength":1,"maxLength":64},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"hours":{"type":"number","minimum":0,"maximum":24,"multipleOf":0.01},"billable":{"type":"boolean"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"approvalStatus":{"type":"string","enum":["pending","approved","rejected"]},"invoiceId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["assignmentId","userId","date","hours"],"additionalProperties":false},"examples":[{"description":"Log 6.5 billable hours","input":{"assignmentId":"01HZ...","userId":"01HZ...","date":"2026-05-29","hours":6.5,"billable":true,"description":"Discovery workshop"},"output":{"id":"01HZ..."}}],"related":["update_time_entry","list_time_entries"],"annotations":{"title":"Create Time Entry","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["time_entry:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["time_entry:create"]}]}},{"name":"update_time_entry","surface":"data","description":"Partial update of a time entry. Common uses: approve/reject (approvalStatus), correct hours, toggle billable, attach to an invoice.","entity":"time_entry","action":"update","inputSchema":{"type":"object","properties":{"assignmentId":{"type":"string","minLength":1,"maxLength":64},"taskId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"userId":{"type":"string","minLength":1,"maxLength":64},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"hours":{"type":"number","minimum":0,"maximum":24,"multipleOf":0.01},"billable":{"type":"boolean"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"approvalStatus":{"type":"string","enum":["pending","approved","rejected"]},"invoiceId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Approve a time entry","input":{"id":"01HZ...","approvalStatus":"approved"},"output":{"id":"01HZ..."}}],"related":["get_time_entry"],"idempotent":true,"annotations":{"title":"Update Time Entry","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["time_entry:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["time_entry:update"]}]}},{"name":"delete_time_entry","surface":"data","description":"Soft-delete a project time entry by ID. Removes it from timesheets and burn totals but retains it for audit. Returns the deleted record id.","entity":"time_entry","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a time entry","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_time_entry"],"idempotent":true,"annotations":{"title":"Delete Time Entry","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["time_entry:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["time_entry:delete"]}]}},{"name":"list_change_orders","surface":"data","description":"List change orders (formal scope/budget/timeline changes to a project). Filter by projectId, status (draft/pending_approval/approved/rejected/implemented), or changeType (scope/budget/timeline/hours/mixed).","entity":"change_order","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"projectId":{"type":"string","maxLength":64},"status":{"type":"string","enum":["draft","pending_approval","approved","rejected","implemented"]},"changeType":{"type":"string","enum":["scope","budget","timeline","hours","mixed"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Change orders awaiting approval","input":{"projectId":"01HZ...","status":"pending_approval"},"output":{"items":[]}}],"related":["get_change_order","create_change_order"],"idempotent":true,"annotations":{"title":"List Change Orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["change_order:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["change_order:list"]}]}},{"name":"get_change_order","surface":"data","description":"Get a single change order by ID (type, status, budget/hours/days delta, requester).","entity":"change_order","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a change order","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_change_orders","update_change_order"],"idempotent":true,"annotations":{"title":"Get Change Order","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["change_order:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["change_order:read"]}]}},{"name":"create_change_order","surface":"data","description":"Create a change order. Required: projectId, title. Optional: number, description, status (draft | pending_approval | approved | rejected | implemented), changeType (scope | budget | timeline | hours | mixed), budgetDelta, hoursDelta, daysDelta, requestedBy.","entity":"change_order","action":"create","inputSchema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64},"accountId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"contactIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"locationId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"assignedTo":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"number":{"type":"string","minLength":1,"maxLength":50},"title":{"type":"string","minLength":1,"maxLength":300},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"status":{"type":"string","enum":["draft","pending_approval","approved","rejected","implemented"]},"changeType":{"type":"string","enum":["scope","budget","timeline","hours","mixed"]},"budgetDelta":{"type":"number"},"hoursDelta":{"type":"number"},"daysDelta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requestedBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["projectId","title"],"additionalProperties":false},"examples":[{"description":"Scope-expansion change order","input":{"projectId":"01HZ...","title":"Add reporting module","changeType":"scope","budgetDelta":12000,"hoursDelta":80},"output":{"id":"01HZ..."}}],"related":["update_change_order","list_change_orders"],"annotations":{"title":"Create Change Order","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["change_order:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["change_order:create"]}]}},{"name":"update_change_order","surface":"data","description":"Partial update of a change order. Common uses: advance status (draft → pending_approval → approved/rejected → implemented), adjust deltas.","entity":"change_order","action":"update","inputSchema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64},"accountId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"contactIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"locationId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"assignedTo":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"number":{"type":"string","minLength":1,"maxLength":50},"title":{"type":"string","minLength":1,"maxLength":300},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"status":{"type":"string","enum":["draft","pending_approval","approved","rejected","implemented"]},"changeType":{"type":"string","enum":["scope","budget","timeline","hours","mixed"]},"budgetDelta":{"type":"number"},"hoursDelta":{"type":"number"},"daysDelta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requestedBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Approve a change order","input":{"id":"01HZ...","status":"approved"},"output":{"id":"01HZ..."}}],"related":["get_change_order"],"idempotent":true,"annotations":{"title":"Update Change Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["change_order:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["change_order:update"]}]}},{"name":"delete_change_order","surface":"data","description":"Soft-delete a change order. To decline without removing, prefer update_change_order with status='rejected'.","entity":"change_order","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a change order","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_change_order"],"idempotent":true,"annotations":{"title":"Delete Change Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["change_order:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["change_order:delete"]}]}},{"name":"list_project_templates","surface":"data","description":"List project templates (reusable blueprints with default phases, billing model, and estimated hours). Filter by isActive.","entity":"project_template","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"isActive":{"type":"string"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Active templates","input":{"isActive":"true"},"output":{"items":[]}}],"related":["get_project_template","create_project_template","create_project"],"idempotent":true,"annotations":{"title":"List Project Templates","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project_template:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_template:list"]}]}},{"name":"get_project_template","surface":"data","description":"Get a single project template by ID (phases, default phase, billing model, estimated hours, tags).","entity":"project_template","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a project template","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_project_templates","update_project_template"],"idempotent":true,"annotations":{"title":"Get Project Template","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project_template:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_template:read"]}]}},{"name":"create_project_template","surface":"data","description":"Create a project template. Required: name. Optional: description, billingModel (fixed_price | time_and_materials | milestone | retainer | subscription | cost_plus | value_based | hybrid_fixed_tm | capped_tm), defaultPhase, estimatedHours, phases[] ({ id, name, color?, order }), tags[], isActive.","entity":"project_template","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"defaultPhase":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"estimatedHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"phases":{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":200},"key":{"type":"string","minLength":1,"maxLength":80},"color":{"type":"string","maxLength":32},"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offsetDays":{"type":"integer","minimum":0,"maximum":3650},"durationDays":{"type":"integer","minimum":1,"maximum":3650}},"required":["name"],"additionalProperties":false}]}},"taskTemplates":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":10000},"priority":{"type":"string","enum":["critical","high","medium","low"]},"estimatedHours":{"type":"number","minimum":0},"dueInDays":{"type":"integer","minimum":0,"maximum":3650},"startOffsetDays":{"type":"integer","minimum":0,"maximum":3650},"status":{"type":"string","minLength":1,"maxLength":80},"phaseKey":{"type":"string","minLength":1,"maxLength":200},"milestoneRef":{"type":"string","minLength":1,"maxLength":200},"roleKey":{"type":"string","minLength":1,"maxLength":80},"dependsOn":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"isClientFacing":{"type":"boolean"}},"required":["title"],"additionalProperties":false}},"defaultRoles":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"roleKey":{"type":"string","minLength":1,"maxLength":80},"count":{"type":"integer","minimum":1,"maximum":50}},"required":["roleKey"],"additionalProperties":false}},"pipelineId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"isActive":{"type":"boolean"}},"required":["name"],"additionalProperties":false},"examples":[{"description":"Implementation template with two phases","input":{"name":"Standard Implementation","billingModel":"fixed_price","estimatedHours":240,"phases":[{"id":"disc","name":"Discovery","order":0},{"id":"build","name":"Build","order":1}]},"output":{"id":"01HZ..."}}],"related":["update_project_template","list_project_templates"],"annotations":{"title":"Create Project Template","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_template:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_template:create"]}]}},{"name":"update_project_template","surface":"data","description":"Partial update of a project template. Common uses: rename, archive (isActive=false), adjust phases or estimatedHours, change billingModel.","entity":"project_template","action":"update","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"defaultPhase":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"estimatedHours":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"phases":{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":200},"key":{"type":"string","minLength":1,"maxLength":80},"color":{"type":"string","maxLength":32},"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offsetDays":{"type":"integer","minimum":0,"maximum":3650},"durationDays":{"type":"integer","minimum":1,"maximum":3650}},"required":["name"],"additionalProperties":false}]}},"taskTemplates":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":10000},"priority":{"type":"string","enum":["critical","high","medium","low"]},"estimatedHours":{"type":"number","minimum":0},"dueInDays":{"type":"integer","minimum":0,"maximum":3650},"startOffsetDays":{"type":"integer","minimum":0,"maximum":3650},"status":{"type":"string","minLength":1,"maxLength":80},"phaseKey":{"type":"string","minLength":1,"maxLength":200},"milestoneRef":{"type":"string","minLength":1,"maxLength":200},"roleKey":{"type":"string","minLength":1,"maxLength":80},"dependsOn":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"isClientFacing":{"type":"boolean"}},"required":["title"],"additionalProperties":false}},"defaultRoles":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"roleKey":{"type":"string","minLength":1,"maxLength":80},"count":{"type":"integer","minimum":1,"maximum":50}},"required":["roleKey"],"additionalProperties":false}},"pipelineId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"isActive":{"type":"boolean"},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Archive a template","input":{"id":"01HZ...","isActive":false},"output":{"id":"01HZ..."}}],"related":["get_project_template"],"idempotent":true,"annotations":{"title":"Update Project Template","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_template:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_template:update"]}]}},{"name":"delete_project_template","surface":"data","description":"Soft-delete a project template. To retire without removing, prefer update_project_template with isActive=false.","entity":"project_template","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a project template","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_project_template"],"idempotent":true,"annotations":{"title":"Delete Project Template","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project_template:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project_template:delete"]}]}},{"name":"list_assignments","surface":"data","description":"List project assignments (a user staffed on a project at a billable/cost rate and allocation). Filter by projectId, userId, or role.","entity":"assignment","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"projectId":{"type":"string","maxLength":64},"userId":{"type":"string","maxLength":64},"role":{"type":"string","maxLength":120},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Staffing for a project","input":{"projectId":"01HZ..."},"output":{"items":[]}}],"related":["get_assignment","create_assignment","list_time_entries"],"idempotent":true,"annotations":{"title":"List Assignments","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["assignment:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["assignment:list"]}]}},{"name":"get_assignment","surface":"data","description":"Get a single project assignment by ID (user, role, allocation percent, billable and cost rates).","entity":"assignment","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch an assignment","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_assignments","update_assignment"],"idempotent":true,"annotations":{"title":"Get Assignment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["assignment:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["assignment:read"]}]}},{"name":"create_assignment","surface":"data","description":"Staff a user on a project. Required: projectId, userId, role, billableRate, costRate. Optional: allocationPercent (0-100).","entity":"assignment","action":"create","inputSchema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64},"userId":{"type":"string","minLength":1,"maxLength":64},"role":{"type":"string","minLength":1,"maxLength":120},"allocationPercent":{"type":"number","minimum":0,"maximum":100},"billableRate":{"type":"number","minimum":0,"maximum":99999999.99},"costRate":{"type":"number","minimum":0,"maximum":99999999.99}},"required":["projectId","userId","role","billableRate","costRate"],"additionalProperties":false},"examples":[{"description":"Assign a consultant at 50% allocation","input":{"projectId":"01HZ...","userId":"01HZ...","role":"Consultant","allocationPercent":50,"billableRate":180,"costRate":90},"output":{"id":"01HZ..."}}],"related":["update_assignment","list_assignments"],"annotations":{"title":"Create Assignment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["assignment:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["assignment:create"]}]}},{"name":"update_assignment","surface":"data","description":"Partial update of a project assignment. Common uses: change role, adjust allocationPercent, update billableRate or costRate.","entity":"assignment","action":"update","inputSchema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":64},"userId":{"type":"string","minLength":1,"maxLength":64},"role":{"type":"string","minLength":1,"maxLength":120},"allocationPercent":{"type":"number","minimum":0,"maximum":100},"billableRate":{"type":"number","minimum":0,"maximum":99999999.99},"costRate":{"type":"number","minimum":0,"maximum":99999999.99},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Bump allocation to full-time","input":{"id":"01HZ...","allocationPercent":100},"output":{"id":"01HZ..."}}],"related":["get_assignment"],"idempotent":true,"annotations":{"title":"Update Assignment","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["assignment:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["assignment:update"]}]}},{"name":"delete_assignment","surface":"data","description":"Soft-delete a project assignment (unstaff a user from the project).","entity":"assignment","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete an assignment","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_assignment"],"idempotent":true,"annotations":{"title":"Delete Assignment","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["assignment:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["assignment:delete"]}]}},{"name":"list_tickets","surface":"data","description":"List support tickets. Filter by accountId, contactId, assigneeId, status (new/open/pending/on_hold/solved/closed), priority (critical/high/medium/low), or queueId.","entity":"ticket","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"accountId":{"type":"string"},"contactId":{"type":"string"},"locationId":{"type":"string"},"projectId":{"type":"string"},"workOrderId":{"type":"string"},"assetId":{"type":"string"},"assigneeId":{"type":"string"},"requesterId":{"type":"string"},"status":{"type":"string","enum":["new","open","pending","on_hold","solved","closed","reopened"]},"priority":{"type":"string","enum":["critical","high","medium","low"]},"queueId":{"type":"string"},"assignedToMe":{"anyOf":[{"type":"string","const":"true"},{"type":"string","const":"false"},{"type":"boolean"}]},"unassigned":{"anyOf":[{"type":"string","const":"true"},{"type":"string","const":"false"},{"type":"boolean"}]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Critical open tickets assigned to me","input":{"status":"open","priority":"critical","assigneeId":"01HZ..."},"output":{"items":[]}},{"description":"All tickets for an account","input":{"accountId":"01HZ..."},"output":{"items":[]}}],"related":["get_ticket","create_ticket","assign_ticket"],"idempotent":true,"annotations":{"title":"List Tickets","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ticket:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:list"]}]}},{"name":"get_ticket","surface":"data","description":"Get a single ticket by ID with full detail including resolution and SLA association.","entity":"ticket","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a ticket","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_tickets","update_ticket","list_attachments"],"idempotent":true,"annotations":{"title":"Get Ticket","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ticket:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:read"]}]}},{"name":"create_ticket","surface":"data","description":"Create a new support ticket. Required: accountId, contactId, subject, description. Defaults: priority='medium', status='new'. The optional queueId routes to a specific queue; slaId attaches an SLA policy.","entity":"ticket","action":"create","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"contactId":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workOrderId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"commercialTermsSnapshotId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"productId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"subject":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":50000},"priority":{"type":"string","enum":["critical","high","medium","low"]},"status":{"type":"string","enum":["new","open","pending","on_hold","solved","closed","reopened"]},"ticketType":{"anyOf":[{"type":"string","enum":["question","problem","feature_request","incident","task"]},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"channel":{"type":"string","enum":["web","email","phone","chat","api"]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"assigneeId":{"type":["string","null"]},"queueId":{"type":["string","null"]},"slaId":{"type":["string","null"]},"resolution":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"requesterId":{"type":["string","null"]},"clientName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"clientEmail":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"ticketNumber":{"type":["string","null"]}},"required":["subject"],"additionalProperties":false},"examples":[{"description":"Create a high-priority ticket","input":{"accountId":"01HZ...","contactId":"01HX...","subject":"Login broken","description":"Users can't sign in","priority":"high"},"output":{"id":"01HZ..."}}],"related":["assign_ticket","resolve_ticket"],"annotations":{"title":"Create Ticket","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:create"]}]}},{"name":"update_ticket","surface":"data","description":"Partial update of ticket FIELDS — priority bumps, category/subject corrections, tags, links (project / work order / asset). Do NOT use this for status changes: send those to change_ticket_status, which validates the transition, maintains resolved_at and emits ticket.status_changed (a status passed here is routed there anyway and requires ticket:status_change). For assignment specifically use assign_ticket (emits ticket.assigned webhook). For resolution use resolve_ticket (emits ticket.resolved + sets status=solved).","entity":"ticket","action":"update","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"contactId":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workOrderId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"commercialTermsSnapshotId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"productId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"subject":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":50000},"priority":{"type":"string","enum":["critical","high","medium","low"]},"status":{"type":"string","enum":["new","open","pending","on_hold","solved","closed","reopened"]},"ticketType":{"anyOf":[{"type":"string","enum":["question","problem","feature_request","incident","task"]},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"channel":{"type":"string","enum":["web","email","phone","chat","api"]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"assigneeId":{"type":["string","null"]},"queueId":{"type":["string","null"]},"slaId":{"type":["string","null"]},"resolution":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"requesterId":{"type":["string","null"]},"clientName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"clientEmail":{"anyOf":[{"type":"string","maxLength":254,"format":"email"},{"type":"null"}]},"ticketNumber":{"type":["string","null"]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Bump priority","input":{"id":"01HZ...","priority":"critical"},"output":{"id":"01HZ..."}}],"related":["change_ticket_status","assign_ticket","resolve_ticket","get_ticket"],"idempotent":true,"annotations":{"title":"Update Ticket","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:update"]}]}},{"name":"assign_ticket","surface":"data","description":"Assign a ticket to a user. Emits ticket.assigned webhook event. Use this rather than update_ticket so downstream automations (notifications, queue rotation, SLA timers) receive the right event.","entity":"ticket","action":"assign","inputSchema":{"type":"object","properties":{"assigneeId":{"type":["string","null"]},"id":{"type":"string"}},"required":["assigneeId","id"],"additionalProperties":false},"examples":[{"description":"Assign to support engineer","input":{"id":"01HZ...","assigneeId":"01HX..."},"output":{"id":"01HZ..."}}],"related":["update_ticket","resolve_ticket"],"annotations":{"title":"Assign Ticket","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:assign"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:assign"]}]}},{"name":"resolve_ticket","surface":"data","description":"Mark a ticket as resolved with a resolution summary. Sets status='solved' and emits ticket.resolved webhook. The customer-facing close usually follows separately (closed status set after the customer confirms resolution).","entity":"ticket","action":"approve","inputSchema":{"type":"object","properties":{"resolution":{"type":"string","minLength":1,"maxLength":5000},"id":{"type":"string"}},"required":["resolution","id"],"additionalProperties":false},"examples":[{"description":"Resolve with a note","input":{"id":"01HZ...","resolution":"Pushed a fix in v2.4.1; verified by user."},"output":{"id":"01HZ..."}}],"related":["assign_ticket","update_ticket"],"annotations":{"title":"Resolve Ticket","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:approve"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:approve"]}]}},{"name":"delete_ticket","surface":"data","description":"Soft-delete a ticket. Almost always wrong — prefer update_ticket with status='closed' which preserves history. Use delete only for spam/test records.","entity":"ticket","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete spam ticket","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_ticket"],"idempotent":true,"annotations":{"title":"Delete Ticket","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:delete"]}]}},{"name":"change_ticket_status","surface":"data","description":"Change a ticket's status. Validates the transition server-side (closed is terminal; only 'solved' may transition to 'reopened'). Emits ticket.status_changed webhook. Prefer this over update_ticket for any status mutation.","entity":"ticket","action":"status_change","inputSchema":{"type":"object","properties":{"status":{"type":"string","enum":["new","open","pending","on_hold","solved","closed","reopened"]},"reason":{"type":"string","maxLength":2000},"id":{"type":"string"}},"required":["status","id"],"additionalProperties":false},"examples":[{"description":"Put a ticket on hold","input":{"id":"01HZ...","status":"on_hold","reason":"Waiting on vendor"},"output":{"id":"01HZ..."}},{"description":"Reopen a solved ticket","input":{"id":"01HZ...","status":"reopened"},"output":{"id":"01HZ..."}}],"related":["resolve_ticket","reopen_ticket"],"annotations":{"title":"Change Ticket Status","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:status_change"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:status_change"]}]}},{"name":"reopen_ticket","surface":"data","description":"Reopen a ticket the actor originally raised. Only valid when status='solved' (closed is terminal). Emits ticket.reopened webhook.","entity":"ticket","action":"reopen","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Requester reopens their solved ticket","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["change_ticket_status"],"annotations":{"title":"Reopen Ticket","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:reopen"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:reopen"]}]}},{"name":"get_ticket_ai_insights","surface":"data","description":"Read the AI-generated insights payload for a ticket (summary, signals, suggested resolution, similar tickets, relevant articles). Agent-only — requesters lack ticket_ai_insight:read and get 403.","entity":"ticket_ai_insight","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Read insights for a ticket","input":{"id":"01HZ..."},"output":{"ticketId":"01HZ..."}}],"related":["refresh_ticket_ai_insights","get_ticket"],"idempotent":true,"annotations":{"title":"Get Ticket AI Insights","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ticket_ai_insight:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket_ai_insight:read"]}]}},{"name":"refresh_ticket_ai_insights","surface":"data","description":"Force regeneration of AI insights for a ticket. Drops the Redis cache and publishes a refresh signal to the support-insights worker. The returned payload may briefly be the prior version until the worker completes. Agent-only.","entity":"ticket_ai_insight","action":"refresh","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Force a refresh","input":{"id":"01HZ..."},"output":{"ticketId":"01HZ..."}}],"related":["get_ticket_ai_insights"],"annotations":{"title":"Refresh Ticket AI Insights","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket_ai_insight:refresh"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket_ai_insight:refresh"]}]}},{"name":"get_ticket_recommendations","surface":"data","description":"Recommendations for resolving a ticket, from sources the caller can read: knowledge-hub hits and published KB articles, plus similar tickets for the SAME customer (sameClient) and for OTHER customers in this workspace (otherClients) with their resolutions. Includes cached AI-suggested fixes (ai) when generated — no LLM call. Agent-only.","entity":"ticket_ai_insight","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Find known fixes for a ticket","input":{"id":"01HZ..."},"output":{"ticketId":"01HZ...","knowledge":[],"similarTickets":{"sameClient":[],"otherClients":[]},"ai":null}}],"related":["generate_ticket_recommendations","get_ticket_ai_insights","get_ticket"],"idempotent":true,"annotations":{"title":"Get Ticket Recommendations","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ticket_ai_insight:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket_ai_insight:read"]}]}},{"name":"generate_ticket_recommendations","surface":"data","description":"Generate AI-suggested fixes for a ticket: a likely cause, up to three fixes citing the knowledge/similar-ticket sources (S1, S2, …), missing information, a draft reply (never sent) and triage suggestions (priority, type, category, sentiment, tags). One rate-limited LLM call. Applying a triage suggestion is a separate update_ticket call. Agent-only.","entity":"ticket_ai_insight","action":"refresh","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Suggest fixes","input":{"id":"01HZ..."},"output":{"ticketId":"01HZ...","ai":{"summary":"…","suggestedFixes":[]}}}],"related":["get_ticket_recommendations","update_ticket"],"annotations":{"title":"Generate Ticket Recommendations","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket_ai_insight:refresh"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket_ai_insight:refresh"]}]}},{"name":"list_ticket_comments","surface":"data","description":"Read a ticket's comment thread in posting order (oldest first). Visible when the caller can see the ticket (record scope; non-agents only on tickets they raised or are assigned to). Internal notes are returned to agents only.","entity":"ticket_comment","action":"list","inputSchema":{"type":"object","properties":{"ticketId":{"type":"string","minLength":1},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"required":["ticketId"],"additionalProperties":false},"examples":[{"description":"Read the conversation on a ticket","input":{"ticketId":"01HZ..."},"output":{"items":[]}}],"related":["get_ticket","create_ticket_comment"],"idempotent":true,"annotations":{"title":"List Ticket Comments","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ticket_comment:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket_comment:list"]}]}},{"name":"create_ticket_comment","surface":"data","description":"Post a comment on a ticket. isInternal=true posts an internal note (agents only; silently public for non-agents). The caller must be able to see the ticket.","entity":"ticket_comment","action":"create","inputSchema":{"type":"object","properties":{"ticketId":{"type":"string","minLength":1},"body":{"type":"string","minLength":1,"maxLength":50000},"isInternal":{"default":false,"type":"boolean"},"attachments":{"maxItems":20,"type":"array","items":{}}},"required":["ticketId","body"],"additionalProperties":false},"examples":[{"description":"Reply on a ticket","input":{"ticketId":"01HZ...","body":"Replaced the pump seal; monitoring."},"output":{"id":"..."}}],"related":["list_ticket_comments","get_ticket"],"annotations":{"title":"Create Ticket Comment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket_comment:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket_comment:create"]}]}},{"name":"list_calendars","surface":"data","description":"List scheduling calendars (named buckets of events with a per-calendar booking allow-list — e.g. 'Field Service', 'Demo Room', 'On-call'). Filter by free-text q (matches name/description) or kind. Each calendar has its own set of allow-listed users who may be booked as event assignees.","entity":"calendar","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"kind":{"type":"string","maxLength":40},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"All calendars matching 'service'","input":{"q":"service"},"output":{"items":[]}},{"description":"Calendars of a given kind","input":{"kind":"team"},"output":{"items":[]}}],"related":["get_calendar","create_calendar","list_calendar_allowed_users"],"idempotent":true,"annotations":{"title":"List Calendars","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:list"]}]}},{"name":"get_calendar","surface":"data","description":"Get a single calendar by ID with its full detail (name, color, kind, description, notify settings).","entity":"calendar","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a calendar","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_calendars","update_calendar","list_calendar_allowed_users"],"idempotent":true,"annotations":{"title":"Get Calendar","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:read"]}]}},{"name":"create_calendar","surface":"data","description":"Create a new calendar. Required: name. Optional: color (hex/label), description, kind (free-form grouping label e.g. 'team'/'resource'), notifySettings ({ notifyAssigneesOnChange?, dailySummary? }), customFields. After creating, set who can be booked on it with set_calendar_allowed_users.","entity":"calendar","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"color":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kind":{"type":"string","maxLength":40},"notifySettings":{"type":"object","properties":{"notifyAssigneesOnChange":{"type":"boolean"},"dailySummary":{"type":"boolean"},"defaultView":{"type":"string","enum":["calendar","resource_timeline"]},"defaultBoardZoom":{"type":"string","enum":["month","annual","future"]},"manualResources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"color":{"type":"string","maxLength":40}},"required":["id","name"],"additionalProperties":false}},"resourceTimelineOrder":{"maxItems":1100,"type":"array","items":{"type":"string","minLength":1,"maxLength":72}},"appointmentColumns":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"calendarStatusConfig":{"type":"object","properties":{"colorBy":{"default":"resource","type":"string","enum":["resource","status"]},"statuses":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":120},"color":{"type":"string","pattern":"^#[\\da-f]{6}$"},"orderIndex":{"type":"integer","minimum":0,"maximum":1000},"preventNewAppointments":{"default":false,"type":"boolean"}},"required":["key","label","color","orderIndex"],"additionalProperties":false}},"workflowEnabled":{"default":false,"type":"boolean"},"transitions":{"default":[],"maxItems":1000,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64},"to":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["from","to"],"additionalProperties":false}}},"required":["statuses"],"additionalProperties":false},"bookingDisplay":{"type":"object","properties":{"linkedRecords":{"default":[],"maxItems":3,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","enum":["work_order","work_order.project","project"]},"showStatus":{"default":true,"type":"boolean"}},"required":["path"],"additionalProperties":false}},"fields":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["event","work_order","work_order.project","project"]},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["source","key"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"],"additionalProperties":false},"examples":[{"description":"Create a field-service calendar with daily summary on","input":{"name":"Field Service","color":"#6366f1","kind":"team","notifySettings":{"dailySummary":true}},"output":{"id":"01HZ..."}}],"related":["set_calendar_allowed_users","update_calendar","list_calendars"],"annotations":{"title":"Create Calendar","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:create"]}]}},{"name":"update_calendar","surface":"data","description":"Partial update of a calendar. Common uses: rename, recolor, toggle notifySettings.dailySummary or notifyAssigneesOnChange. Does NOT change the booking allow-list — use set_calendar_allowed_users for that.","entity":"calendar","action":"update","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"color":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"kind":{"type":"string","maxLength":40},"notifySettings":{"type":"object","properties":{"notifyAssigneesOnChange":{"type":"boolean"},"dailySummary":{"type":"boolean"},"defaultView":{"type":"string","enum":["calendar","resource_timeline"]},"defaultBoardZoom":{"type":"string","enum":["month","annual","future"]},"manualResources":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"color":{"type":"string","maxLength":40}},"required":["id","name"],"additionalProperties":false}},"resourceTimelineOrder":{"maxItems":1100,"type":"array","items":{"type":"string","minLength":1,"maxLength":72}},"appointmentColumns":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"calendarStatusConfig":{"type":"object","properties":{"colorBy":{"default":"resource","type":"string","enum":["resource","status"]},"statuses":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":120},"color":{"type":"string","pattern":"^#[\\da-f]{6}$"},"orderIndex":{"type":"integer","minimum":0,"maximum":1000},"preventNewAppointments":{"default":false,"type":"boolean"}},"required":["key","label","color","orderIndex"],"additionalProperties":false}},"workflowEnabled":{"default":false,"type":"boolean"},"transitions":{"default":[],"maxItems":1000,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64},"to":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"required":["from","to"],"additionalProperties":false}}},"required":["statuses"],"additionalProperties":false},"bookingDisplay":{"type":"object","properties":{"linkedRecords":{"default":[],"maxItems":3,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","enum":["work_order","work_order.project","project"]},"showStatus":{"default":true,"type":"boolean"}},"required":["path"],"additionalProperties":false}},"fields":{"default":[],"maxItems":12,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["event","work_order","work_order.project","project"]},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"}},"required":["source","key"],"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Turn on daily summary emails","input":{"id":"01HZ...","notifySettings":{"dailySummary":true}},"output":{"id":"01HZ..."}},{"description":"Rename a calendar","input":{"id":"01HZ...","name":"Demo Room A"},"output":{"id":"01HZ..."}}],"related":["get_calendar","set_calendar_allowed_users"],"idempotent":true,"annotations":{"title":"Update Calendar","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:update"]}]}},{"name":"delete_calendar","surface":"data","description":"Soft-delete a calendar. Its events remain in the database but the calendar drops out of lists.","entity":"calendar","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a calendar","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_calendar"],"idempotent":true,"annotations":{"title":"Delete Calendar","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:delete"]}]}},{"name":"set_calendar_allowed_users","surface":"data","description":"Replace the booking allow-list for a calendar with the given set of user IDs. The allow-list is the exhaustive set of users who may be assigned to events on this calendar AND who are scored by get_calendar_availability / suggest_optimal_assignee. Passing an empty array clears the allow-list. This is a full replace, not an append.","entity":"calendar","action":"manage_allowed_users","inputSchema":{"type":"object","properties":{"userIds":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"id":{"type":"string"}},"required":["userIds","id"],"additionalProperties":false},"examples":[{"description":"Allow three technicians to be booked on this calendar","input":{"id":"01HZ...","userIds":["usr_a","usr_b","usr_c"]},"output":["usr_a","usr_b","usr_c"]}],"related":["list_calendar_allowed_users","create_calendar_event"],"idempotent":true,"annotations":{"title":"Set Calendar Allowed Users","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar:manage_allowed_users"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:manage_allowed_users"]}]}},{"name":"list_calendar_allowed_users","surface":"data","description":"List the user IDs currently allowed to be booked on a calendar (the booking allow-list). Use before creating an event to know which assignees are valid.","entity":"calendar","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Who can be booked on this calendar?","input":{"id":"01HZ..."},"output":["usr_a","usr_b"]}],"related":["set_calendar_allowed_users","create_calendar_event"],"idempotent":true,"annotations":{"title":"List Calendar Allowed Users","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:read"]}]}},{"name":"list_calendar_resources","surface":"data","description":"List a calendar's resources — the bookable rows / lanes of its schedule board (e.g. each technician row on a ship or field-service schedule), in board order. Every resource is an employee: returns { id (lane/resource id), label (lane name), employeeId, employeeName, employeeEmail, userId (login, null when the person has no account), color, sortOrder }. Use it to map a lane — or a legacy customFields.manualResourceIds entry, which holds these resource ids — to a person. Events from list_calendar_events / get_calendar_event already carry the resolved names in `people`.","entity":"calendar","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"description":"Calendar id"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Who is each lane on the schedule board?","input":{"id":"97193f7a-..."},"output":[{"id":"res_1","calendarId":"97193f7a-...","employeeId":"emp_1","userId":null,"label":"Mike Torres","color":"#2563eb","sortOrder":1,"employeeName":"Mike Torres","employeeEmail":null}]}],"related":["list_calendar_events","get_calendar_event","list_calendars"],"idempotent":true,"annotations":{"title":"List Calendar Resources","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:read"]}]}},{"name":"list_calendar_events","surface":"data","description":"List calendar events. Filter by calendarId and/or a [from, to] datetime window (ISO 8601, e.g. 2026-06-01T00:00:00Z) — the window matches any event that overlaps it. Use to answer 'what's on the Field Service calendar next week?'. Each event carries `people`: the named technicians / employees booked on it ({ name, employeeId, userId, resourceId, resourceLabel }), resolved from both the assignees and the legacy customFields.manualResourceIds lane ids.","entity":"calendar_event","action":"list","inputSchema":{"type":"object","properties":{"calendarId":{"type":"string","maxLength":64},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"accountId":{"type":"string","maxLength":64},"contactId":{"type":"string","maxLength":64},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Events on a calendar in a date window","input":{"calendarId":"01HZ...","from":"2026-06-01T00:00:00Z","to":"2026-06-08T00:00:00Z"},"output":{"items":[]}}],"related":["get_calendar_event","create_calendar_event","get_calendar_availability","list_calendar_resources"],"idempotent":true,"annotations":{"title":"List Calendar Events","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:list"]}]}},{"name":"get_calendar_event","surface":"data","description":"Get a single calendar event by ID with full detail (times, location, notes, linked entity, assignees). `people` names everyone booked on it ({ name, employeeId, userId, resourceId, resourceLabel }).","entity":"calendar_event","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch an event","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_calendar_events","update_calendar_event","list_calendar_resources","list_attachments"],"idempotent":true,"annotations":{"title":"Get Calendar Event","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:read"]}]}},{"name":"create_calendar_event","surface":"data","description":"Create a calendar event. Required: calendarId, title, startsAt, endsAt (ISO 8601 datetimes). Optional: allDay, location, notes, linkedEntityType/linkedEntityId (e.g. link to an account or service order), assigneeIds, customFields, inviteeEmails. inviteeEmails (array of email addresses, max 50) are external invitees: on the best-effort outbound push they become attendees so the connected provider (Google/Microsoft/Exchange) EMAILS each an invite. IMPORTANT: every userId in assigneeIds MUST be in the calendar's booking allow-list — if any isn't, the create is rejected. Check list_calendar_allowed_users first if unsure. HONEST CONFIRMATION: a successful result (a returned event with an id) means the event was created and PERSISTED in CaptivaHQ — it will show on the user's in-app calendar. It does NOT prove a copy was pushed to a connected Google/Microsoft calendar: that outbound sync is best-effort and happens asynchronously only when the user has a calendar connected with outbound/bidirectional sync. So confirm as 'I've added it to your CaptivaHQ calendar' — do NOT claim 'I sent a Google/Outlook invite' unless the user has told you their external calendar is connected. If this tool returns an ERROR, the event was NOT created — say so plainly; never report success on an error.","entity":"calendar_event","action":"create","inputSchema":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string","minLength":1,"maxLength":300},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"linkedEntityType":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"linkedEntityId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"assigneeIds":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"inviteeEmails":{"maxItems":50,"type":"array","items":{"type":"string","format":"email"}},"autoSchedule":{"type":"boolean"}},"required":["calendarId","title","startsAt","endsAt"],"additionalProperties":false},"examples":[{"description":"Book a site visit for two allow-listed technicians","input":{"calendarId":"01HZ...","title":"Site visit — Acme HQ","startsAt":"2026-06-03T09:00:00Z","endsAt":"2026-06-03T11:00:00Z","location":"Acme HQ","assigneeIds":["usr_a","usr_b"],"linkedEntityType":"account","linkedEntityId":"01HACC..."},"output":{"id":"01HZ..."}}],"related":["list_calendar_allowed_users","suggest_optimal_assignee","update_calendar_event"],"annotations":{"title":"Create Calendar Event","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:create"]}]}},{"name":"update_calendar_event","surface":"data","description":"Partial update of a calendar event. Common uses: reschedule (startsAt/endsAt), change location, reassign (assigneeIds — full replace of the assignee set), or replace external invitees (inviteeEmails — full replace; [] removes everyone). The shared scheduling service pushes the change through the connected Google/Microsoft/Exchange provider so attendees receive updates. Same allow-list rule as create: every userId in assigneeIds must be in the calendar's booking allow-list, else the update is rejected.","entity":"calendar_event","action":"update","inputSchema":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string","minLength":1,"maxLength":300},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean"},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"linkedEntityType":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"linkedEntityId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"contactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"assigneeIds":{"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"inviteeEmails":{"maxItems":50,"type":"array","items":{"type":"string","format":"email"}},"autoSchedule":{"type":"boolean"},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Push an event by two hours","input":{"id":"01HZ...","startsAt":"2026-06-03T11:00:00Z","endsAt":"2026-06-03T13:00:00Z"},"output":{"id":"01HZ..."}},{"description":"Reassign to a different technician","input":{"id":"01HZ...","assigneeIds":["usr_c"]},"output":{"id":"01HZ..."}}],"related":["get_calendar_event","suggest_optimal_assignee"],"idempotent":true,"annotations":{"title":"Update Calendar Event","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:update"]}]}},{"name":"delete_calendar_event","surface":"data","description":"Soft-delete (cancel) a calendar event. It drops out of lists and availability calculations.","entity":"calendar_event","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Cancel an event","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_calendar_event"],"idempotent":true,"annotations":{"title":"Delete Calendar Event","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:delete"]}]}},{"name":"get_my_agenda","surface":"data","description":"Return the current user's agenda (\"My Day\") for a window — the SAME unified calendar the /calendar page shows: their connected Microsoft 365 / Google / Exchange calendar events, CaptivaHQ appointments, task due dates, logged meetings and deal close dates. Answers 'what's on my calendar today / this week?'. Defaults to today in the user's timezone. from/to accept an ISO 8601 datetime with any UTC offset (e.g. 2026-10-05T00:00:00-04:00) or a bare date YYYY-MM-DD (a whole local day; `to` is inclusive). Max window 31 days. `connectedCalendar` says which external calendar was read (null = none connected). Pass userId (owner/admin only) to see another user's CaptivaHQ appointments — their personal calendar is never exposed.","entity":"calendar_event","action":"list","inputSchema":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}]},"timeZone":{"description":"IANA zone, e.g. America/New_York. Defaults to the user's profile timezone, then the workspace's.","type":"string","minLength":1,"maxLength":64},"userId":{"type":"string","minLength":1,"maxLength":64},"limit":{"type":"integer","minimum":1,"maximum":500}},"additionalProperties":false},"examples":[{"description":"Do I have anything on today?","input":{},"output":{"count":0,"items":[]}},{"description":"My week, Eastern time","input":{"from":"2026-10-05","to":"2026-10-12","timeZone":"America/New_York"},"output":{"from":"2026-10-05T04:00:00.000Z","to":"2026-10-13T04:00:00.000Z","timeZone":"America/New_York","connectedCalendar":"microsoft","count":1,"truncated":false,"items":[{"id":"external:AAMk...","source":"external","provider":"microsoft","title":"Weekly ops sync","startsAt":"2026-10-05T13:00:00.000Z","endsAt":"2026-10-05T13:30:00.000Z","allDay":false,"date":"2026-10-05"}]}},{"description":"A window given with a UTC offset","input":{"from":"2026-09-29T00:00:00-04:00","to":"2026-09-30T00:00:00-04:00"},"output":{"count":0,"items":[]}}],"related":["list_calendar_events","get_calendar_availability"],"idempotent":true,"annotations":{"title":"Get My Agenda","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:list"]}]}},{"name":"list_pto","surface":"data","description":"List PTO (paid time off / out-of-office) entries. Filter by userId and/or a [from, to] date window (YYYY-MM-DD) — the window matches any PTO that overlaps it. PTO makes a user count as unavailable in get_calendar_availability and demotes them to last in suggest_optimal_assignee.","entity":"pto_entry","action":"list","inputSchema":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"A user's upcoming PTO","input":{"userId":"usr_a","from":"2026-06-01","to":"2026-12-31"},"output":{"items":[]}}],"related":["create_pto","get_pto_conflicts","get_calendar_availability"],"idempotent":true,"annotations":{"title":"List PTO","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["pto_entry:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["pto_entry:list"]}]}},{"name":"create_pto","surface":"data","description":"Record a PTO / out-of-office block for a user. Required: userId, startsOn, endsOn (YYYY-MM-DD, inclusive of the whole end day). Optional: reason. TIP: call get_pto_conflicts first to warn if this PTO collides with events the user is already booked on.","entity":"pto_entry","action":"create","inputSchema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":64},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["userId","startsOn","endsOn"],"additionalProperties":false},"examples":[{"description":"Book a week of vacation","input":{"userId":"usr_a","startsOn":"2026-07-06","endsOn":"2026-07-10","reason":"Vacation"},"output":{"id":"01HZ..."}}],"related":["get_pto_conflicts","list_pto","delete_pto"],"annotations":{"title":"Create PTO","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["pto_entry:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["pto_entry:create"]}]}},{"name":"delete_pto","surface":"data","description":"Soft-delete a PTO entry (e.g. cancelled leave). The user becomes available again in that window.","entity":"pto_entry","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Cancel a PTO block","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["create_pto","list_pto"],"idempotent":true,"annotations":{"title":"Delete PTO","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["pto_entry:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["pto_entry:delete"]}]}},{"name":"get_pto_conflicts","surface":"data","description":"Given a user and a candidate PTO window (startsOn/endsOn, YYYY-MM-DD), return every event — across ALL calendars — where that user is an assignee and the event overlaps the window. Use to warn before booking PTO that it collides with existing commitments.","entity":"calendar_event","action":"list","inputSchema":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":64},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["userId","startsOn","endsOn"],"additionalProperties":false},"examples":[{"description":"Does this vacation clash with any bookings?","input":{"userId":"usr_a","startsOn":"2026-07-06","endsOn":"2026-07-10"},"output":[]}],"related":["create_pto","list_calendar_events"],"idempotent":true,"annotations":{"title":"Get PTO Conflicts","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar_event:list"]}]}},{"name":"analyze_schedule_availability","surface":"data","description":"Analyze a calendar's exact schedule and bounded assignment history to recommend up to three people for the next unassigned appointment, identify who is available, and flag recent overwork. The evidence excludes PTO/out-of-office blackout dates, checks conflicts across all calendars, and compares assignment title/status/linked-record characteristics. This is deterministic evidence for the model to explain; it does not assign anyone and makes no separate LLM call.","entity":"calendar","action":"analyze_availability","inputSchema":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"assignmentId":{"type":"string","minLength":1,"maxLength":64},"lookbackDays":{"default":90,"type":"integer","minimum":28,"maximum":365}},"required":["calendarId","from","to"],"additionalProperties":false},"examples":[{"description":"Find the best staffing options and recent overwork for the visible month","input":{"calendarId":"01HZ...","from":"2026-08-01T00:00:00Z","to":"2026-09-01T00:00:00Z"},"output":{"topOptions":[],"overworked":[],"nextAssignment":null}}],"related":["get_calendar_availability","suggest_optimal_assignee","list_calendar_events","list_pto"],"idempotent":true,"annotations":{"title":"Analyze Schedule Availability","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar:analyze_availability"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:analyze_availability"]}]}},{"name":"get_calendar_availability","surface":"data","description":"For a calendar and a [from, to] datetime window (ISO 8601), return each allow-listed user's busy intervals (across ALL their calendars, not just this one), their PTO in the window, and the computed free windows. Use to answer 'who is free this week?' or 'when can the team meet?'.","entity":"calendar","action":"check_availability","inputSchema":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["calendarId","from","to"],"additionalProperties":false},"examples":[{"description":"Who on the Field Service team is free next week?","input":{"calendarId":"01HZ...","from":"2026-06-08T00:00:00Z","to":"2026-06-15T00:00:00Z"},"output":[{"userId":"usr_a","busy":[],"pto":[],"free":[]}]}],"related":["suggest_optimal_assignee","list_calendar_allowed_users","create_calendar_event"],"idempotent":true,"annotations":{"title":"Get Calendar Availability","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["calendar:check_availability"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:check_availability"]}]}},{"name":"suggest_optimal_assignee","surface":"data","description":"Rank the calendar's allow-listed users for a [from, to] time window by availability (users on PTO rank last; otherwise fewer overlapping commitments ranks higher) and return them best-first with a score. Data-only ranking — no LLM call. Use to answer 'who's the best person for an appointment next week?'.","entity":"calendar","action":"suggest_assignee","inputSchema":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}},"required":["calendarId","from","to"],"additionalProperties":false},"examples":[{"description":"Best technician for a Tuesday-morning slot","input":{"calendarId":"01HZ...","from":"2026-06-09T09:00:00Z","to":"2026-06-09T11:00:00Z"},"output":[{"userId":"usr_a","score":100,"conflicts":0,"onPto":false,"busyCount":0}]}],"related":["get_calendar_availability","create_calendar_event"],"idempotent":true,"annotations":{"title":"Suggest Optimal Assignee","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["calendar:suggest_assignee"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["calendar:suggest_assignee"]}]}},{"name":"list_invoices","surface":"data","description":"List invoices. Filter by accountId, projectId, status (draft/sent/viewed/paid/overdue/void/disputed), outstanding=true (issued and unpaid: sent/viewed/overdue/disputed — excludes drafts and voids), or due-date range. For counts and totals use countOnly=true or groupBy=status over ALL matching invoices (invoiced totals appear when financial data is visible). Use get_invoice for one invoice's total and line items.","entity":"invoice","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"accountId":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["draft","sent","viewed","paid","overdue","void","disputed"]},"dueBefore":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dueAfter":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"outstanding":{"type":"boolean"},"groupBy":{"type":"string","enum":["status"]},"countOnly":{"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Overdue invoices","input":{"status":"overdue"},"output":{"items":[]}},{"description":"All invoices for an account","input":{"accountId":"01HZ..."},"output":{"items":[]}}],"related":["get_invoice","create_invoice","send_invoice","mark_invoice_paid"],"idempotent":true,"annotations":{"title":"List Invoices","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["invoice:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:list"]}]}},{"name":"get_invoice","surface":"data","description":"Get a single invoice by ID with full detail including line_items.","entity":"invoice","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch an invoice","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_invoices","update_invoice"],"idempotent":true,"annotations":{"title":"Get Invoice","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["invoice:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:read"]}]}},{"name":"create_invoice","surface":"data","description":"Create a new invoice. Required: accountId, number, dueDate (YYYY-MM-DD). lineItems is an array of {description, quantity, unitPrice, taxRate?}; subtotal/tax/total are computed server-side from those lines — do not send them. Defaults: status='draft', currency=workspace default. After create, use send_invoice to transition draft → sent.","entity":"invoice","action":"create","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"projectId":{"type":["string","null"]},"contractId":{"type":["string","null"]},"sourceDealId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"commercialTermsSnapshotId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"purchaseOrderNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"quoteId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"terms":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"number":{"type":"string","minLength":1,"maxLength":60},"lineItems":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":300},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"number","minimum":0},"unitPrice":{"type":"number"},"discountPercent":{"type":"number","minimum":0,"maximum":100},"taxRate":{"type":"number","minimum":0,"maximum":1}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"subtotal":{"type":"number","minimum":0},"tax":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"paymentTerms":{"anyOf":[{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","net_90"]},{"type":"null"}]},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"type":"string","enum":["draft","sent","viewed","paid","overdue","void","disputed"]},"includePendingCharges":{"type":"boolean"}},"required":["accountId"],"additionalProperties":false},"examples":[{"description":"Draft invoice with two line items","input":{"accountId":"01HZ...","number":"INV-2026-0042","dueDate":"2026-06-30","currency":"USD","lineItems":[{"description":"Setup fee","quantity":1,"unitPrice":5000},{"description":"Monthly retainer","quantity":3,"unitPrice":2500}]},"output":{"id":"01HZ..."}}],"related":["send_invoice","list_invoices"],"annotations":{"title":"Create Invoice","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:create"]}]}},{"name":"update_invoice","surface":"data","description":"Partial update of an invoice. For state transitions prefer send_invoice (emits invoice.sent) and mark_invoice_paid (emits invoice.paid) which carry guard logic — status='paid' is REJECTED here (422). A paid or void invoice cannot be edited at all (422). subtotal/tax/total are always recomputed server-side from lineItems; sending them has no effect.","entity":"invoice","action":"update","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"projectId":{"type":["string","null"]},"contractId":{"type":["string","null"]},"sourceDealId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"commercialTermsSnapshotId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"purchaseOrderNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"quoteId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"terms":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"number":{"type":"string","minLength":1,"maxLength":60},"lineItems":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","maxLength":64},"name":{"type":"string","maxLength":300},"description":{"type":"string","minLength":1,"maxLength":500},"quantity":{"type":"number","minimum":0},"unitPrice":{"type":"number"},"discountPercent":{"type":"number","minimum":0,"maximum":100},"taxRate":{"type":"number","minimum":0,"maximum":1}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"subtotal":{"type":"number","minimum":0},"tax":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"paymentTerms":{"anyOf":[{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","net_90"]},{"type":"null"}]},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"type":"string","enum":["draft","sent","viewed","paid","overdue","void","disputed"]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Update line items","input":{"id":"01HZ...","lineItems":[{"description":"Revised scope","quantity":1,"unitPrice":10000}]},"output":{"id":"01HZ..."}}],"related":["send_invoice","mark_invoice_paid"],"idempotent":true,"annotations":{"title":"Update Invoice","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:update"]}]}},{"name":"send_invoice","surface":"data","description":"Send the invoice to the customer. Transitions status draft|overdue → sent. Emits invoice.sent webhook event. Returns 422 if invoice is already sent/paid/void.","entity":"invoice","action":"send","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Send a draft invoice","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["mark_invoice_paid","update_invoice"],"annotations":{"title":"Send Invoice","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:send"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:send"]}]}},{"name":"mark_invoice_paid","surface":"data","description":"Mark an invoice as paid. Transitions to status='paid' (from any non-paid, non-void state). Emits invoice.paid — the canonical revenue-recognition event for downstream finance integrations. Returns 422 if invoice is already paid or void.","entity":"invoice","action":"approve","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Mark a sent invoice paid","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["send_invoice"],"annotations":{"title":"Mark Invoice Paid","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:approve"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:approve"]}]}},{"name":"delete_invoice","surface":"data","description":"Soft-delete an invoice. Almost always wrong — for cancellation use update_invoice with status='void' which preserves the audit trail. Use delete only for spam/test records before they were sent.","entity":"invoice","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete test draft","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_invoice"],"idempotent":true,"annotations":{"title":"Delete Invoice","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:delete"]}]}},{"name":"list_quotes","surface":"data","description":"List quotes. Filter by accountId, dealId, status (draft/sent/viewed/accepted/rejected/expired/withdrawn/converted), currency, or expiry window. For counts and totals use countOnly=true or groupBy=status — computed over ALL matching quotes (groups carry counts, and quoted totals when financial data is visible).","entity":"quote","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"accountId":{"type":"string","maxLength":64},"contactId":{"type":"string","maxLength":64},"dealId":{"type":"string","maxLength":64},"workOrderId":{"type":"string","maxLength":64},"projectId":{"type":"string","maxLength":64},"status":{"type":"string","enum":["draft","sent","viewed","accepted","rejected","expired","withdrawn","converted"]},"currency":{"type":"string","minLength":3,"maxLength":3},"minTotal":{"type":"number","minimum":0},"expiringFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiringTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"groupBy":{"type":"string","enum":["status"]},"countOnly":{"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Open quotes for a deal","input":{"dealId":"01HZ...","status":"sent"},"output":{"items":[]}}],"related":["get_quote","create_quote","send_quote"],"idempotent":true,"annotations":{"title":"List Quotes","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["quote:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["quote:list"]}]}},{"name":"get_quote","surface":"data","description":"Get one quote by ID — line items, the three section totals, term, payment arrangement, MRR/ARR.","entity":"quote","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a quote","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_quotes","update_quote"],"idempotent":true,"annotations":{"title":"Get Quote","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["quote:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["quote:read"]}]}},{"name":"create_quote","surface":"data","description":"Create a quote (the order form). Required: accountId, number. Link to a deal with dealId. lineItems each carry quantity + unitPrice and a `section`: recurring (subscription — also set subscriptionBillingFrequency + subscriptionTermMonths), fixed (one-time fixed price), or time_material (one-time T&M — unitPrice is the hourly rate). If section is omitted it is derived from the line's kind/billingMode. Set termMonths and paymentArrangement (upfront_100 | completion_100 | split_50_50 | custom). Totals, section rollups, MRR and ARR are computed server-side — do NOT pass subtotal/total. Linking a quote to a deal satisfies the Negotiating-stage gate. This is the canonical voice/agent path for building a quote.","entity":"quote","action":"create","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":64},"contactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"dealId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"workOrderId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"number":{"type":"string","minLength":1,"maxLength":60},"title":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"lineItems":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":300},"sku":{"type":"string","maxLength":80},"kind":{"type":"string","maxLength":40},"section":{"type":"string","enum":["recurring","fixed","time_material"]},"description":{"type":"string","maxLength":5000},"quantity":{"type":"number","minimum":0,"maximum":999999.9999},"unitPrice":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"discountPercent":{"type":"number","minimum":0,"maximum":100},"taxRatePercent":{"type":"number","minimum":0,"maximum":100},"billingMode":{"type":"string","maxLength":40},"role":{"type":"string","maxLength":120},"paymentSchedule":{"type":"string","maxLength":40},"subscriptionBillingFrequency":{"type":"string","maxLength":40},"subscriptionTermMonths":{"type":"integer","minimum":0,"maximum":1200},"notes":{"type":"string","maxLength":2000},"sortOrder":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","quantity","unitPrice"],"additionalProperties":{}}},"termMonths":{"anyOf":[{"type":"integer","minimum":0,"maximum":1200},{"type":"null"}]},"pricingModel":{"anyOf":[{"type":"string","enum":["one_time","time_materials","subscription"]},{"type":"null"}]},"billingFrequency":{"anyOf":[{"type":"string","enum":["monthly","quarterly","semi_annual","annual"]},{"type":"null"}]},"discountPercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"taxRatePercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"paymentArrangement":{"anyOf":[{"type":"string","enum":["upfront_100","completion_100","split_50_50","monthly_subscription","custom"]},{"type":"null"}]},"paymentArrangementCustom":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"percent":{"type":"number","minimum":0,"maximum":100},"dueDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trigger":{"type":"string","maxLength":60}},"additionalProperties":{}}},{"type":"null"}]},"subtotal":{"type":"number","minimum":0,"maximum":9999999999.99},"discountTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"taxTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"total":{"type":"number","minimum":0,"maximum":9999999999.99},"recurringTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"fixedTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"tmTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"tmHours":{"type":"number","minimum":0,"maximum":9999999.99},"mrr":{"type":"number","minimum":0,"maximum":9999999999.99},"arr":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"status":{"type":"string","enum":["draft","sent","viewed","accepted","rejected","expired","withdrawn","converted"]},"validUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"terms":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"rejectionReason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"pdfUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"sentAt":{"type":["string","null"]},"acceptedAt":{"type":["string","null"]},"rejectedAt":{"type":["string","null"]},"convertedInvoiceId":{"type":["string","null"]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["accountId"],"additionalProperties":false},"examples":[{"description":"An order form: monthly subscription + fixed implementation, 50/50 payment","input":{"accountId":"01HZ...","number":"Q-2026-0007","dealId":"01HY...","termMonths":12,"paymentArrangement":"split_50_50","lineItems":[{"name":"Platform Pro","quantity":1,"unitPrice":500,"section":"recurring","subscriptionBillingFrequency":"monthly","subscriptionTermMonths":12},{"name":"Onboarding","quantity":1,"unitPrice":4000,"section":"fixed"},{"name":"Custom integration (T&M)","quantity":40,"unitPrice":180,"section":"time_material"}]},"output":{"id":"01HZ...","total":15700,"mrr":500,"arr":6000}}],"related":["send_quote","approve_quote","list_quotes"],"annotations":{"title":"Create Quote","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["quote:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["quote:create"]}]}},{"name":"update_quote","surface":"data","description":"Partial update of a quote. When lineItems are supplied, all totals + section rollups + MRR/ARR are recomputed server-side. For lifecycle changes prefer send_quote / approve_quote.","entity":"quote","action":"update","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":64},"contactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"dealId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"workOrderId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"number":{"type":"string","minLength":1,"maxLength":60},"title":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"lineItems":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":300},"sku":{"type":"string","maxLength":80},"kind":{"type":"string","maxLength":40},"section":{"type":"string","enum":["recurring","fixed","time_material"]},"description":{"type":"string","maxLength":5000},"quantity":{"type":"number","minimum":0,"maximum":999999.9999},"unitPrice":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"discountPercent":{"type":"number","minimum":0,"maximum":100},"taxRatePercent":{"type":"number","minimum":0,"maximum":100},"billingMode":{"type":"string","maxLength":40},"role":{"type":"string","maxLength":120},"paymentSchedule":{"type":"string","maxLength":40},"subscriptionBillingFrequency":{"type":"string","maxLength":40},"subscriptionTermMonths":{"type":"integer","minimum":0,"maximum":1200},"notes":{"type":"string","maxLength":2000},"sortOrder":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","quantity","unitPrice"],"additionalProperties":{}}},"termMonths":{"anyOf":[{"type":"integer","minimum":0,"maximum":1200},{"type":"null"}]},"pricingModel":{"anyOf":[{"type":"string","enum":["one_time","time_materials","subscription"]},{"type":"null"}]},"billingFrequency":{"anyOf":[{"type":"string","enum":["monthly","quarterly","semi_annual","annual"]},{"type":"null"}]},"discountPercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"taxRatePercent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"paymentArrangement":{"anyOf":[{"type":"string","enum":["upfront_100","completion_100","split_50_50","monthly_subscription","custom"]},{"type":"null"}]},"paymentArrangementCustom":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"percent":{"type":"number","minimum":0,"maximum":100},"dueDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"trigger":{"type":"string","maxLength":60}},"additionalProperties":{}}},{"type":"null"}]},"subtotal":{"type":"number","minimum":0,"maximum":9999999999.99},"discountTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"taxTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"total":{"type":"number","minimum":0,"maximum":9999999999.99},"recurringTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"fixedTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"tmTotal":{"type":"number","minimum":0,"maximum":9999999999.99},"tmHours":{"type":"number","minimum":0,"maximum":9999999.99},"mrr":{"type":"number","minimum":0,"maximum":9999999999.99},"arr":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"status":{"type":"string","enum":["draft","sent","viewed","accepted","rejected","expired","withdrawn","converted"]},"validUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"terms":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"rejectionReason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"pdfUrl":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"sentAt":{"type":["string","null"]},"acceptedAt":{"type":["string","null"]},"rejectedAt":{"type":["string","null"]},"convertedInvoiceId":{"type":["string","null"]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Switch to 100% up front","input":{"id":"01HZ...","paymentArrangement":"upfront_100"},"output":{"id":"01HZ..."}}],"related":["send_quote","approve_quote"],"idempotent":true,"annotations":{"title":"Update Quote","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["quote:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["quote:update"]}]}},{"name":"send_quote","surface":"data","description":"Send the quote to the customer. Transitions draft|withdrawn → sent.","entity":"quote","action":"send","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Send a draft quote","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["approve_quote","create_quote"],"annotations":{"title":"Send Quote","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["quote:send"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["quote:send"]}]}},{"name":"approve_quote","surface":"data","description":"Mark the quote accepted by the customer. Transitions sent|viewed → accepted.","entity":"quote","action":"approve","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Mark a sent quote accepted","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["send_quote"],"annotations":{"title":"Approve Quote","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["quote:approve"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["quote:approve"]}]}},{"name":"convert_quote","surface":"data","description":"Convert an ACCEPTED quote into fulfillment: one-time lines (fixed + Time & Material) roll into a single invoice; each recurring line becomes a subscription linked back to this quote. The quote moves to status=converted. Use after approve_quote. Returns { invoiceId, subscriptionIds }.","entity":"quote","action":"convert","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Convert an accepted quote","input":{"id":"01HZ..."},"output":{"invoiceId":"01HI...","subscriptionIds":["01HS..."]}}],"related":["approve_quote","create_invoice","create_subscription"],"annotations":{"title":"Convert Quote","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["quote:convert"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["quote:convert"]}]}},{"name":"delete_quote","surface":"data","description":"Soft-delete a quote. Prefer update_quote with status='withdrawn' to preserve the audit trail.","entity":"quote","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a test quote","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_quote"],"idempotent":true,"annotations":{"title":"Delete Quote","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["quote:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["quote:delete"]}]}},{"name":"run_subscription_billing","surface":"data","description":"Bill due subscriptions now: for every active subscription whose next billing date is on or before `asOf` (default today), generate an applied charge (auto-rolls into the next invoice) and advance the billing period. Normally runs hourly via cron; use this to bill a tenant on demand. Returns counts.","entity":"subscription","action":"update","inputSchema":{"type":"object","properties":{"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"type":"integer","minimum":1,"maximum":1000}},"additionalProperties":false},"examples":[{"description":"Run billing as of today","input":{},"output":{"processed":3,"chargeIds":["01HC..."]}}],"related":["create_subscription","list_subscriptions"],"annotations":{"title":"Run Subscription Billing","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["subscription:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["subscription:update"]}]}},{"name":"list_subscriptions","surface":"data","description":"List subscriptions. Filter by accountId, productId, status (trialing/active/paused/cancelled/expired), or billingInterval. Sort by current_period_end to find what renews next.","entity":"subscription","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"accountId":{"type":"string","maxLength":64},"productId":{"type":"string","maxLength":64},"status":{"type":"string","enum":["trialing","active","paused","cancelled","expired"]},"billingInterval":{"type":"string","enum":["monthly","quarterly","semi_annual","annual","biennial"]},"currency":{"type":"string","minLength":3,"maxLength":3},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Active subscriptions for an account","input":{"accountId":"01HZ...","status":"active"},"output":{"items":[]}}],"related":["get_subscription","create_subscription","cancel_subscription"],"idempotent":true,"annotations":{"title":"List Subscriptions","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["subscription:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["subscription:list"]}]}},{"name":"get_subscription","surface":"data","description":"Get one subscription by ID — product, status, billing interval, current period, MRR.","entity":"subscription","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a subscription","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_subscriptions"],"idempotent":true,"annotations":{"title":"Get Subscription","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["subscription:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["subscription:read"]}]}},{"name":"create_subscription","surface":"data","description":"Create a subscription. Required: accountId, productId, unitPrice, billingInterval (monthly/quarterly/annual), currentPeriodStart + currentPeriodEnd (YYYY-MM-DD). Usually created automatically when a quote with recurring lines is converted; create directly only for manual/ad-hoc recurring agreements.","entity":"subscription","action":"create","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":64},"productId":{"type":"string","minLength":1,"maxLength":64},"quoteId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"contractId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","enum":["trialing","active","paused","cancelled","expired"]},"quantity":{"type":"integer","minimum":1,"maximum":1000000},"unitPrice":{"type":"number","minimum":0,"maximum":9999999999.99},"introPrice":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.99},{"type":"null"}]},"introMonths":{"anyOf":[{"type":"integer","minimum":0,"maximum":600},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"billingInterval":{"type":"string","enum":["monthly","quarterly","semi_annual","annual","biennial"]},"currentPeriodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currentPeriodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nextBillingDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"autoRenew":{"type":"boolean"},"cancelAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"pauseStartsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"pauseEndsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"trialEndsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"mrr":{"type":"number","minimum":0,"maximum":9999999999.99},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["accountId","productId","unitPrice","billingInterval"],"additionalProperties":false},"examples":[{"description":"Monthly platform subscription","input":{"accountId":"01HZ...","productId":"01HY...","unitPrice":499,"billingInterval":"monthly","currentPeriodStart":"2026-06-01","currentPeriodEnd":"2026-06-30"},"output":{"id":"01HZ..."}}],"related":["update_subscription","cancel_subscription"],"annotations":{"title":"Create Subscription","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["subscription:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["subscription:create"]}]}},{"name":"update_subscription","surface":"data","description":"Partial update of a subscription (quantity, price, period, status).","entity":"subscription","action":"update","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":64},"productId":{"type":"string","minLength":1,"maxLength":64},"quoteId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"contractId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","enum":["trialing","active","paused","cancelled","expired"]},"quantity":{"type":"integer","minimum":1,"maximum":1000000},"unitPrice":{"type":"number","minimum":0,"maximum":9999999999.99},"introPrice":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.99},{"type":"null"}]},"introMonths":{"anyOf":[{"type":"integer","minimum":0,"maximum":600},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"billingInterval":{"type":"string","enum":["monthly","quarterly","semi_annual","annual","biennial"]},"currentPeriodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"currentPeriodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"nextBillingDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"autoRenew":{"type":"boolean"},"cancelAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"cancelReason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"pauseStartsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"pauseEndsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"trialEndsAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"mrr":{"type":"number","minimum":0,"maximum":9999999999.99},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"referenceNo":{"type":["string","null"]},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Bump seat count","input":{"id":"01HZ...","quantity":25},"output":{"id":"01HZ..."}}],"related":["cancel_subscription"],"idempotent":true,"annotations":{"title":"Update Subscription","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["subscription:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["subscription:update"]}]}},{"name":"cancel_subscription","surface":"data","description":"Cancel a subscription (status → cancelled). Optionally set cancelAt (YYYY-MM-DD) for an end-of-term cancellation and a reason. Stops future charge generation. Emits subscription.cancelled.","entity":"subscription","action":"cancel","inputSchema":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string","maxLength":2000},"cancelAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Cancel now","input":{"id":"01HZ...","reason":"Churned"},"output":{"id":"01HZ..."}}],"related":["update_subscription"],"annotations":{"title":"Cancel Subscription","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["subscription:cancel"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["subscription:cancel"]}]}},{"name":"delete_subscription","surface":"data","description":"Soft-delete a subscription. Prefer cancel_subscription to preserve billing history.","entity":"subscription","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a test subscription","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["cancel_subscription"],"idempotent":true,"annotations":{"title":"Delete Subscription","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["subscription:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["subscription:delete"]}]}},{"name":"list_targets","surface":"data","description":"List sales targets / quotas. Filter by owner (user / group / region), metric (revenue / deals_closed / opps_created / custom), or status (active / achieved / missed / archived). Targets live under CRM and replace the parked Workforce module's goal entity (ADR-001).","entity":"target","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ownerUserId":{"type":"string"},"ownerGroupId":{"type":"string"},"ownerRegionId":{"type":"string"},"ownerType":{"type":"string","enum":["user","group","region"]},"metric":{"type":"string","enum":["revenue","deals_closed","opps_created","custom"]},"status":{"type":"string","enum":["active","achieved","missed","archived"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"My active revenue targets","input":{"ownerType":"user","ownerUserId":"01HZ...","metric":"revenue","status":"active"},"output":{"items":[]}},{"description":"Targets missed last quarter","input":{"status":"missed"},"output":{"items":[]}}],"related":["get_target","create_target"],"idempotent":true,"annotations":{"title":"List Targets","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["target:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["target:list"]}]}},{"name":"get_target","surface":"data","description":"Get a single target by ID, including live attainment-to-date.","entity":"target","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"related":["list_targets","update_target"],"idempotent":true,"annotations":{"title":"Get Target","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["target:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["target:read"]}]}},{"name":"create_target","surface":"data","description":"Create a sales target / quota. Required: name, ownerType, the matching owner-id (ownerUserId / ownerGroupId / ownerRegionId), metric, amount, periodStart, periodEnd. For metric='revenue' currency is also required; for metric='custom' provide customMetricKey. Approval can be done separately via the approve action.","entity":"target","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ownerType":{"type":"string","enum":["user","group","region"]},"ownerUserId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerGroupId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerRegionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"metric":{"type":"string","enum":["revenue","deals_closed","opps_created","custom"]},"customMetricKey":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"amount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurring":{"anyOf":[{"type":"string","enum":["monthly","quarterly","annual"]},{"type":"null"}]},"status":{"type":"string","enum":["active","achieved","missed","archived"]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}}},"required":["name","ownerType","metric","amount","periodStart","periodEnd"],"additionalProperties":false},"examples":[{"description":"Q3 revenue target for one rep","input":{"name":"Q3 Revenue — Alice","ownerType":"user","ownerUserId":"01HZ...","metric":"revenue","amount":250000,"currency":"USD","periodStart":"2026-07-01","periodEnd":"2026-09-30"},"output":{"id":"01HZ..."}}],"related":["list_targets","update_target"],"idempotent":false,"annotations":{"title":"Create Target","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["target:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["target:create"]}]}},{"name":"update_target","surface":"data","description":"Update fields on an existing target. Partial updates supported.","entity":"target","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"ownerType":{"type":"string","enum":["user","group","region"]},"ownerUserId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerGroupId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerRegionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"metric":{"type":"string","enum":["revenue","deals_closed","opps_created","custom"]},"customMetricKey":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"amount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurring":{"anyOf":[{"type":"string","enum":["monthly","quarterly","annual"]},{"type":"null"}]},"status":{"type":"string","enum":["active","achieved","missed","archived"]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}}},"required":["id"],"additionalProperties":false},"related":["list_targets","get_target","delete_target"],"idempotent":true,"annotations":{"title":"Update Target","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["target:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["target:update"]}]}},{"name":"delete_target","surface":"data","description":"Soft-delete a target (sets deleted_at). The attainment-to-date is preserved.","entity":"target","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"related":["list_targets","create_target"],"idempotent":true,"annotations":{"title":"Delete Target","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["target:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["target:delete"]}]}},{"name":"apply_charge","surface":"data","description":"Transition a draft charge to 'applied' so it becomes eligible to roll into the customer's next invoice.","entity":"charge","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Apply a draft charge","input":{"id":"01HZ..."},"output":{"id":"01HZ...","status":"applied"}}],"related":["mark_charge_paid","cancel_charge"],"annotations":{"title":"Apply Charge","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["charge:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["charge:update"]}]}},{"name":"mark_charge_paid","surface":"data","description":"Mark a charge paid. Emits charge.paid. Valid from draft/applied/rolled_in.","entity":"charge","action":"approve","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Mark a charge paid","input":{"id":"01HZ..."},"output":{"id":"01HZ...","status":"paid"}}],"related":["apply_charge"],"annotations":{"title":"Mark Charge Paid","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["charge:approve"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["charge:approve"]}]}},{"name":"cancel_charge","surface":"data","description":"Cancel a charge (with an optional reason). Emits charge.cancelled. Valid from draft/applied.","entity":"charge","action":"cancel","inputSchema":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string","maxLength":500}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Cancel a duplicate charge","input":{"id":"01HZ...","reason":"duplicate"},"output":{"id":"01HZ...","status":"cancelled"}}],"related":["apply_charge"],"annotations":{"title":"Cancel Charge","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["charge:cancel"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["charge:cancel"]}]}},{"name":"list_charges","surface":"data","description":"List ad-hoc charges to customers (Finance/Charges). Filter by customer, invoice link, or status (draft / applied / paid / rolled_in / cancelled). Charges are the outside-an-invoice billing primitive — promoted from CB-only to V1 in ADR-001.","entity":"charge","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"customerId":{"type":"string"},"contractId":{"type":"string"},"status":{"type":"string","enum":["draft","applied","paid","rolled_in","cancelled"]},"invoiceId":{"type":"string"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"All applied charges for a customer","input":{"customerId":"01HZ...","status":"applied"},"output":{"items":[]}}],"related":["get_charge","create_charge"],"idempotent":true,"annotations":{"title":"List Charges","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["charge:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["charge:list"]}]}},{"name":"get_charge","surface":"data","description":"Get a single billing charge by ID. Returns the charge record with amount, currency, status, linked invoice/subscription and payment state.","entity":"charge","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"related":["list_charges"],"idempotent":true,"annotations":{"title":"Get Charge","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["charge:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["charge:read"]}]}},{"name":"create_charge","surface":"data","description":"Apply a charge to a customer. Required: customerId, description, amount, currency. The charge starts in 'draft' unless status is overridden to 'applied'. Pair with the customer's existing invoice (set invoiceId) to roll the charge into a larger invoice.","entity":"charge","action":"create","inputSchema":{"type":"object","properties":{"customerId":{"type":"string","minLength":1},"contractId":{"type":["string","null"]},"invoiceId":{"type":["string","null"]},"paymentId":{"type":["string","null"]},"chargeType":{"default":"debit","type":"string","enum":["debit","credit"]},"description":{"type":"string","minLength":1,"maxLength":500},"referenceCode":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"amount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"taxAmount":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"taxRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"status":{"type":"string","enum":["draft","applied","paid","rolled_in","cancelled"]},"statusReason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}}},"required":["customerId","description","amount","currency"],"additionalProperties":false},"related":["list_charges","update_charge"],"idempotent":false,"annotations":{"title":"Create Charge","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["charge:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["charge:create"]}]}},{"name":"update_charge","surface":"data","description":"Update a charge's fields, status, or linked records. Partial updates supported.","entity":"charge","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string"},"customerId":{"type":"string","minLength":1},"contractId":{"type":["string","null"]},"invoiceId":{"type":["string","null"]},"paymentId":{"type":["string","null"]},"chargeType":{"default":"debit","type":"string","enum":["debit","credit"]},"description":{"type":"string","minLength":1,"maxLength":500},"referenceCode":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"amount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"taxAmount":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"taxRate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"status":{"type":"string","enum":["draft","applied","paid","rolled_in","cancelled"]},"statusReason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"issueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"referenceNo":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},"related":["list_charges","get_charge","delete_charge"],"idempotent":true,"annotations":{"title":"Update Charge","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["charge:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["charge:update"]}]}},{"name":"delete_charge","surface":"data","description":"Soft-delete a charge (sets deleted_at). Prefer status='cancelled' for an in-place hide.","entity":"charge","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"related":["list_charges"],"idempotent":true,"annotations":{"title":"Delete Charge","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["charge:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["charge:delete"]}]}},{"name":"list_expense_reports","surface":"data","description":"List expense reports (multi-line, submit/approve workflow). Filter by submitter, approver, or status (draft / submitted / approved / rejected / reimbursed). countOnly=true or groupBy=status gives counts over ALL matching reports. Use get_expense_report for one report's lines.","entity":"expense_report","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"submitterUserId":{"type":"string"},"approverUserId":{"type":"string"},"status":{"type":"string","enum":["draft","submitted","pending_l2_approval","pending_l3_approval","approved","rejected","pending_payment","paid","reimbursed"]},"projectId":{"type":"string"},"workOrderId":{"type":"string"},"contractId":{"type":"string"},"includeLinkedWorkOrders":{"anyOf":[{"type":"string","const":"true"},{"type":"string","const":"false"},{"type":"boolean"}]},"groupBy":{"type":"string","enum":["status"]},"countOnly":{"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"related":["get_expense_report","create_expense_report"],"idempotent":true,"annotations":{"title":"List Expense Reports","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["expense_report:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["expense_report:list"]}]}},{"name":"get_expense_report","surface":"data","description":"Get a single expense report by ID (lines are loaded via sub-entity endpoint).","entity":"expense_report","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"related":["list_expense_reports"],"idempotent":true,"annotations":{"title":"Get Expense Report","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["expense_report:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["expense_report:read"]}]}},{"name":"create_expense_report","surface":"data","description":"Open a new expense report. Required: submitterUserId, title. Lines are added separately via POST /api/v1/finance/expense-reports/{id}/lines. To submit for approval, call update_expense_report with { status: \"submitted\" }.","entity":"expense_report","action":"create","inputSchema":{"type":"object","properties":{"submitterUserId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"periodStart":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"costCenterId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","enum":["draft","submitted","pending_l2_approval","pending_l3_approval","approved","rejected","pending_payment","paid","reimbursed"]},"rejectionReason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"approverUserId":{"type":["string","null"]},"approver2UserId":{"type":["string","null"]},"approver3UserId":{"type":["string","null"]},"totalAmount":{"type":"number","minimum":0},"totalCurrency":{"type":"string","minLength":3,"maxLength":3},"projectId":{"type":["string","null"]},"workOrderId":{"type":["string","null"]},"customerId":{"type":["string","null"]},"contractId":{"type":["string","null"]},"billable":{"type":"boolean"},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}}},"required":["submitterUserId","title"],"additionalProperties":false},"related":["list_expense_reports","update_expense_report"],"idempotent":false,"annotations":{"title":"Create Expense Report","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["expense_report:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["expense_report:create"]}]}},{"name":"update_expense_report","surface":"data","description":"Update an expense report's header fields or advance its lifecycle. Status transitions: draft→submitted (requires expense_report:send), submitted→approved or reimbursed (requires expense_report:approve), submitted→rejected (requires expense_report:cancel). Partial updates supported.","entity":"expense_report","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string"},"submitterUserId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"periodStart":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"costCenterId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","enum":["draft","submitted","pending_l2_approval","pending_l3_approval","approved","rejected","pending_payment","paid","reimbursed"]},"rejectionReason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"approverUserId":{"type":["string","null"]},"approver2UserId":{"type":["string","null"]},"approver3UserId":{"type":["string","null"]},"totalAmount":{"type":"number","minimum":0},"totalCurrency":{"type":"string","minLength":3,"maxLength":3},"projectId":{"type":["string","null"]},"workOrderId":{"type":["string","null"]},"customerId":{"type":["string","null"]},"contractId":{"type":["string","null"]},"billable":{"type":"boolean"},"tags":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"referenceNo":{"type":["string","null"]}},"required":["id"],"additionalProperties":false},"related":["list_expense_reports","get_expense_report"],"idempotent":true,"annotations":{"title":"Update Expense Report","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["expense_report:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["expense_report:update"]}]}},{"name":"delete_expense_report","surface":"data","description":"Soft-delete an expense report (only allowed while in 'draft' status).","entity":"expense_report","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"related":["list_expense_reports"],"idempotent":true,"annotations":{"title":"Delete Expense Report","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["expense_report:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["expense_report:delete"]}]}},{"name":"ask_llm","surface":"data","description":"Send a chat conversation to the workspace LLM. Subject to per-tenant monthly budget (blocks with budget_exceeded when the cap is reached). Returns the assistant message text plus token/cost metrics. For long-running streaming use /api/v1/llm/chat/stream (SSE) instead.","entity":"ai_call","action":"create","inputSchema":{"type":"object","properties":{"messages":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":100000}},"required":["role","content"]}},"model":{"default":"auto","type":"string","enum":["fast","smart","auto"]},"purpose":{"default":"chat","type":"string","maxLength":60},"temperature":{"type":"number","minimum":0,"maximum":2},"maxTokens":{"type":"integer","minimum":1,"maximum":8000},"responseFormat":{"default":"text","type":"string","enum":["text","json"]}},"required":["messages"],"additionalProperties":false},"examples":[{"description":"One-shot question","input":{"messages":[{"role":"user","content":"Summarize Q3 pipeline in 3 lines."}]},"output":{"result":{"message":"..."},"usage":{"totalTokens":120}}}],"related":["summarize_text"],"annotations":{"title":"Ask LLM","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create"]}]}},{"name":"summarize_text","surface":"data","description":"Summarize a block of text. Style: brief (1-2 sentences), detailed (paragraphs), bullets (key points). Use this instead of ask_llm for one-shot text reduction — the prompt is canonical and the result is cacheable.","entity":"ai_call","action":"create","inputSchema":{"type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":200000},"style":{"default":"brief","type":"string","enum":["brief","detailed","bullets"]},"maxTokens":{"type":"integer","minimum":50,"maximum":2000}},"required":["input"],"additionalProperties":false},"examples":[{"description":"Brief summary","input":{"input":"...long text...","style":"brief"},"output":{"result":{"summary":"..."}}}],"related":["ask_llm"],"idempotent":true,"annotations":{"title":"Summarize Text","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create"]}]}},{"name":"translate_text","surface":"data","description":"Translate a text into one of the supported workspace locales (en, en-GB, de, fr, es, it, pt, nl). Returns only the translation — no commentary.","entity":"ai_call","action":"create","inputSchema":{"type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":50000},"toLocale":{"type":"string","pattern":"^[a-z]{2}(-[A-Z]{2})?$"}},"required":["input","toLocale"],"additionalProperties":false},"examples":[{"description":"Translate to German","input":{"input":"Hello world","toLocale":"de"},"output":{"result":{"translated":"Hallo Welt"}}}],"related":["ask_llm"],"idempotent":true,"annotations":{"title":"Translate Text","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create"]}]}},{"name":"suggest_text_rewrite","surface":"data","description":"Help me write: improve, fix_grammar (spelling & grammar), shorten, expand, friendlier, more_formal, custom (with an instruction), or draft (from a short request in `instruction`) text for a field, rich-text editor or template. Always written in the current user's own voice (their knowledge-base writing-style profile) and in the text's own language — it never translates unless asked. For templates pass templateKind (email_template | marketing_email | contract_template) and format 'html': only the catalog's merge variables are allowed (invented {{…}} tokens are stripped and reported). Returns only the suggestion — it never saves; to persist, show it to the user and then call the entity's update tool. Text is capped at 6,000 characters.","entity":"ai_call","action":"create","inputSchema":{"type":"object","properties":{"action":{"type":"string","enum":["improve","fix_grammar","shorten","expand","friendlier","more_formal","custom","draft"]},"instruction":{"type":"string","maxLength":500},"text":{"type":"string","maxLength":6000},"scope":{"type":"string","enum":["selection","field"]},"contextBefore":{"type":"string","maxLength":600},"contextAfter":{"type":"string","maxLength":600},"format":{"type":"string","enum":["plain","html"]},"templateKind":{"type":"string","enum":["email_template","marketing_email","contract_template"]},"fieldLabel":{"type":"string","maxLength":120},"entityType":{"type":"string","maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},"fieldName":{"type":"string","maxLength":64,"pattern":"^[A-Za-z][A-Za-z0-9_.]*$"},"attempt":{"type":"integer","minimum":0,"maximum":20}},"required":["action"],"additionalProperties":false},"examples":[{"description":"Tighten a deal's Customer Need","input":{"action":"shorten","text":"The customer basically needs a way to…","fieldLabel":"Customer Need","entityType":"deal"},"output":{"text":"The customer needs…","action":"shorten","styleApplied":true}},{"description":"Draft an empty description","input":{"action":"draft","instruction":"two sentences on the kickoff scope","text":""},"output":{"text":"Kickoff covers…","action":"draft"}}],"related":["summarize_text","translate_text","update_deal"],"idempotent":false,"annotations":{"title":"Suggest Text Rewrite","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create"]}]}},{"name":"list_custom_object_records","surface":"data","description":"List records for a custom object on a specific parent entity. Use this to read existing custom object data — e.g. 'show all warranties for Acme Corp'. Pass objectId (the object's id or slug, from the admin list_custom_objects tool or the Objects settings page) and filter by the parent's foreign key field. Returns a paginated envelope: { items, pagination }.","entity":"custom_object_record","action":"list","inputSchema":{"type":"object","properties":{"objectId":{"type":"string","description":"Custom object ID or slug"},"filter":{"description":"Filter by field values, e.g. {account_id: 'acc_01HZ...'}","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"description":"Opaque cursor from a previous page's pagination.nextCursor","type":"string"}},"required":["objectId"],"additionalProperties":false},"examples":[{"description":"List warranties for a specific customer","input":{"objectId":"co_01HZ...","filter":{"account_id":"acc_01HZ..."}},"output":{"items":[],"pagination":{"limit":50,"count":0,"hasMore":false}}}],"related":["create_custom_object_record","update_custom_object_record","delete_custom_object_record"],"idempotent":true,"annotations":{"title":"List Custom Object Records","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["custom_object_record:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["custom_object_record:list"]}]}},{"name":"create_custom_object_record","surface":"data","description":"Create a new record for a custom object on a parent entity. Use this to add data — e.g. 'add a warranty to Acme Corp'. data must include all required fields plus the foreign key field linking to the parent (e.g. {account_id: 'acc_01HZ...', warranty_name: 'Extended Coverage', start_date: '2026-01-01'}). Required fields and field types are validated server-side against the object's configuration.","entity":"custom_object_record","action":"create","inputSchema":{"type":"object","properties":{"objectId":{"type":"string","description":"Custom object ID or slug"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Field values keyed by fieldKey. Must include the foreign key field (e.g. account_id) and all required fields."}},"required":["objectId","data"],"additionalProperties":false},"examples":[{"description":"Add a warranty to Acme Corp","input":{"objectId":"co_01HZ...","data":{"account_id":"acc_01HZ...","warranty_name":"Extended Coverage","start_date":"2026-01-01","end_date":"2027-01-01"}},"output":{"id":"rec_01HZ...","record":{}}}],"related":["list_custom_object_records","update_custom_object_record"],"idempotent":false,"annotations":{"title":"Create Custom Object Record","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["custom_object_record:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["custom_object_record:create"]}]}},{"name":"update_custom_object_record","surface":"data","description":"Update an existing custom object record. Partial update — only the keys you pass are changed; every other stored key (including the parent foreign key) is preserved. Use list_custom_object_records to find the recordId first.","entity":"custom_object_record","action":"update","inputSchema":{"type":"object","properties":{"objectId":{"type":"string","description":"Custom object ID or slug"},"recordId":{"type":"string","description":"Record ID to update"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Fields to update. Only provided fields are changed."}},"required":["objectId","recordId","data"],"additionalProperties":false},"examples":[{"description":"Update warranty expiry date","input":{"objectId":"co_01HZ...","recordId":"rec_01HZ...","data":{"end_date":"2028-01-01"}},"output":{"record":{}}}],"related":["list_custom_object_records","create_custom_object_record"],"idempotent":true,"annotations":{"title":"Update Custom Object Record","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["custom_object_record:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["custom_object_record:update"]}]}},{"name":"delete_custom_object_record","surface":"data","description":"Soft-delete a custom object record. Child records attached to it through a relationship configured with cascade delete are removed too; the response reports how many. Use list_custom_object_records to find the recordId first.","entity":"custom_object_record","action":"delete","inputSchema":{"type":"object","properties":{"objectId":{"type":"string","description":"Custom object ID or slug"},"recordId":{"type":"string","description":"Record ID to delete"}},"required":["objectId","recordId"],"additionalProperties":false},"examples":[{"description":"Delete a warranty record","input":{"objectId":"co_01HZ...","recordId":"rec_01HZ..."},"output":{"ok":true,"cascadedRecordCount":0}}],"related":["list_custom_object_records","update_custom_object_record"],"idempotent":true,"annotations":{"title":"Delete Custom Object Record","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["custom_object_record:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["custom_object_record:delete"]}]}},{"name":"create_pulse_message","surface":"data","description":"Post an internal team message into a record's Pulse thread (lead/account/deal/project/ticket). Agent-authored messages carry author_type='agent' and author_label='Atlas'; created_by is always the real actor. Returns the created message.","entity":"pulse_message","action":"create","inputSchema":{"type":"object","properties":{"message_text":{"type":"string","minLength":1,"maxLength":5000},"parent_entity_type":{"type":"string","enum":["lead","account","deal","project","ticket"]},"parent_entity_id":{"type":"string","minLength":1,"maxLength":64},"parent_message_id":{"type":"string","maxLength":80}},"required":["message_text","parent_entity_type","parent_entity_id"],"additionalProperties":false},"examples":[{"description":"Atlas flags a deal in its deal Pulse","input":{"message_text":"Renewal at risk — no contact in 21 days.","parent_entity_type":"deal","parent_entity_id":"opp_123"},"output":{"id":"pmsg_x_abcdef","parentEntityType":"deal"}}],"related":["get_deal","get_account","get_project","get_ticket"],"idempotent":false,"annotations":{"title":"Create Pulse Message","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["pulse_message:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["pulse_message:create"]}]}},{"name":"analyze_compliance_gaps","surface":"data","description":"Analyze a compliance framework for gaps: uncovered requirements (no controls mapped), controls without evidence, and low-effectiveness controls. Returns the framework record, total requirement count, a list of uncovered requirements, and a list of controls with no evidence.","entity":"framework","action":"read","inputSchema":{"type":"object","properties":{"framework_id":{"type":"string","description":"The framework ID to analyze"}},"required":["framework_id"],"additionalProperties":false},"examples":[{"description":"Gap analysis for a specific framework","input":{"framework_id":"fw_01HZ..."},"output":{"framework":{},"totalRequirements":42,"uncoveredRequirements":[],"controlsWithoutEvidence":[]}}],"related":["get_compliance_control_coverage","get_compliance_readiness_score","get_compliance_framework_status"],"idempotent":true,"annotations":{"title":"Analyze Compliance Gaps","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}]}},{"name":"get_compliance_readiness_score","surface":"data","description":"Get the compliance readiness score for all active frameworks or a specific framework, from the compliance_coverage_scores snapshot (pre-computed, low-latency, refreshed on every relevant write plus a daily job). Returns coverage_score, work_progress_score, readiness_band (not_ready/at_risk/progressing/audit_ready), and breakdown counts.","entity":"framework","action":"read","inputSchema":{"type":"object","properties":{"framework_id":{"description":"Optional framework ID; omit for all frameworks","type":"string"}},"additionalProperties":false},"examples":[{"description":"All framework readiness scores","input":{},"output":{"readiness":[]}},{"description":"Score for one framework","input":{"framework_id":"fw_01HZ..."},"output":{"readiness":[]}}],"related":["get_compliance_framework_status","analyze_compliance_gaps"],"idempotent":true,"annotations":{"title":"Get Compliance Readiness Score","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}]}},{"name":"get_compliance_risk_summary","surface":"data","description":"Get a summary of open compliance risks grouped by category and severity band. Returns: by-category counts with average scores, severity-band breakdown (critical/high/medium/low), a likelihood-vs-impact heatmap, and the top 10 highest-scoring open risks.","entity":"risk","action":"list","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"Full risk summary","input":{},"output":{"byCategory":[],"bySeverity":[],"heatmap":[],"topRisks":[]}}],"related":["analyze_compliance_gaps","get_compliance_next_actions"],"idempotent":true,"annotations":{"title":"Get Compliance Risk Summary","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["risk:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["risk:list"]}]}},{"name":"get_compliance_evidence_status","surface":"data","description":"Get the current state of all compliance evidence: status counts, items expiring in the next 30 days, and controls that have no evidence attached. Useful for audit readiness reviews.","entity":"evidence","action":"list","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"Evidence health snapshot","input":{},"output":{"statusCounts":[],"expiringSoon":[],"controlsWithoutEvidence":[]}}],"related":["get_compliance_control_coverage","get_compliance_next_actions"],"idempotent":true,"annotations":{"title":"Get Compliance Evidence Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["evidence:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["evidence:list"]}]}},{"name":"get_compliance_next_actions","surface":"data","description":"Get the top prioritized compliance actions based on urgency: unclassified incidents (priority 0), overdue audit findings (priority 1), expiring evidence (priority 2), failing controls (priority 3), policies due for review (priority 4). Capped at 25.","entity":"framework","action":"read","inputSchema":{"type":"object","properties":{"limit":{"description":"Number of actions to return (default 10, max 25)","default":10,"type":"integer","minimum":1,"maximum":25}},"additionalProperties":false},"examples":[{"description":"Top 10 compliance actions","input":{},"output":{"actions":[],"count":0}},{"description":"Top 5 compliance actions","input":{"limit":5},"output":{"actions":[],"count":0}}],"related":["analyze_compliance_gaps","get_compliance_evidence_status","get_compliance_risk_summary"],"idempotent":true,"annotations":{"title":"Get Compliance Next Actions","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}]}},{"name":"get_compliance_control_coverage","surface":"data","description":"Analyze control coverage: for each requirement, how many controls are mapped and what is their average effectiveness. Coverage status: uncovered (0 controls), weak (<40% effectiveness), partial (40–70%), strong (≥70%). Optionally scope to a single framework.","entity":"framework","action":"read","inputSchema":{"type":"object","properties":{"framework_id":{"description":"Optional framework ID to scope the analysis","type":"string"}},"additionalProperties":false},"examples":[{"description":"Coverage for all frameworks","input":{},"output":{"coverage":[],"count":0}},{"description":"Coverage for one framework","input":{"framework_id":"fw_01HZ..."},"output":{"coverage":[],"count":0}}],"related":["analyze_compliance_gaps","get_compliance_readiness_score"],"idempotent":true,"annotations":{"title":"Get Compliance Control Coverage","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}]}},{"name":"get_compliance_vendor_risk","surface":"data","description":"Analyze ICT provider risk for DORA compliance: concentration risk scores, criticality breakdown, and critical providers with no exit strategy documented. Returns full provider list with contract/service/subcontractor counts, a by-criticality summary, and critical providers missing an exit strategy.","entity":"ict_provider","action":"list","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"ICT vendor risk overview","input":{},"output":{"providers":[],"concentrationByType":[],"criticalProvidersWithoutExitStrategy":[]}}],"related":["get_compliance_framework_status","analyze_compliance_gaps"],"idempotent":true,"annotations":{"title":"Get Compliance Vendor Risk","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ict_provider:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ict_provider:list"]}]}},{"name":"classify_compliance_incident","surface":"data","description":"Get full incident details with the DORA classification criteria pre-computed: affected user count, outage duration (if resolved), geographical spread, economic impact, data-loss flag, and critical-function impact. Also returns the ordered timeline entries.","entity":"incident","action":"read","inputSchema":{"type":"object","properties":{"incident_id":{"type":"string","description":"The incident ID to classify"}},"required":["incident_id"],"additionalProperties":false},"examples":[{"description":"Classify a detected incident","input":{"incident_id":"inc_01HZ..."},"output":{"incident":{},"timeline":[],"doraClassificationCriteria":{}}}],"related":["get_compliance_next_actions","get_compliance_risk_summary"],"idempotent":true,"annotations":{"title":"Classify Compliance Incident","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["incident:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["incident:read"]}]}},{"name":"get_compliance_framework_status","surface":"data","description":"Get an overview of all compliance frameworks: name, code, version, status, maturity level, effective and review dates, and total requirement count. Joins with compliance_coverage_scores when available for a readiness band summary.","entity":"framework","action":"read","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"All framework statuses","input":{},"output":{"frameworks":[],"healthScores":[]}}],"related":["get_compliance_readiness_score","analyze_compliance_gaps","get_compliance_control_coverage"],"idempotent":true,"annotations":{"title":"Get Compliance Framework Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}]}},{"name":"get_compliance_training_status","surface":"data","description":"Get training compliance status: active courses, per-course completion rates (total records, passed, expired, expiring soon), certifications expiring in the next 30 days, and active courses that have never had a completion record. Training does not have its own ACL entity — gated under framework:read.","entity":"framework","action":"read","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"Training compliance overview","input":{},"output":{"activeCourses":[],"completionRates":[],"expiringCertifications":[],"coursesWithNoRecords":[]}}],"related":["get_compliance_framework_status","get_compliance_next_actions"],"idempotent":true,"annotations":{"title":"Get Compliance Training Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:read"]}]}},{"name":"list_compliance_requirements","surface":"data","description":"List the requirements of a compliance framework (or all frameworks) with their fulfillment state. Each item carries code, title, category, priority, scoping status (applicable/not_applicable/excluded), fulfillment_status (open/in_progress/ready_for_review/approved), who completed and who approved it, and whether any proof is attached (has_proof + proof_count). Filter by frameworkId, free-text q, category, status, or fulfillmentStatus.","entity":"framework_requirement","action":"list","inputSchema":{"type":"object","properties":{"frameworkId":{"description":"Scope to one framework","type":"string","maxLength":64},"q":{"description":"Free-text search over code/title/requirement text","type":"string","maxLength":200},"category":{"type":"string","maxLength":120},"status":{"description":"Scoping status filter","type":"string","enum":["applicable","not_applicable","excluded"]},"fulfillmentStatus":{"description":"Fulfillment kanban state filter","type":"string","enum":["open","in_progress","ready_for_review","approved"]},"cursor":{"description":"Opaque pagination cursor from the previous page","type":"string"},"limit":{"description":"Max items to return (default 50, max 200)","default":50,"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false},"examples":[{"description":"Open requirements of one framework","input":{"frameworkId":"fw_01HZ...","fulfillmentStatus":"open"},"output":{"items":[],"count":0}},{"description":"Everything awaiting review","input":{"fulfillmentStatus":"ready_for_review"},"output":{"items":[],"count":0}}],"related":["create_compliance_requirement","complete_compliance_requirement","review_compliance_requirement","analyze_compliance_gaps"],"idempotent":true,"annotations":{"title":"List Compliance Requirements","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:list"]}]}},{"name":"create_compliance_requirement","surface":"data","description":"Add a requirement (clause) to a compliance framework. Provide the frameworkId, a unique code within the framework (e.g. 'CC1.4'), a title, and the requirementText (the clause itself). Optionally add guidance (how to satisfy it), a category, a priority (critical/high/medium/low), and suggestedEvidence (newline-separated proof artifacts that would satisfy the clause). New requirements start 'applicable' and 'open'.","entity":"framework_requirement","action":"create","inputSchema":{"type":"object","properties":{"frameworkId":{"type":"string","minLength":1,"maxLength":64},"parentRequirementId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"code":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":300},"requirementText":{"type":"string","minLength":1,"maxLength":20000},"guidance":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"priority":{"type":"string","enum":["critical","high","medium","low"]},"status":{"type":"string","enum":["applicable","not_applicable","excluded"]},"notApplicableReason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"suggestedEvidence":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"assignedTo":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["frameworkId","code","title","requirementText"],"additionalProperties":false},"examples":[{"description":"Add a clause to a custom framework","input":{"frameworkId":"fw_01HZ...","code":"SEC-1.2","title":"Encrypt data at rest","requirementText":"All customer data stores must be encrypted at rest.","priority":"high","category":"Data protection"},"output":{"id":"req_01HZ...","code":"SEC-1.2","fulfillment_status":"open"}}],"related":["list_compliance_requirements","update_compliance_requirement","add_compliance_requirement_proof"],"idempotent":false,"annotations":{"title":"Create Compliance Requirement","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:create"]}]}},{"name":"update_compliance_requirement","surface":"data","description":"Update a framework requirement: edit its text/title/guidance/category/priority, scope it (status 'applicable' / 'not_applicable' / 'excluded' — give a notApplicableReason when scoping out), or move it between the two working fulfillment states ('open' and 'in_progress' ONLY — the schema enforces this). Reaching 'ready_for_review' requires complete_compliance_requirement, and 'approved' requires review_compliance_requirement.","entity":"framework_requirement","action":"update","inputSchema":{"type":"object","properties":{"frameworkId":{"type":"string","minLength":1,"maxLength":64},"parentRequirementId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"code":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":300},"requirementText":{"type":"string","minLength":1,"maxLength":20000},"guidance":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"priority":{"type":"string","enum":["critical","high","medium","low"]},"status":{"type":"string","enum":["applicable","not_applicable","excluded"]},"notApplicableReason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"suggestedEvidence":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"assignedTo":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"dueDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"fulfillmentStatus":{"type":"string","enum":["open","in_progress"]},"id":{"type":"string","minLength":1,"maxLength":64,"description":"The requirement ID to update"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Scope a requirement out","input":{"id":"req_01HZ...","status":"not_applicable","notApplicableReason":"No EU personal data processed"},"output":{"id":"req_01HZ...","status":"not_applicable"}},{"description":"Start working on a requirement","input":{"id":"req_01HZ...","fulfillmentStatus":"in_progress"},"output":{"id":"req_01HZ...","fulfillment_status":"in_progress"}}],"related":["list_compliance_requirements","complete_compliance_requirement","review_compliance_requirement"],"idempotent":true,"annotations":{"title":"Update Compliance Requirement","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:update"]}]}},{"name":"list_compliance_requirement_proofs","surface":"data","description":"List the proofs attached to a framework requirement (newest first). Each proof carries a note and/or a stored file's metadata (filename, mime type, size — the bytes stay in object storage). At least one proof is required before the requirement can be completed.","entity":"framework_requirement","action":"read","inputSchema":{"type":"object","properties":{"requirementId":{"type":"string","minLength":1,"maxLength":64,"description":"The requirement ID"}},"required":["requirementId"],"additionalProperties":false},"examples":[{"description":"Proofs on a requirement","input":{"requirementId":"req_01HZ..."},"output":{"proofs":[],"count":0}}],"related":["add_compliance_requirement_proof","complete_compliance_requirement"],"idempotent":true,"annotations":{"title":"List Compliance Requirement Proofs","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:read"]}]}},{"name":"add_compliance_requirement_proof","surface":"data","description":"Attach a TEXT proof (a note describing the evidence) to a framework requirement. This tool takes notes only — file bytes cannot be sent over MCP; upload file proofs through the requirement's page in the Compliance UI instead. Adding a proof to an 'open' requirement automatically moves it to 'in_progress'. An approved requirement must be reopened before proof can be added.","entity":"framework_requirement","action":"update","inputSchema":{"type":"object","properties":{"requirementId":{"type":"string","minLength":1,"maxLength":64,"description":"The requirement ID"},"note":{"type":"string","minLength":1,"maxLength":20000,"description":"The proof text — what evidence exists and where it lives"}},"required":["requirementId","note"],"additionalProperties":false},"examples":[{"description":"Record a text proof","input":{"requirementId":"req_01HZ...","note":"AES-256 at-rest encryption verified on all PG clusters — see infra audit 2026-08."},"output":{"id":"proof_01HZ...","requirement_id":"req_01HZ..."}}],"related":["list_compliance_requirement_proofs","complete_compliance_requirement"],"idempotent":false,"annotations":{"title":"Add Compliance Requirement Proof","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:update"]}]}},{"name":"complete_compliance_requirement","surface":"data","description":"Mark a framework requirement as done and submit it for review (maker side of the maker-checker workflow): moves it to 'ready_for_review'. Requires at least one proof attached — add one with add_compliance_requirement_proof first, or the call fails. A different user must then approve it via review_compliance_requirement.","entity":"framework_requirement","action":"complete","inputSchema":{"type":"object","properties":{"requirementId":{"type":"string","minLength":1,"maxLength":64,"description":"The requirement ID to complete"}},"required":["requirementId"],"additionalProperties":false},"examples":[{"description":"Submit a requirement for review","input":{"requirementId":"req_01HZ..."},"output":{"id":"req_01HZ...","fulfillment_status":"ready_for_review"}}],"related":["add_compliance_requirement_proof","review_compliance_requirement","list_compliance_requirements"],"idempotent":false,"annotations":{"title":"Complete Compliance Requirement","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:complete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:complete"]}]}},{"name":"review_compliance_requirement","surface":"data","description":"Record the review decision on a framework requirement (checker side of the maker-checker workflow). decision 'approve' moves ready_for_review → approved — FOUR-EYES ENFORCED: the approver must be a DIFFERENT user than the completer (the service rejects a self-approval with 403). decision 'request_changes' sends it back to in_progress (a note is required). decision 'reopen' moves an approved requirement back to in_progress.","entity":"framework_requirement","action":"approve","inputSchema":{"type":"object","properties":{"requirementId":{"type":"string","minLength":1,"maxLength":64,"description":"The requirement ID to review"},"decision":{"type":"string","enum":["approve","request_changes","reopen"]},"note":{"description":"Review note — REQUIRED for request_changes","type":"string","maxLength":2000}},"required":["requirementId","decision"],"additionalProperties":false},"examples":[{"description":"Approve a submitted requirement","input":{"requirementId":"req_01HZ...","decision":"approve"},"output":{"id":"req_01HZ...","fulfillment_status":"approved"}},{"description":"Send it back with feedback","input":{"requirementId":"req_01HZ...","decision":"request_changes","note":"Proof references a stale audit — attach the 2026 report."},"output":{"id":"req_01HZ...","fulfillment_status":"in_progress"}}],"related":["complete_compliance_requirement","list_compliance_requirements"],"idempotent":false,"annotations":{"title":"Review Compliance Requirement","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:approve"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:approve"]}]}},{"name":"clone_compliance_framework","surface":"data","description":"Clone a framework instance onto a new per-product instance (e.g. clone 'HIPAA — Captiva' as 'HIPAA — AccessIQ'). Copies the scoping decisions (which requirements are applicable / not applicable, with their rationales) and the control mappings onto the same shared controls. NEVER copies fulfillment progress, approvals or proofs — the clone starts its workflow from zero (copying a sign-off onto a different product would be audit fraud). Optionally set the new instance's owner and target date.","entity":"framework","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"ownerUserId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"targetDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"sourceFrameworkId":{"type":"string","minLength":1,"maxLength":64,"description":"The framework instance to clone from"}},"required":["name","sourceFrameworkId"],"additionalProperties":false},"examples":[{"description":"Clone the Captiva HIPAA instance for AccessIQ","input":{"sourceFrameworkId":"fw_01HZ...","name":"HIPAA — AccessIQ"},"output":{"frameworkId":"fw_01J0...","requirementsCloned":67,"mappingsCloned":40}}],"related":["get_compliance_framework_status","get_compliance_readiness_score"],"idempotent":false,"annotations":{"title":"Clone Compliance Framework","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:create"]}]}},{"name":"enable_compliance_framework","surface":"data","description":"Enable a compliance framework from the library catalog (DORA / GDPR / ISO27001 / NIS2 / EUAIA / SOC2 / HIPAA), seeding its requirements and pre-mapped control library. Give a per-product instance name (convention '<Framework> — <Product>', e.g. 'HIPAA — Product A') — the same catalog framework can be enabled once per product. Idempotent on (code, name) when named, else on (code, version). To create another instance FROM an existing one (inheriting its scoping), prefer clone_compliance_framework.","entity":"framework","action":"create","inputSchema":{"type":"object","properties":{"code":{"type":"string","enum":["DORA","GDPR","ISO27001","NIS2","EUAIA","SOC2","HIPAA"]},"version":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["code"],"additionalProperties":false},"examples":[{"description":"Enable HIPAA for a specific product","input":{"code":"HIPAA","name":"HIPAA — Product A"},"output":{"frameworkId":"fw_01J0...","requirementsCreated":67,"controlsCreated":31,"mappingsCreated":40}}],"related":["clone_compliance_framework","get_compliance_framework_status"],"idempotent":true,"annotations":{"title":"Enable Compliance Framework","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:create"]}]}},{"name":"update_compliance_framework","surface":"data","description":"Update a framework instance: rename it, move its lifecyclePhase (not_started/in_progress/in_review/audit/certified/on_hold/cancelled), set the ownerUserId, targetDate or certifiedUntil. Marking 'certified' requires certifiedUntil unless the framework is a regulation with no dated certificate (GDPR/HIPAA/DORA/NIS2/EUAIA). renewal_due is derived from certifiedUntil, never set.","entity":"framework","action":"update","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9_.-]{1,23}$"},"version":{"type":"string","minLength":1,"maxLength":40},"status":{"type":"string","enum":["draft","active","archived"]},"maturityLevel":{"type":"string","enum":["initial","managed","defined","measured","optimizing"]},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"authority":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"effectiveDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"nextReviewDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"lifecyclePhase":{"type":"string","enum":["not_started","in_progress","in_review","audit","certified","on_hold","cancelled"]},"certifiedUntil":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"targetDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string","minLength":1,"maxLength":64,"description":"The framework instance ID to update"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Move an instance to review","input":{"id":"fw_01HZ...","lifecyclePhase":"in_review"},"output":{"id":"fw_01HZ...","lifecyclePhase":"in_review"}},{"description":"Certify an ISO instance with its certificate validity","input":{"id":"fw_01HZ...","lifecyclePhase":"certified","certifiedUntil":"2028-06-30"},"output":{"id":"fw_01HZ...","lifecyclePhase":"certified"}}],"related":["get_compliance_framework_status","enable_compliance_framework"],"idempotent":true,"annotations":{"title":"Update Compliance Framework","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:update"]}]}},{"name":"provision_compliance_project","surface":"data","description":"Create the native project backing a framework instance: one project task per APPLICABLE requirement (due date and assignee mirrored). Idempotent — an instance that already has a project returns it unchanged. Returns { projectId, tasksCreated }.","entity":"framework","action":"update","inputSchema":{"type":"object","properties":{"frameworkId":{"type":"string","minLength":1,"maxLength":64,"description":"The framework instance ID"}},"required":["frameworkId"],"additionalProperties":false},"examples":[{"description":"Create the project for an instance","input":{"frameworkId":"fw_01HZ..."},"output":{"projectId":"p_01J0...","tasksCreated":54}}],"related":["update_compliance_framework","list_compliance_requirements"],"idempotent":true,"annotations":{"title":"Provision Compliance Project","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework:update"]}]}},{"name":"bulk_scope_compliance_requirements","surface":"data","description":"Scope a WHOLE category of a framework's requirements in one call — mark every requirement in the category applicable / not_applicable / excluded with ONE rationale (required when scoping out; e.g. 'SOC 2 Security-only scope excludes Privacy'). Recomputes readiness once. Returns { updated }.","entity":"framework_requirement","action":"update","inputSchema":{"type":"object","properties":{"frameworkId":{"type":"string","minLength":1,"maxLength":64},"category":{"type":"string","minLength":1,"maxLength":120},"status":{"type":"string","enum":["applicable","not_applicable","excluded"]},"reason":{"type":"string","maxLength":2000}},"required":["frameworkId","category","status"],"additionalProperties":false},"examples":[{"description":"Scope the Privacy category out","input":{"frameworkId":"fw_01HZ...","category":"Privacy","status":"not_applicable","reason":"Security-only scope"},"output":{"updated":12}}],"related":["update_compliance_requirement","list_compliance_requirements"],"idempotent":true,"annotations":{"title":"Bulk Scope Compliance Requirements","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:update"]}]}},{"name":"suggest_next_compliance_requirement","surface":"data","description":"Ask the compliance coach which requirement to work on NEXT for a framework instance. Prefers higher priority, in-progress over open, and quick wins (controls already mapped, one proof away from credit). Returns { requirementId, code, reason }. Credit-gated and cached — repeat calls between writes are free.","entity":"framework_requirement","action":"read","inputSchema":{"type":"object","properties":{"frameworkId":{"type":"string","minLength":1,"maxLength":64,"description":"The framework instance ID"}},"required":["frameworkId"],"additionalProperties":false},"examples":[{"description":"What should I work on next?","input":{"frameworkId":"fw_01HZ..."},"output":{"requirementId":"req_01HZ...","code":"CC6.1","reason":"Critical and already in progress."}}],"related":["get_compliance_next_actions","list_compliance_requirements"],"idempotent":true,"annotations":{"title":"Suggest Next Compliance Requirement","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:read"]}]}},{"name":"draft_compliance_na_rationale","surface":"data","description":"Draft an auditor-facing NOT APPLICABLE rationale from a requirement's own clause text (neutral placeholders where a company-specific fact is needed — never invents details). Use it to fill update_compliance_requirement's notApplicableReason after the user confirms the draft. Returns { rationale }.","entity":"framework_requirement","action":"update","inputSchema":{"type":"object","properties":{"requirementId":{"type":"string","minLength":1,"maxLength":64,"description":"The requirement ID"}},"required":["requirementId"],"additionalProperties":false},"examples":[{"description":"Draft why a privacy clause does not apply","input":{"requirementId":"req_01HZ..."},"output":{"rationale":"No EU personal data is processed by [system/scope]."}}],"related":["update_compliance_requirement","bulk_scope_compliance_requirements"],"idempotent":true,"annotations":{"title":"Draft Compliance N/A Rationale","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["framework_requirement:update"]}]}},{"name":"list_vendors","surface":"data","description":"List vendors/suppliers (the companies the workspace buys from). Filter by q (name search), status, or category. Vendors attach to deals (vendorIds) to record who is involved in delivery, and purchase orders are issued against them.","entity":"vendor","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"status":{"type":"string","enum":["active","pending","suspended","blacklisted"]},"currency":{"type":"string","minLength":3,"maxLength":3},"minRating":{"type":"number","minimum":1,"maximum":5},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Active vendors","input":{"status":"active"},"output":{"items":[]}},{"description":"Find a vendor by name","input":{"q":"acme"},"output":{"items":[]}}],"related":["get_vendor","create_vendor","list_purchase_orders"],"idempotent":true,"annotations":{"title":"List Vendors","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["vendor:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["vendor:list"]}]}},{"name":"get_vendor","surface":"data","description":"Get one vendor by id — contact details, payment terms, rating, status, certifications. Bank details and tax id are encrypted at rest and returned MASKED (\"••••1234\"); full values are never available over MCP (a person reveals them in the app, audited). Echoing a masked value back in update_vendor keeps the stored value.","entity":"vendor","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"related":["list_vendors","update_vendor"],"idempotent":true,"annotations":{"title":"Get Vendor","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["vendor:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["vendor:read"]}]}},{"name":"create_vendor","surface":"data","description":"Create a vendor/supplier. Name is required; contact info, payment terms, and category are optional.","entity":"vendor","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"contactName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","maxLength":320,"format":"email"},{"type":"null"}]},"contactPhone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"state":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":40},"country":{"type":"string","maxLength":80}},"additionalProperties":{}},"paymentTerms":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","net_90"]},"currency":{"type":"string","minLength":3,"maxLength":3},"taxId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"rating":{"anyOf":[{"type":"number","minimum":1,"maximum":5},{"type":"null"}]},"status":{"type":"string","enum":["active","pending","suspended","blacklisted"]},"certifications":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},"accountId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"bankDetails":{"anyOf":[{"type":"object","properties":{"bankName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"accountName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"accountNumber":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"iban":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"swift":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"routingNumber":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]}}},{"type":"null"}]},"vendorType":{"anyOf":[{"type":"string","enum":["supplier","manufacturer","distributor","contractor","service_provider","consultant","other"]},{"type":"null"}]},"is1099":{"type":"boolean"}},"required":["name"],"additionalProperties":false},"related":["list_vendors","update_vendor"],"idempotent":false,"annotations":{"title":"Create Vendor","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["vendor:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["vendor:create"]}]}},{"name":"update_vendor","surface":"data","description":"Update a vendor's fields (contact info, status, payment terms, rating).","entity":"vendor","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"patch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"contactName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"contactEmail":{"anyOf":[{"type":"string","maxLength":320,"format":"email"},{"type":"null"}]},"contactPhone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"address":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"state":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":40},"country":{"type":"string","maxLength":80}},"additionalProperties":{}},"paymentTerms":{"anyOf":[{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","net_90"]},{"type":"string","maxLength":40}]},"currency":{"type":"string","minLength":3,"maxLength":3},"taxId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"rating":{"anyOf":[{"type":"number","minimum":1,"maximum":5},{"type":"null"}]},"status":{"type":"string","enum":["active","pending","suspended","blacklisted"]},"certifications":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":80}},"accountId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":500,"format":"uri"},{"type":"null"}]},"bankDetails":{"anyOf":[{"type":"object","properties":{"bankName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"accountName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"accountNumber":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"iban":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"swift":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"routingNumber":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]}}},{"type":"null"}]},"vendorType":{"anyOf":[{"type":"string","enum":["supplier","manufacturer","distributor","contractor","service_provider","consultant","other"]},{"type":"null"}]},"is1099":{"type":"boolean"},"referenceNo":{"type":["string","null"]}},"additionalProperties":false}},"required":["id","patch"]},"related":["get_vendor"],"idempotent":true,"annotations":{"title":"Update Vendor","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["vendor:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["vendor:update"]}]}},{"name":"list_purchase_orders","surface":"data","description":"List purchase orders. Filter by status (draft/sent/acknowledged/partially_received/received/cancelled), vendorId, amount range, or expected-delivery date range.","entity":"purchase_order","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"status":{"type":"string","enum":["draft","sent","acknowledged","partially_received","received","cancelled"]},"vendorId":{"type":"string","maxLength":64},"currency":{"type":"string","minLength":3,"maxLength":3},"minAmount":{"type":"number","minimum":0},"maxAmount":{"type":"number","minimum":0},"expectedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expectedTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Open drafts","input":{"status":"draft"},"output":{"items":[]}},{"description":"POs for one vendor","input":{"vendorId":"01HZ..."},"output":{"items":[]}}],"related":["get_purchase_order","create_purchase_order","check_deal_inventory"],"idempotent":true,"annotations":{"title":"List Purchase Orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:list"]}]}},{"name":"get_purchase_order","surface":"data","description":"Get one purchase order by id, including its line items (description, quantity ordered/received, unit price, total).","entity":"purchase_order","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"related":["list_purchase_orders","send_purchase_order"],"idempotent":true,"annotations":{"title":"Get Purchase Order","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:read"]}]}},{"name":"create_purchase_order","surface":"data","description":"Create a purchase order (defaults to status=draft). vendorId is required. Provide `lines` (description, quantityOrdered, unitPrice, optional productId) and the total is computed server-side. Omit poNumber to auto-allocate from the tenant's reference-number template. Use after check_deal_inventory reports shortfalls to draft the restock order.","entity":"purchase_order","action":"create","inputSchema":{"type":"object","properties":{"poNumber":{"type":"string","minLength":1,"maxLength":60},"vendorId":{"type":"string","minLength":1,"maxLength":64},"requisitionId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"costCenterId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","acknowledged","partially_received","received","cancelled"]},"totalAmount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"paymentTerms":{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","net_90"]},"shippingAddress":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"state":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":40},"country":{"type":"string","maxLength":80}},"additionalProperties":{}},"expectedDeliveryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"requestedByUserId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"orderDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lines":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"productId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"description":{"type":"string","minLength":1,"maxLength":500},"quantityOrdered":{"type":"number","exclusiveMinimum":0,"maximum":9999999},"unitPrice":{"default":0,"type":"number","minimum":0,"maximum":9999999999.99},"deliveryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["description","quantityOrdered"],"additionalProperties":false}}},"required":["vendorId"],"additionalProperties":false},"examples":[{"description":"Draft a restock PO with one line","input":{"vendorId":"01HZ...","lines":[{"description":"M8 bolts (BOLT-M8)","quantityOrdered":500,"unitPrice":0.12}]},"output":{"id":"01J0...","poNumber":"PO-2026-0001","status":"draft"}}],"related":["check_deal_inventory","send_purchase_order","list_vendors"],"idempotent":false,"annotations":{"title":"Create Purchase Order","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:create"]}]}},{"name":"update_purchase_order","surface":"data","description":"Update a purchase order's header fields, or replace its `lines` (line replace is only allowed while status=draft).","entity":"purchase_order","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"patch":{"type":"object","properties":{"poNumber":{"type":"string","minLength":1,"maxLength":60},"vendorId":{"type":"string","minLength":1,"maxLength":64},"requisitionId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"costCenterId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","enum":["draft","sent","acknowledged","partially_received","received","cancelled"]},"totalAmount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"paymentTerms":{"anyOf":[{"type":"string","enum":["due_on_receipt","net_7","net_15","net_30","net_45","net_60","net_90"]},{"type":"string","maxLength":40}]},"shippingAddress":{"type":"object","properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":120},"state":{"type":"string","maxLength":120},"postalCode":{"type":"string","maxLength":40},"country":{"type":"string","maxLength":80}},"additionalProperties":{}},"expectedDeliveryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"requestedByUserId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"orderDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"lines":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"productId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"description":{"type":"string","minLength":1,"maxLength":500},"quantityOrdered":{"type":"number","exclusiveMinimum":0,"maximum":9999999},"unitPrice":{"default":0,"type":"number","minimum":0,"maximum":9999999999.99},"deliveryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["description","quantityOrdered"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","patch"]},"related":["get_purchase_order"],"idempotent":true,"annotations":{"title":"Update Purchase Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:update"]}]}},{"name":"send_purchase_order","surface":"data","description":"Send a draft purchase order to the vendor (draft → sent). Destructive in the sense that lines freeze after sending.","entity":"purchase_order","action":"send","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"related":["approve_purchase_order","cancel_purchase_order"],"idempotent":true,"annotations":{"title":"Send Purchase Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:send"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:send"]}]}},{"name":"approve_purchase_order","surface":"data","description":"Mark a sent purchase order as acknowledged by the vendor (sent → acknowledged).","entity":"purchase_order","action":"approve","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"related":["send_purchase_order"],"idempotent":true,"annotations":{"title":"Approve Purchase Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:approve"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:approve"]}]}},{"name":"cancel_purchase_order","surface":"data","description":"Cancel a purchase order (allowed from draft/sent/acknowledged/partially_received).","entity":"purchase_order","action":"cancel","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"related":["get_purchase_order"],"idempotent":true,"annotations":{"title":"Cancel Purchase Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:cancel"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["purchase_order:cancel"]}]}},{"name":"list_inventory_items","surface":"data","description":"List inventory stock records (per product per warehouse): quantity on hand, reserved, available, reorder point, safety stock, ABC class. Filter by productId or warehouseId to answer \"how many X do we have\".","entity":"inventory_item","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"productId":{"type":"string","maxLength":64},"warehouseId":{"type":"string","maxLength":64},"binId":{"type":"string","maxLength":64},"abcClass":{"type":"string","enum":["A","B","C"]},"expiringFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expiringTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"belowReorder":{"type":"boolean"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Stock for one product","input":{"productId":"01HZ..."},"output":{"items":[]}}],"related":["get_inventory_item","list_warehouses","check_deal_inventory"],"idempotent":true,"annotations":{"title":"List Inventory Items","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["inventory_item:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["inventory_item:list"]}]}},{"name":"get_inventory_item","surface":"data","description":"Get one inventory stock record by id (quantities, location, lot/serial, expiry).","entity":"inventory_item","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"related":["list_inventory_items"],"idempotent":true,"annotations":{"title":"Get Inventory Item","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["inventory_item:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["inventory_item:read"]}]}},{"name":"list_warehouses","surface":"data","description":"List warehouses (name, code, type, capacity, active).","entity":"warehouse","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"type":{"type":"string","enum":["warehouse","store","vehicle","virtual"]},"active":{"type":"boolean"},"managerUserId":{"type":"string","maxLength":64},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"related":["list_inventory_items"],"idempotent":true,"annotations":{"title":"List Warehouses","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["warehouse:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["warehouse:list"]}]}},{"name":"get_product_components","surface":"data","description":"Get a catalog item's bill of materials: the inventory components one sold unit consumes (component product, quantity per unit) plus each component's live available stock. Empty means selling the item needs no warehouse parts and deal inventory checks skip it.","entity":"product","action":"read","inputSchema":{"type":"object","properties":{"productId":{"type":"string","minLength":1}},"required":["productId"]},"related":["set_product_components","check_deal_inventory","get_product"],"idempotent":true,"annotations":{"title":"Get Product Components","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["product:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["product:read"]}]}},{"name":"set_product_components","surface":"data","description":"Replace a catalog item's bill of materials. Each component is {componentProductId, quantityPerUnit}; component products should be inventory-tracked catalog products. Proper setup: create the part as its own catalog product with track_inventory=true (or warehouse inventory_items rows), then attach it here with how many units one sold unit of the parent consumes. This is what powers the deal-level inventory sufficiency check and draft-PO suggestions.","entity":"product","action":"update","inputSchema":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"components":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"componentProductId":{"type":"string","minLength":1},"quantityPerUnit":{"type":"number","exclusiveMinimum":0},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"sortOrder":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["componentProductId","quantityPerUnit"],"additionalProperties":false}}},"required":["productId","components"],"additionalProperties":false},"examples":[{"description":"A rack bundle consumes 4 rails and 16 bolts per unit","input":{"productId":"01HZ...","components":[{"componentProductId":"01J1...","quantityPerUnit":4},{"componentProductId":"01J2...","quantityPerUnit":16}]},"output":{"items":[]}}],"related":["get_product_components","check_deal_inventory"],"idempotent":true,"annotations":{"title":"Set Product Components","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["product:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["product:update"]}]}},{"name":"check_deal_inventory","surface":"data","description":"Inventory sufficiency check for a deal: for every line item whose catalog product has bill-of-materials components, compare required quantity (line qty × quantity per unit) against available stock and report per-component shortfalls. Returns applicable=false when no line item carries components — say so and stop. When shortfalls exist, offer to draft a purchase order (create_purchase_order with the shortfall lines) so the stock arrives before the deal closes.","entity":"deal","action":"read","inputSchema":{"type":"object","properties":{"dealId":{"type":"string","minLength":1}},"required":["dealId"]},"examples":[{"description":"Check a deal before pushing it to closed-won","input":{"dealId":"01HZ..."},"output":{"applicable":true,"sufficient":false,"components":[{"componentName":"M8 bolts","requiredQuantity":320,"availableQuantity":100,"shortfall":220}]}}],"related":["create_purchase_order","get_product_components","list_inventory_items"],"idempotent":true,"annotations":{"title":"Check Deal Inventory","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["deal:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["deal:read"]}]}},{"name":"list_surveys","surface":"data","description":"List customer-satisfaction surveys (CSAT/NPS/CES/custom templates). Filter by q (name search), surveyType, or isActive. Each survey carries its question set, response count, and average score.","entity":"survey","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"surveyType":{"type":"string","enum":["csat","nps","ces","custom"]},"isActive":{"type":"boolean"},"accountId":{"type":"string","maxLength":64},"projectId":{"type":"string","maxLength":64},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Active NPS surveys","input":{"surveyType":"nps","isActive":true},"output":{"items":[]}},{"description":"Find a survey by name","input":{"q":"onboarding"},"output":{"items":[]}}],"related":["get_survey","create_survey","send_survey","list_survey_responses"],"idempotent":true,"annotations":{"title":"List Surveys","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["survey:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["survey:list"]}]}},{"name":"get_survey","surface":"data","description":"Get one survey by id — full question set, settings, trigger, response count, and average score.","entity":"survey","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"related":["list_surveys","send_survey","list_survey_responses"],"idempotent":true,"annotations":{"title":"Get Survey","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["survey:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["survey:read"]}]}},{"name":"create_survey","surface":"data","description":"Create a satisfaction survey. Requires name and 1–50 questions (types: nps, rating, scale, single_choice, multi_choice, text, textarea, yes_no, emoji; choice questions need options [{value,label}]). Optional thankYouMessage, settings, triggerOn.","entity":"survey","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"surveyType":{"default":"csat","type":"string","enum":["csat","nps","ces","custom"]},"questions":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"label":{"type":"string","minLength":1,"maxLength":500},"helpText":{"type":"string","maxLength":500},"type":{"type":"string","enum":["nps","rating","scale","single_choice","multi_choice","text","textarea","yes_no","emoji"]},"required":{"default":true,"type":"boolean"},"options":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":200},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minLabel":{"type":"string","maxLength":120},"maxLabel":{"type":"string","maxLength":120},"allowComment":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false}},"thankYouMessage":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"settings":{"type":"object","properties":{"notificationLocale":{"type":"string","enum":["en","de","fr","es"]},"notificationEmails":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":254,"format":"email"}},"anonymous":{"type":"boolean"},"access":{"type":"string","enum":["public","internal"]},"showProgress":{"type":"boolean"},"showLogo":{"type":"boolean"},"accentColor":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"logoUrl":{"type":"string","maxLength":2000,"format":"uri"},"ticketIntake":{"type":"object","properties":{"enabled":{"type":"boolean"},"fieldMap":{"default":{},"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string","minLength":1,"maxLength":64},"requesterName":{"type":"string","minLength":1,"maxLength":64},"requesterEmail":{"type":"string","minLength":1,"maxLength":64},"priority":{"type":"string","minLength":1,"maxLength":64},"category":{"type":"string","minLength":1,"maxLength":64},"ticketType":{"type":"string","minLength":1,"maxLength":64}},"additionalProperties":false},"defaults":{"default":{},"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","medium","low"]},"ticketType":{"type":"string","enum":["question","problem","feature_request","incident","task"]},"category":{"type":"string","maxLength":120},"queueId":{"type":"string","minLength":1,"maxLength":128},"assigneeId":{"type":"string","minLength":1,"maxLength":128},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"additionalProperties":false},"notifyUserIds":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}}},"required":["enabled"],"additionalProperties":false},"embedEnabled":{"type":"boolean"},"embedOrigins":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":200,"format":"uri"}},"redirectUrl":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false},"triggerOn":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"isActive":{"default":true,"type":"boolean"},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"accountId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["name","questions"],"additionalProperties":false},"related":["list_surveys","send_survey"],"idempotent":false,"annotations":{"title":"Create Survey","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["survey:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["survey:create"]}]}},{"name":"send_survey","surface":"data","description":"Send a survey to up to 200 recipients by email. Each recipient gets a personal single-use fill link that expires after expiresInDays (default 30). Returns counts of sent/failed plus the invites. To send a form to an employee, pass sourceEntityType 'employee' + sourceEntityId and OMIT recipients — the recipient is resolved server-side from the employee's on-file email (fails if none is on file).","entity":"survey","action":"send","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"send":{"type":"object","properties":{"recipients":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"name":{"type":"string","maxLength":200},"accountId":{"type":"string","maxLength":64},"contactId":{"type":"string","maxLength":64}},"required":["email"],"additionalProperties":false}},"expiresInDays":{"default":30,"type":"integer","minimum":1,"maximum":365},"subject":{"type":"string","maxLength":200},"message":{"type":"string","maxLength":2000},"dealId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"sourceEntityType":{"type":"string","enum":["account","contact","deal","project","ticket","employee"]},"sourceEntityId":{"type":"string","minLength":1,"maxLength":64}},"additionalProperties":false}},"required":["id","send"]},"examples":[{"description":"Send to one customer contact","input":{"id":"01HZ...","send":{"recipients":[{"email":"jane@acme.com","name":"Jane"}]}},"output":{"sent":1,"failed":0,"invites":[]}}],"related":["get_survey","list_survey_responses"],"idempotent":false,"annotations":{"title":"Send Survey","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["survey:send"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["survey:send"]}]}},{"name":"list_survey_responses","surface":"data","description":"List survey responses (feedback). Filter by surveyId or q (respondent email / comment search). Each response carries the raw answers, the derived 1–5 score, and the NPS score where applicable.","entity":"feedback","action":"list","inputSchema":{"type":"object","properties":{"surveyId":{"type":"string","maxLength":64},"accountId":{"type":"string","maxLength":64},"contactId":{"type":"string","maxLength":64},"dealId":{"type":"string","maxLength":64},"projectId":{"type":"string","maxLength":64},"ticketId":{"type":"string","maxLength":64},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"q":{"type":"string","maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Responses for one survey","input":{"surveyId":"01HZ..."},"output":{"items":[]}}],"related":["list_surveys","get_survey"],"idempotent":true,"annotations":{"title":"List Survey Responses","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["feedback:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["feedback:list"]}]}},{"name":"get_survey_summary","surface":"data","description":"NPS and CSAT summary across survey responses, computed server-side over ALL responses: NPS score (% promoters 9–10 minus % detractors 0–6, −100..100) with promoter/passive/detractor counts, the average CSAT (1–5), response totals, and a per-survey breakdown. Optional surveyId or surveyType (csat|nps|ces|custom) filters. Use for 'what is our NPS?' / 'how satisfied are customers?' — never count list_survey_responses pages.","entity":"feedback","action":"list","inputSchema":{"type":"object","properties":{"surveyId":{"type":"string","minLength":1,"maxLength":64},"surveyType":{"type":"string","enum":["csat","nps","ces","custom"]}},"additionalProperties":false},"examples":[{"description":"NPS and CSAT across all surveys","input":{},"output":{"responses":1,"nps":{"score":100}}}],"related":["list_surveys","list_survey_responses"],"idempotent":true,"annotations":{"title":"Get Survey Summary","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["feedback:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["feedback:list"]}]}},{"name":"query_knowledge_hub","surface":"data","description":"Search the knowledge hubs the caller can access (personal notes, shared department hubs, authored SOP pages, and the read-only System product-knowledge hub). Each result carries a `citation` object (sourceItemId, title, sourceType, and — for authored SOP pages — pageId/blockId/sourceItemIds) identifying the source doc, page, or transcript the hit came from. ALWAYS cite the citation's title (and note it's from the knowledge base) when using a result in an answer. Optionally restrict to specific hub ids; inaccessible ids are silently dropped. Optionally restrict the search to a single knowledge base by name or id via `hub` — if the name doesn't match exactly one accessible hub, no search runs and the accessible hub names are listed instead so you can retry.","entity":"kb_hub_item","action":"list","inputSchema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500},"hubIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"hub":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":10,"type":"integer","minimum":1,"maximum":25}},"required":["query"],"additionalProperties":false},"examples":[{"description":"Product how-to question","input":{"query":"how do I create a quote from a deal"},"output":{"count":1,"results":[{"itemId":"01HZ...","hubId":"01HZ...","title":"Creating a quote","snippet":"From the deal page, click Quotes → New Quote…","score":0.82,"entityType":"kb_page_block","citation":{"sourceItemId":"01HZ...","title":"Creating a quote","sourceType":"authored","pageId":"01HZ..."}}]}},{"description":"Scoped to one hub by id","input":{"query":"onboarding checklist","hubIds":["01HZ..."]},"output":{"count":0,"results":[]}},{"description":"Scoped to one hub by name","input":{"query":"onboarding checklist","hub":"Sales Ops"},"output":{"count":0,"results":[]}}],"related":["save_to_knowledge_hub"],"idempotent":true,"annotations":{"title":"Query Knowledge Hub","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["kb_hub_item:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["kb_hub_item:list"]}]}},{"name":"save_to_knowledge_hub","surface":"data","description":"Save a knowledge note into a hub. Omit hubId to save into the caller's private Personal Knowledge hub (provisioned on demand). Named hubs require write access; the System hub is read-only and always rejects writes. Content is vectorized for retrieval automatically.","entity":"kb_hub_item","action":"create","inputSchema":{"type":"object","properties":{"hubId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":1,"maxLength":2000000},"tags":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"sourceType":{"default":"manual","type":"string","enum":["manual","upload","transcript"]},"sourceRef":{"type":"string","maxLength":500},"objectKey":{"type":"string","maxLength":500},"mimeType":{"type":"string","maxLength":120},"byteSize":{"type":"integer","minimum":0,"maximum":9007199254740991},"originalFilename":{"type":"string","maxLength":300},"status":{"type":"string","enum":["processing","ready","failed"]}},"required":["title","content"],"additionalProperties":false},"examples":[{"description":"Remember a note privately","input":{"title":"Renewal gotcha","content":"Acme renews in Q3 — loop in legal early."},"output":{"id":"01HZ..."}}],"related":["query_knowledge_hub"],"annotations":{"title":"Save To Knowledge Hub","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["kb_hub_item:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["kb_hub_item:create"]}]}},{"name":"discover_workflow_knowledge","surface":"data","description":"Find at most five currently authorized indexed sources relevant to an exact built workflow ID and optional accessible record. Deterministic, no model call. Cite source title, relationship and freshness; a relevance match is not an established record link. Unknown or disabled workflows fail closed.","entity":"kb_hub","action":"list","inputSchema":{"type":"object","properties":{"workflowId":{"type":"string","minLength":1,"maxLength":80},"recordType":{"type":"string","enum":["deal","project","account","contact","ticket"]},"recordId":{"type":"string","minLength":1,"maxLength":160},"limit":{"type":"integer","minimum":1,"maximum":5}},"required":["workflowId"],"additionalProperties":false},"idempotent":true,"annotations":{"title":"Discover Workflow Knowledge","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["kb_hub:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["kb_hub:list"]}]}},{"name":"review_workflow_evidence","surface":"data","description":"Generate a bounded, credit-metered review of current authorized workflow evidence only when the user requests an AI review. Include connected inbox excerpts only when explicitly requested for an accessible anchored record. Returns cited observations, uncertainty and proposed next steps. This tool never changes records, approves actions or sends messages. Evidence may be insufficient or partially unavailable.","entity":"ai_call","action":"create","scope":"llm:chat","inputSchema":{"type":"object","properties":{"workflowId":{"type":"string","minLength":1,"maxLength":80},"recordType":{"type":"string","enum":["deal","project","account","contact","ticket"]},"recordId":{"type":"string","minLength":1,"maxLength":160},"limit":{"type":"integer","minimum":1,"maximum":5},"includeConnected":{"type":"boolean"}},"required":["workflowId"],"additionalProperties":false},"idempotent":false,"annotations":{"title":"Review Workflow Evidence","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create","llm:chat"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ai_call:create","llm:chat"]}]}},{"name":"list_work_orders","surface":"data","description":"List field-service work orders. Filter by status (the tenant's own pipeline stage keys — the seed pipeline is new/scheduled/dispatched/en_route/on_site/in_progress/completed/cancelled), priority (emergency/high/normal/low), accountId, technicianId (\"me\" for the caller, or the technician's user OR employee id — both id spaces match), or a scheduled-date range. Cursor pagination, max 500/page.","entity":"work_order","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"status":{"type":"string","minLength":1,"maxLength":80},"priority":{"type":"string","enum":["emergency","high","normal","low"]},"accountId":{"type":"string","maxLength":64},"projectId":{"type":"string","maxLength":64},"locationId":{"type":"string","maxLength":64},"recordTypeId":{"type":"string","maxLength":64},"technicianId":{"type":"string","maxLength":64},"scheduledFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"scheduledTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Open work orders for an account","input":{"accountId":"01HZ...","status":"scheduled"},"output":{"items":[]}}],"related":["get_work_order","create_work_order","list_accounts"],"idempotent":true,"annotations":{"title":"List Work Orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["work_order:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:list"]}]}},{"name":"get_work_order","surface":"data","description":"Get a single work order by ID with full detail (status, priority, assigned technician, schedule, location, parts, costs).","entity":"work_order","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fetch a work order","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["list_work_orders","update_work_order","assign_work_order","list_attachments"],"idempotent":true,"annotations":{"title":"Get Work Order","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["work_order:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:read"]}]}},{"name":"create_work_order","surface":"data","description":"Create a new work order. Required: title (short name of the job, e.g. 'Boiler service'), accountId, locationId, priority. orderNumber is auto-allocated from the tenant's numbering pattern (e.g. WO-0001) when omitted; status defaults to the pipeline's first stage. Optional: description (what the customer reported and what needs doing — the work order's single description field), referenceNo (customer's reference, unique), customerPoNumber, assetId, contactId, workOrderTypeId, status, scheduling (scheduledDate, scheduledTimeStart/End, arrivalWindowStart/End), assignedTechnicianId, location coordinates, costs (laborCost/partsCost/totalCost), amount/currency, tags, customFields.","entity":"work_order","action":"create","inputSchema":{"type":"object","properties":{"orderNumber":{"type":"string","maxLength":60},"referenceNo":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":200},"accountId":{"type":"string","minLength":1,"maxLength":64},"contactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"commercialTermsSnapshotId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"workOrderTypeId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","minLength":1,"maxLength":80},"priority":{"type":"string","enum":["emergency","high","normal","low"]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"locationLat":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"locationLng":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"scheduledDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"scheduledTimeStart":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"scheduledTimeEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"assignedTechnicianId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"estimatedDurationMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}]},"actualDurationMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}]},"arrivalTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completionTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"partsUsed":{"maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"laborCost":{"type":"number","minimum":0,"maximum":9999999999.99},"partsCost":{"type":"number","minimum":0,"maximum":9999999999.99},"totalCost":{"type":"number","minimum":0,"maximum":9999999999.99},"invoiceId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"customerPoNumber":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"problemDescription":{"description":"DEPRECATED alias of description — merged into it. Send description instead.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"resolution":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"arrivalWindowStart":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"arrivalWindowEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"locationId":{"type":"string","minLength":1,"maxLength":64},"pipelineId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"primaryQuoteId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"amount":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.99},{"type":"null"}]},"currency":{"type":"string","maxLength":3},"recordTypeId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"sourceWarehouseId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"shipToLine1":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"shipToLine2":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"shipToCity":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shipToState":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shipToPostalCode":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"shipToCountry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["title","accountId","priority","locationId"],"additionalProperties":false},"examples":[{"description":"Create an emergency work order","input":{"title":"HVAC unit down","accountId":"01HZ...","locationId":"01HZ...","priority":"emergency","description":"Rooftop unit not cooling; tenant reports alarm"},"output":{"id":"01HZ..."}}],"related":["update_work_order","assign_work_order","list_work_orders"],"annotations":{"title":"Create Work Order","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:create"]}]}},{"name":"update_work_order","surface":"data","description":"Partial update of a work order. Only provided fields are changed; omitted fields are untouched (title may be set but not blanked). Use assign_work_order to dispatch a technician and approve_work_order to approve a completed order.","entity":"work_order","action":"update","inputSchema":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1,"maxLength":60},"referenceNo":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":200},"accountId":{"type":"string","minLength":1,"maxLength":64},"contactId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"commercialTermsSnapshotId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"workOrderTypeId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"status":{"type":"string","minLength":1,"maxLength":80},"priority":{"type":"string","enum":["emergency","high","normal","low"]},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"locationLat":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"locationLng":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]},"scheduledDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"scheduledTimeStart":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"scheduledTimeEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"assignedTechnicianId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"estimatedDurationMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}]},"actualDurationMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}]},"arrivalTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completionTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"partsUsed":{"maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"laborCost":{"type":"number","minimum":0,"maximum":9999999999.99},"partsCost":{"type":"number","minimum":0,"maximum":9999999999.99},"totalCost":{"type":"number","minimum":0,"maximum":9999999999.99},"invoiceId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"customerPoNumber":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"problemDescription":{"description":"DEPRECATED alias of description — merged into it. Send description instead.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"resolution":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"assetId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"arrivalWindowStart":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"arrivalWindowEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"locationId":{"type":"string","minLength":1,"maxLength":64},"pipelineId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"primaryQuoteId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"amount":{"anyOf":[{"type":"number","minimum":0,"maximum":9999999999.99},{"type":"null"}]},"currency":{"type":"string","maxLength":3},"recordTypeId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"sourceWarehouseId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"shipToLine1":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"shipToLine2":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"shipToCity":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shipToState":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"shipToPostalCode":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"shipToCountry":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Update the description","input":{"id":"01HZ...","description":"Replaced compressor"},"output":{"id":"01HZ..."}}],"related":["get_work_order","assign_work_order","approve_work_order"],"idempotent":true,"annotations":{"title":"Update Work Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:update"]}]}},{"name":"delete_work_order","surface":"data","description":"Soft-delete a work order by ID. Removed from dispatch boards and lists but retained for audit. Returns the deleted record id.","entity":"work_order","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Soft-delete a work order","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_work_order"],"idempotent":true,"annotations":{"title":"Delete Work Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:delete"]}]}},{"name":"assign_work_order","surface":"data","description":"Dispatch a technician to a work order. Requires technicianId — the technician's USER id (users.id, the same id assigned_technician_id stores; NOT a technicians-profile id); optionally sets scheduledTimeStart/End. The work order must be in an OPEN stage of its pipeline; an order still in the pipeline's first open stage advances to the next open stage (the seed pipeline's 'new' → 'scheduled').","entity":"work_order","action":"assign","inputSchema":{"type":"object","properties":{"technicianId":{"type":"string","minLength":1,"maxLength":64},"scheduledTimeStart":{"type":"string","format":"date-time"},"scheduledTimeEnd":{"type":"string","format":"date-time"},"id":{"type":"string"}},"required":["technicianId","id"],"additionalProperties":false},"examples":[{"description":"Assign a technician","input":{"id":"01HZ...","technicianId":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["get_work_order","update_work_order"],"idempotent":true,"annotations":{"title":"Assign Work Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:assign"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:assign"]}]}},{"name":"schedule_work_order","surface":"data","description":"Book a work order on a scheduling calendar: creates (or, when the order already has exactly ONE appointment, MOVES) its linked appointment, assigns the technician (assigneeEmployeeId — a resource of that calendar), and stamps the order's scheduledDate / scheduledTimeStart / scheduledTimeEnd + assignedTechnicianId. Timed booking: startsAt (+ endsAt or durationMinutes; default duration = the order's estimatedDurationMinutes → its type's default → 60 min). Day-only booking: flexibleTime=true + date (YYYY-MM-DD) books the technician for the whole day as an all-day appointment with autoSchedule=true — route optimization sets the time later; the order keeps the date and no times. Appointment and work order stay in sync afterwards (moving one moves the other).","entity":"work_order","action":"update","inputSchema":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1,"maxLength":64},"assigneeEmployeeId":{"type":"string","minLength":1,"maxLength":64},"assigneeUserId":{"type":"string","minLength":1,"maxLength":64},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"durationMinutes":{"type":"integer","exclusiveMinimum":0,"maximum":1440},"flexibleTime":{"type":"boolean"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"existingEventId":{"type":"string","minLength":1,"maxLength":64},"id":{"type":"string"}},"required":["calendarId","id"],"additionalProperties":false},"examples":[{"description":"Book a technician for a day and let the route set the time","input":{"id":"01HZ...","calendarId":"cal_...","assigneeEmployeeId":"emp_...","flexibleTime":true,"date":"2026-10-09"},"output":{"id":"01HZ...","scheduledDate":"2026-10-09","scheduledTimeStart":null,"appointmentId":"ev_..."}},{"description":"Book a 2-hour slot","input":{"id":"01HZ...","calendarId":"cal_...","assigneeEmployeeId":"emp_...","startsAt":"2026-10-09T14:00:00Z","durationMinutes":120},"output":{"id":"01HZ...","appointmentId":"ev_..."}}],"related":["get_work_order","list_calendars","list_calendar_resources","get_calendar_availability","update_calendar_event"],"annotations":{"title":"Schedule Work Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:update"]}]}},{"name":"approve_work_order","surface":"data","description":"Approve a completed work order (records approver + approval timestamp).","entity":"work_order","action":"approve","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Approve a work order","input":{"id":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["get_work_order"],"idempotent":true,"annotations":{"title":"Approve Work Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:approve"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:approve"]}]}},{"name":"optimize_service_route","surface":"data","description":"Order one technician's work orders for one day into the most efficient driving route, with arrival/departure ETAs. NOTE: technicianId here is the technician PROFILE id (technicians.id), not the user id list_work_orders and assign_work_order take — the planner resolves the profile's user_id to find the day's orders. Objectives: 'time' (fastest day), 'distance' (fewest km), 'fuel' (cheapest — weights each leg by its average speed, so it prefers a longer motorway leg over a shorter crawl through town, plus the technician's hourly rate). pinnedWorkOrderIds are visited FIRST, in exactly the order listed, and the rest are sequenced around them. Work orders with no coordinates are returned in `unlocatable` rather than dropped. Set persist:false to preview a plan without saving it — useful for comparing objectives before committing.","entity":"service_route","action":"optimize","inputSchema":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"technicianId":{"type":"string","minLength":1},"objective":{"default":"time","type":"string","enum":["time","distance","fuel"]},"vehicle":{"default":"car","type":"string","enum":["car","van","truck","bike"]},"pinnedWorkOrderIds":{"default":[],"maxItems":60,"type":"array","items":{"type":"string","minLength":1}},"returnToStart":{"default":true,"type":"boolean"},"dayStart":{"default":"08:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"fuelPricePerLitre":{"type":"number","exclusiveMinimum":0,"maximum":100},"persist":{"default":true,"type":"boolean"}},"required":["date","technicianId"]},"examples":[{"description":"Fastest route for a technician's Thursday","input":{"date":"2026-08-20","technicianId":"tech_1","objective":"time"},"output":{"stops":[],"totalDistanceKm":0}},{"description":"Cheapest route with the depot visit locked first, preview only","input":{"date":"2026-08-20","technicianId":"tech_1","objective":"fuel","pinnedWorkOrderIds":["wo_depot"],"persist":false},"output":{"stops":[],"improvementPercent":0}}],"related":["list_work_orders","get_work_order","build_calendar_route"],"idempotent":false,"annotations":{"title":"Optimize Service Route","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["service_route:optimize"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["service_route:optimize"]}]}},{"name":"build_calendar_route","surface":"data","description":"Route the SCHEDULING-CALENDAR appointments of one person over a day, week or month — the Route Builder. Use this when the stops are calendar appointments; use optimize_service_route when the stops are work orders. Pick a calendar, a person on that calendar's booking allow-list, and a period; each calendar day is solved separately. `instructions` is plain English folded into the sequencing (\"finish near the depot\", \"the Hafenstrasse job closes at 13:00\") — when it is present the order is chosen with the model's help, when it is absent the distance solver answers alone. To CHANGE a plan already on screen, send `adjustment` (the requested change, in plain English) plus `currentOrder` (a map of date -> ordered event ids); everything else is kept as close to the current plan as the request allows. Every distance, duration and ETA is recomputed from real road data — the model only picks an order, never a number. Appointments with no client, no site, or an address that cannot be placed on a map are EXCLUDED from the route and returned in `unroutable`, each naming what to fix — always tell the user about them; the route is not complete while that list is non-empty. `travelMode: \"bike\"` routes on the cycling network (car is the default). For ONE person's day with flexible appointment times, prefer get_day_route / optimize_day_route. Set persist:false to preview without saving.","entity":"service_route","action":"optimize","inputSchema":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1,"maxLength":64},"assigneeUserId":{"type":"string","minLength":1,"maxLength":64},"anchorDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"period":{"default":"day","type":"string","enum":["day","week","month"]},"objective":{"default":"time","type":"string","enum":["time","distance","fuel"]},"vehicle":{"default":"car","type":"string","enum":["car","van","truck","bike"]},"dayStart":{"default":"08:00","type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"returnToStart":{"default":true,"type":"boolean"},"fuelPricePerLitre":{"type":"number","exclusiveMinimum":0,"maximum":100},"preferences":{"default":{},"type":"object","properties":{"avoidTolls":{"type":"boolean"},"avoidHighways":{"type":"boolean"},"respectAppointmentTimes":{"type":"boolean"},"clusterByArea":{"type":"boolean"},"minimiseOvertime":{"type":"boolean"},"balanceWorkload":{"type":"boolean"}},"additionalProperties":false},"instructions":{"type":"string","maxLength":2000},"adjustment":{"type":"string","maxLength":2000},"currentOrder":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"additionalProperties":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}}},"travelMode":{"type":"string","enum":["car","bike"]},"persist":{"default":true,"type":"boolean"}},"required":["calendarId","assigneeUserId","anchorDate"]},"examples":[{"description":"Route Tuesday for one field engineer, fastest first","input":{"calendarId":"cal_field","assigneeUserId":"usr_7","anchorDate":"2026-08-18","period":"day"},"output":{"days":[],"totalStops":0}},{"description":"A whole week, cheapest to run, with a dispatcher constraint","input":{"calendarId":"cal_field","assigneeUserId":"usr_7","anchorDate":"2026-08-18","period":"week","objective":"fuel","instructions":"Keep the two Rotterdam sites on the same day and end each day near the depot.","persist":false},"output":{"days":[],"aiUsed":true}}],"related":["optimize_service_route","list_calendars","list_calendar_events","list_calendar_allowed_users","get_day_route"],"idempotent":false,"annotations":{"title":"Build Calendar Route","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["service_route:optimize"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["service_route:optimize"]}]}},{"name":"get_day_route","surface":"data","description":"One person's day as booked — the Routes page. `person` is \"me\" (default), an employee id or a user id; `date` (YYYY-MM-DD) defaults to their local today; `calendarId` defaults to their calendar with the most appointments that day; `travelMode` is car (default) or bike. Returns `timed` (appointments in booked order with the real drive/cycle ETA and minutes late), `untimed` (flexible all-day bookings with no time yet), `unroutable` (no client/site/address — name the fix), `unbookedWorkOrders` (assigned for the day but with no appointment; null when the caller cannot list work orders) and `route` (total travel minutes/km; `estimated:true` means straight-line estimates, not road times — say so). Use this to answer \"what's my route today\" or \"where is Dana going this afternoon\". Read-only.","entity":"service_route","action":"list","inputSchema":{"type":"object","properties":{"person":{"default":"me","type":"string","minLength":1,"maxLength":64},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"calendarId":{"type":"string","minLength":1,"maxLength":64},"travelMode":{"default":"car","type":"string","enum":["car","bike"]},"dayStart":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"additionalProperties":false},"examples":[{"description":"My route today","input":{"person":"me"},"output":{"timed":[],"untimed":[],"route":{"totalTravelMinutes":0}}},{"description":"Dana's day on a bike, tomorrow","input":{"person":"emp_7","date":"2026-10-08","travelMode":"bike"},"output":{"timed":[]}}],"related":["optimize_day_route","apply_day_route","build_calendar_route","list_work_orders"],"idempotent":true,"annotations":{"title":"Get Day Route","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["service_route:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["service_route:list"]}]}},{"name":"optimize_day_route","surface":"data","description":"Optimize one person's day by car or bike and return a PROPOSAL (nothing is written). Fixed appointments keep their booked time; flexible ones (auto-schedule, including all-day \"no time yet\" bookings) get new times in the best order from the day start. The order is planned by the AI from real travel times and validated against a deterministic optimizer (it is kept only when it is within 5% of the optimizer's drive time and makes no fixed appointment late). Returns `before`/`after` travel totals, `savedTravelMinutes`, each stop's `currentStartsAt` → `proposedStartsAt`, `timeChanges` (will be written on apply), `fixedWouldMove` (a fixed appointment this route reaches late), and `id`. Show the user the change and the time saved, then call apply_day_route only when they confirm. The proposal expires after 30 minutes.","entity":"service_route","action":"optimize","inputSchema":{"type":"object","properties":{"person":{"default":"me","type":"string","minLength":1,"maxLength":64},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"calendarId":{"type":"string","minLength":1,"maxLength":64},"travelMode":{"default":"car","type":"string","enum":["car","bike"]},"dayStart":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"additionalProperties":false},"examples":[{"description":"Optimize my day by bike","input":{"person":"me","travelMode":"bike"},"output":{"id":"…","savedTravelMinutes":18,"stops":[]}}],"related":["get_day_route","apply_day_route"],"idempotent":false,"annotations":{"title":"Optimize Day Route","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["service_route:optimize"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["service_route:optimize"]}]}},{"name":"apply_day_route","surface":"data","description":"Apply a proposal from optimize_day_route: writes the new times to the calendar (each through the normal appointment update, so linked work orders move with them) and saves the day's route. Only flexible appointments change unless `moveFixed: true`, which also moves fixed appointments the route reaches late — ONLY set it when the user explicitly agreed to move committed appointments. Fails with 409 if any appointment changed since the proposal (propose again). Per-appointment failures come back in `failed`. Requires the user's confirmation — this changes their calendar.","entity":"service_route","action":"optimize","inputSchema":{"type":"object","properties":{"moveFixed":{"default":false,"type":"boolean"},"proposalId":{"type":"string","minLength":1,"maxLength":64}},"required":["proposalId"],"additionalProperties":false},"examples":[{"description":"Apply after the user said yes","input":{"proposalId":"6f1c…","moveFixed":false},"output":{"updated":[],"failed":[]}}],"related":["optimize_day_route","get_day_route"],"idempotent":false,"annotations":{"title":"Apply Day Route","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["service_route:optimize"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["service_route:optimize"]}]}},{"name":"list_shipments","surface":"data","description":"List outbound shipments (parcels/freight sent to customers). Filter by accountId (the customer), workOrderId (the fulfillment work order it delivers), status (e.g. label_created / in_transit / delivered), or carrierId. Use q to search shipment number or tracking number.","entity":"shipment","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"accountId":{"type":"string","maxLength":200},"workOrderId":{"type":"string","maxLength":200},"locationId":{"type":"string","maxLength":200},"status":{"type":"string","enum":["label_created","ready_to_ship","picked_up","in_transit","out_for_delivery","delivered","exception","returned","cancelled"]},"carrierId":{"type":"string","maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Shipments in transit","input":{"status":"in_transit"},"output":{"items":[]}},{"description":"Shipments for one customer","input":{"accountId":"01HZ..."},"output":{"items":[]}},{"description":"Shipments for a fulfillment work order","input":{"workOrderId":"01HZ..."},"output":{"items":[]}}],"related":["get_shipment","create_shipment","get_work_order"],"idempotent":true,"annotations":{"title":"List Shipments","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["shipment:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["shipment:list"]}]}},{"name":"get_shipment","surface":"data","description":"Get one shipment by id — its shipment number, carrier + service, tracking number/URL, status, ship-from/ship-to address, parcel dimensions, cost, and shipped/delivered timestamps.","entity":"shipment","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"related":["list_shipments","update_shipment"],"idempotent":true,"annotations":{"title":"Get Shipment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["shipment:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["shipment:read"]}]}},{"name":"create_shipment","surface":"data","description":"Create a shipment — records the carrier, service, and tracking number against a customer (accountId, required) and optionally the fulfillment work order it delivers (workOrderId). A human-readable shipment number (default SH-0001; the tenant numbering pattern) is minted automatically — do not supply one. Optionally include the ship-to address, parcel dimensions, cost, and timeline fields.","entity":"shipment","action":"create","inputSchema":{"type":"object","properties":{"shipmentNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"accountId":{"type":"string","minLength":1,"maxLength":80},"workOrderId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"carrierId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"carrierService":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"status":{"type":"string","enum":["label_created","ready_to_ship","picked_up","in_transit","out_for_delivery","delivered","exception","returned","cancelled"]},"shipFromWarehouseId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"shipToLine1":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"shipToLine2":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"shipToCity":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"shipToState":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"shipToPostalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"shipToCountry":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"lengthMm":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"widthMm":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"heightMm":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"cost":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}]},"shippedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expectedDeliveryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"notes":{"type":["string","null"]},"portalVisible":{"type":["boolean","null"]},"customFields":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["accountId"],"additionalProperties":false},"examples":[{"description":"Record a UPS shipment for a work order","input":{"accountId":"01HZ...","workOrderId":"01HW...","carrierId":"01HC...","trackingNumber":"1Z999...","status":"in_transit"},"output":{"id":"01J0...","shipmentNumber":"SH-0001","status":"in_transit"}}],"related":["list_shipments","update_shipment","get_work_order"],"idempotent":false,"annotations":{"title":"Create Shipment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["shipment:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["shipment:create"]}]}},{"name":"update_shipment","surface":"data","description":"Update a shipment — e.g. advance its status (in_transit → delivered), attach a tracking number/URL, correct the ship-to address, or set the shipped/delivered timestamps.","entity":"shipment","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"patch":{"type":"object","properties":{"shipmentNumber":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"accountId":{"type":"string","maxLength":80},"workOrderId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"carrierId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"carrierService":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"trackingNumber":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"trackingUrl":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"status":{"type":"string","enum":["label_created","ready_to_ship","picked_up","in_transit","out_for_delivery","delivered","exception","returned","cancelled"]},"shipFromWarehouseId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"locationId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"shipToLine1":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"shipToLine2":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"shipToCity":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"shipToState":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"shipToPostalCode":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"shipToCountry":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"weightGrams":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"lengthMm":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"widthMm":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"heightMm":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"cost":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}]},"shippedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expectedDeliveryDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"notes":{"type":["string","null"]},"portalVisible":{"type":["boolean","null"]},"customFields":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":false}},"required":["id","patch"]},"related":["get_shipment","list_shipments"],"idempotent":true,"annotations":{"title":"Update Shipment","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["shipment:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["shipment:update"]}]}},{"name":"list_segments","surface":"data","description":"List marketing segments (named recipient lists used as campaign audiences). Each segment carries its source kind (manual / dynamic_leads / dynamic_contacts / dynamic_subscribers), member count, and when its members were last built. Filter by filterKind or use q to search by name.","entity":"segment","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"filterKind":{"type":"string","enum":["manual","dynamic_leads","dynamic_contacts","dynamic_subscribers"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"All dynamic lead segments","input":{"filterKind":"dynamic_leads"},"output":{"items":[]}},{"description":"Find the newsletter segment","input":{"q":"newsletter"},"output":{"items":[]}}],"related":["get_segment","create_segment","build_segment","list_campaigns"],"idempotent":true,"annotations":{"title":"List Segments","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["segment:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["segment:list"]}]}},{"name":"get_segment","surface":"data","description":"Get one segment by id — its name, description, source kind, filter rules, current memberCount, and lastBuiltAt (when its members were last materialised). If lastBuiltAt is empty or stale for a dynamic segment, suggest build_segment to refresh the member snapshot before a campaign uses it.","entity":"segment","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"examples":[{"description":"Check a segment's size and freshness","input":{"id":"01HZ..."},"output":{"id":"01HZ...","name":"Newsletter","memberCount":1204,"lastBuiltAt":"2026-07-01T09:00:00Z"}}],"related":["list_segments","build_segment","add_segment_members"],"idempotent":true,"annotations":{"title":"Get Segment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["segment:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["segment:read"]}]}},{"name":"create_segment","surface":"data","description":"Create a marketing segment (a campaign audience). Required: name. filterKind picks the source: 'manual' (static list — add members with add_segment_members), 'dynamic_leads' / 'dynamic_contacts' / 'dynamic_subscribers' (rebuilt from opted-in CRM data on build_segment; consent flags respected). For dynamic_leads, optional filterRules narrows matches with equality filters, e.g. {\"status\": \"qualified\", \"source\": \"webinar\"}. After creating a dynamic segment, call build_segment to materialise its members — memberCount stays 0 until then.","entity":"segment","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"]},"filterKind":{"type":"string","enum":["manual","dynamic_leads","dynamic_contacts","dynamic_subscribers"]},"filterRules":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"memberCount":{"type":["number","null"]},"lastBuiltAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["name","filterKind"],"additionalProperties":false},"examples":[{"description":"Dynamic segment of all qualified opted-in leads","input":{"name":"Qualified leads","filterKind":"dynamic_leads","filterRules":{"status":"qualified"}},"output":{"id":"01J0...","name":"Qualified leads","memberCount":null}},{"description":"Manual list to paste emails into","input":{"name":"VIP invitees","filterKind":"manual"},"output":{"id":"01J0..."}}],"related":["build_segment","add_segment_members","list_segments"],"annotations":{"title":"Create Segment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["segment:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["segment:create"]}]}},{"name":"build_segment","surface":"data","description":"Materialise (rebuild) a segment's member snapshot. For dynamic segments this re-queries the CRM for matching opted-in records: new matches are added, records that no longer match are removed (kept in history, never hard-deleted). Manual segments keep their rows and just refresh the count. Returns { segmentId, members, added, removed }. Run this before a campaign send if the segment looks stale.","entity":"segment","action":"build","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"examples":[{"description":"Refresh a dynamic segment before a send","input":{"id":"01HZ..."},"output":{"segmentId":"01HZ...","members":1250,"added":46,"removed":3}}],"related":["get_segment","create_segment","get_campaign_checklist"],"idempotent":true,"annotations":{"title":"Build Segment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["segment:build"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["segment:build"]}]}},{"name":"add_segment_members","surface":"data","description":"Add members to a segment by pasted email addresses (emails[]), CRM lead ids (leadIds[]), and/or contact ids (contactIds[]). Lead/contact refs are consent-checked (email consent required) and the suppression list is honoured — anything skipped comes back with a per-item verdict (suppressed / no_consent / invalid_email / not_found / duplicate), never silently dropped. Pasted emails are consent-carrying by contract: only use emails the operator asserts have opt-in. Returns { added, memberCount, skipped }.","entity":"segment","action":"update","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"emails":{"maxItems":1000,"type":"array","items":{"type":"string"}},"leadIds":{"maxItems":1000,"type":"array","items":{"type":"string"}},"contactIds":{"maxItems":1000,"type":"array","items":{"type":"string"}}},"required":["id"]},"examples":[{"description":"Add two pasted emails to a manual list","input":{"id":"01HZ...","emails":["jane@acme.com","raj@example.com"]},"output":{"added":2,"memberCount":14,"skipped":[]}},{"description":"Add CRM contacts (consent-checked)","input":{"id":"01HZ...","contactIds":["01HC...","01HD..."]},"output":{"added":1,"memberCount":15,"skipped":[{"ref":"01HD...","reason":"no_consent"}]}}],"related":["get_segment","build_segment","create_segment"],"annotations":{"title":"Add Segment Members","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["segment:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["segment:update"]}]}},{"name":"list_email_templates","surface":"data","description":"List marketing email templates (reusable subject + body content that campaigns reference). Filter by isActive or category, or use q to search name/subject. Inactive templates stay saved but aren't offered when composing a campaign.","entity":"email_template","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"isActive":{"type":"boolean"},"category":{"type":"string","maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Active templates","input":{"isActive":true},"output":{"items":[]}},{"description":"Find newsletter templates","input":{"q":"newsletter"},"output":{"items":[]}}],"related":["get_email_template","create_email_template","create_campaign"],"idempotent":true,"annotations":{"title":"List Email Templates","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["email_template:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["email_template:list"]}]}},{"name":"get_email_template","surface":"data","description":"Get one email template by id — full subject, preheader, HTML body, plain-text body, sender overrides (fromName / fromEmail / replyTo), category, and active flag.","entity":"email_template","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"examples":[{"description":"Fetch a template to review its body","input":{"id":"01HZ..."},"output":{"id":"01HZ...","name":"Q2 launch","subject":"Three things changed this week"}}],"related":["list_email_templates","update_email_template"],"idempotent":true,"annotations":{"title":"Get Email Template","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["email_template:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["email_template:read"]}]}},{"name":"create_email_template","surface":"data","description":"Create an email template. Required: name, subject, htmlBody. Optional: preheader (inbox preview snippet), textBody (plain-text alternative), fromName / fromEmail / replyTo sender overrides, category, isActive (default true). Subject, preheader, and bodies support merge tags with {{ tag }} syntax (spaces optional, filters allowed, e.g. {{ first_name | default:\"there\" }}). Supported tags: {{ first_name }}, {{ last_name }}, {{ full_name }}, {{ email }}, {{ company }}, {{ company_name }}, {{ sender_name }}, {{ physical_address }}, {{ unsubscribe_url }}, plus {{ custom.<key> }} for any recipient custom field. Do NOT hand-author an unsubscribe footer or tracking pixel — the compliance footer and tracking are appended automatically per recipient at send time.","entity":"email_template","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"subject":{"type":"string","minLength":1,"maxLength":300},"isActive":{"type":"boolean"},"category":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"fromName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"fromEmail":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"preheader":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"htmlBody":{"type":"string","minLength":1},"textBody":{"type":["string","null"]}},"required":["name","subject","htmlBody"],"additionalProperties":false},"examples":[{"description":"Simple personalised newsletter template","input":{"name":"Monthly newsletter","subject":"{{ first_name }}, your monthly update from {{ company_name }}","preheader":"Highlights from this month","htmlBody":"<h1>Hi {{ first_name | default:\"there\" }}</h1><p>Here is what changed…</p>"},"output":{"id":"01J0...","name":"Monthly newsletter"}}],"related":["update_email_template","list_email_templates","create_campaign"],"annotations":{"title":"Create Email Template","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["email_template:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["email_template:create"]}]}},{"name":"update_email_template","surface":"data","description":"Partial update of an email template. Only provided fields are changed; omitted fields are untouched. Same merge-tag rules as create_email_template: {{ tag }} syntax with tags {{ first_name }}, {{ last_name }}, {{ full_name }}, {{ email }}, {{ company }}, {{ company_name }}, {{ sender_name }}, {{ physical_address }}, {{ unsubscribe_url }}, plus {{ custom.<key> }}. Set isActive:false to retire a template from the campaign composer without deleting it. Campaigns that already copied its content are unaffected.","entity":"email_template","action":"update","inputSchema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"subject":{"type":"string","maxLength":300},"isActive":{"type":"boolean"},"category":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"fromName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"fromEmail":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"preheader":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"htmlBody":{"type":"string"},"textBody":{"type":["string","null"]},"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fix a subject line","input":{"id":"01HZ...","subject":"Your June product update"},"output":{"id":"01HZ..."}},{"description":"Retire a template","input":{"id":"01HZ...","isActive":false},"output":{"id":"01HZ...","isActive":false}}],"related":["get_email_template","list_email_templates"],"idempotent":true,"annotations":{"title":"Update Email Template","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["email_template:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["email_template:update"]}]}},{"name":"list_personal_email_templates","surface":"data","description":"List the current user's reusable one-to-one email templates and folders. Each template includes a description explaining when to use it. Ask whether the user wants a new message or a template message before drafting.","entity":"mailbox","action":"configure","inputSchema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","pattern":"^emt_[0-9a-f-]{36}$"}},"additionalProperties":false},"related":["get_personal_email_template","create_mail_draft"],"idempotent":true,"annotations":{"title":"List Personal Email Templates","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:configure"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:configure"]}]}},{"name":"get_personal_email_template","surface":"data","description":"Get the subject, rich HTML body, and usage description of one of the current user's email templates for a reviewed draft. Never send automatically.","entity":"mailbox","action":"configure","inputSchema":{"type":"object","properties":{"id":{"type":"string","pattern":"^emt_[0-9a-f-]{36}$"}},"required":["id"],"additionalProperties":false},"related":["list_personal_email_templates","create_mail_draft"],"idempotent":true,"annotations":{"title":"Get Personal Email Template","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:configure"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:configure"]}]}},{"name":"list_campaigns","surface":"data","description":"List email marketing campaigns. Filter by status (draft / scheduled / sending / sent / paused / cancelled / failed), segmentId, or templateId; use q to search name/subject. Each row carries the aggregate delivery counters (sent/delivered/opened/clicked/…) — use get_campaign_stats for the full analytics breakdown of one campaign.","entity":"campaign","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"status":{"type":"string","enum":["draft","scheduled","sending","sent","paused","cancelled","failed"]},"segmentId":{"type":"string","maxLength":200},"templateId":{"type":"string","maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Drafts awaiting review","input":{"status":"draft"},"output":{"items":[]}},{"description":"Recently sent campaigns","input":{"status":"sent","sort":"-updated_at"},"output":{"items":[]}}],"related":["get_campaign","create_campaign","get_campaign_stats","list_segments"],"idempotent":true,"annotations":{"title":"List Campaigns","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["campaign:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["campaign:list"]}]}},{"name":"get_campaign","surface":"data","description":"Get one campaign by id — name, status, audience (segmentId / recipientMode), content (templateId, subject, preheader, bodies, sender), schedule timestamps, and the aggregate delivery counters. For rates, per-link clicks, and per-recipient engagement use get_campaign_stats; to see whether it is ready to send use get_campaign_checklist.","entity":"campaign","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"examples":[{"description":"Review a draft before hand-off","input":{"id":"01HZ..."},"output":{"id":"01HZ...","name":"Q3 launch","status":"draft"}}],"related":["list_campaigns","update_campaign","get_campaign_stats","get_campaign_checklist"],"idempotent":true,"annotations":{"title":"Get Campaign","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["campaign:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["campaign:read"]}]}},{"name":"create_campaign","surface":"data","description":"Create an email campaign as a DRAFT for a human to review and send from /marketing/campaigns — I cannot send campaigns; a human clicks Send. Required: name. Recommended: segmentId (the audience — see list_segments) and either templateId (content inherited from the template) or an inline subject + htmlBody. Optional: preheader, textBody, fromName / fromEmail / replyTo, description. Subject/preheader/bodies support {{ merge_tag }} tokens (see create_email_template for the tag list). The campaign is always created with status 'draft'; scheduling, test sends, and sending are human-only actions in the UI. Use get_campaign_checklist afterwards to report what still blocks the send.","entity":"campaign","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"segmentId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"recipientMode":{"type":"string","enum":["segment","adhoc","mixed","criteria"]},"recipientRefs":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"audienceFilter":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"preheader":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"fromName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"fromEmail":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"htmlBody":{"type":["string","null"]},"textBody":{"type":["string","null"]},"utm":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"ab":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"examples":[{"description":"Draft a newsletter from a template for the newsletter segment","input":{"name":"July newsletter","segmentId":"01HS...","templateId":"01HT..."},"output":{"id":"01J0...","name":"July newsletter","status":"draft"}},{"description":"Draft with inline content","input":{"name":"Feature announcement","segmentId":"01HS...","subject":"{{ first_name }}, a new feature for you","htmlBody":"<p>…</p>"},"output":{"id":"01J0...","status":"draft"}}],"related":["get_campaign_checklist","update_campaign","list_segments","list_email_templates"],"annotations":{"title":"Create Campaign","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["campaign:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["campaign:create"]}]}},{"name":"update_campaign","surface":"data","description":"Partial update of a campaign's audience or content (name, description, segmentId, templateId, subject, preheader, bodies, sender fields). Only DRAFT or SCHEDULED campaigns can be edited — anything already sending, sent, paused, cancelled, or failed is immutable and this tool returns a conflict error explaining that. Status and scheduling cannot be changed here: sending, scheduling, and cancelling are human-only actions in /marketing/campaigns.","entity":"campaign","action":"update","inputSchema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"segmentId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"recipientMode":{"type":"string","enum":["segment","adhoc","mixed","criteria"]},"recipientRefs":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"audienceFilter":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"preheader":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"fromName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"fromEmail":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"replyTo":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"htmlBody":{"type":["string","null"]},"textBody":{"type":["string","null"]},"utm":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"ab":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Fix a draft's subject line","input":{"id":"01HZ...","subject":"Your July product update"},"output":{"id":"01HZ...","status":"draft"}},{"description":"Point a draft at a different segment","input":{"id":"01HZ...","segmentId":"01HS..."},"output":{"id":"01HZ..."}}],"related":["get_campaign","create_campaign","get_campaign_checklist"],"idempotent":true,"annotations":{"title":"Update Campaign","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["campaign:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["campaign:update"]}]}},{"name":"get_campaign_stats","surface":"data","description":"Campaign analytics — the answer to \"how did my campaign do?\". Returns the delivery counters (sent / delivered / opened / clicked / unsubscribed / bounced / complained / failed / queued), derived rates (deliveryRate, openRate, clickRate, clickToOpenRate, unsubscribeRate, bounceRate), per-link click performance, a cursor-paginated per-recipient engagement table (limit/cursor), and an hourly open/click timeline for the last 7 days (bots excluded).","entity":"campaign","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"required":["id"]},"examples":[{"description":"How did the July newsletter do?","input":{"id":"01HZ..."},"output":{"counters":{"sent":1200,"delivered":1180,"opened":512,"clicked":140},"rates":{"openRate":43.4,"clickRate":11.9}}},{"description":"Next page of the recipient table","input":{"id":"01HZ...","cursor":"01HR..."},"output":{"recipients":{"items":[]}}}],"related":["get_campaign","list_campaigns","get_campaign_checklist"],"idempotent":true,"annotations":{"title":"Get Campaign Stats","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["campaign:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["campaign:read"]}]}},{"name":"get_campaign_checklist","surface":"data","description":"Pre-send readiness checklist for a campaign — every gate the human send action enforces, as user-visible items with level success / warning / error (e.g. missing subject, empty segment, unknown merge tags, sender domain issues, oversized HTML). `canSend` is true when no error-level item remains; warnings inform but don't block. Use this to tell the user exactly what to fix before THEY send from /marketing/campaigns — sending itself is never done by this agent.","entity":"campaign","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"examples":[{"description":"Is the draft ready to send?","input":{"id":"01HZ..."},"output":{"canSend":false,"items":[{"key":"segment","level":"error","message":"No audience selected"}]}}],"related":["get_campaign","update_campaign","build_segment"],"idempotent":true,"annotations":{"title":"Get Campaign Checklist","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["campaign:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["campaign:read"]}]}},{"name":"list_web_properties","surface":"data","description":"List the tenant's registered web properties — the websites, social profiles, and Google Business listings whose digital presence this module tracks. Use this to find a property's id before reading its insights. Filter by type (website / social / gbp) or search by label/url with q.","entity":"web_property","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"type":{"type":"string","enum":["website","social","gbp"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"All web properties","input":{},"output":{"items":[]}},{"description":"Just the websites","input":{"type":"website"},"output":{"items":[]}}],"related":["get_web_property_insights","submit_url_for_indexing"],"idempotent":true,"annotations":{"title":"List Web Properties","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["web_property:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["web_property:list"]}]}},{"name":"get_web_property_insights","surface":"data","description":"Get the scored digital-presence insights for one web property — site speed & Core Web Vitals (mobile + desktop), SEO score, site-health checks (SSL, sitemap, robots, meta), domain authority, and — when the Google connectors are set up — Search Console rankings, GA4 traffic, Google Ads, and Business Profile reviews. Use this to answer 'how's our SEO', 'is our site fast', 'how much search traffic are we getting', or 'what's our domain authority'. Get the id from list_web_properties first.","entity":"web_property","action":"insights","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"examples":[{"description":"Insights for a property","input":{"id":"01J0..."},"output":{"propertyId":"01J0...","health":{}}}],"related":["list_web_properties","submit_url_for_indexing"],"idempotent":true,"annotations":{"title":"Get Web Property Insights","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["web_property:insights"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["web_property:insights"]}]}},{"name":"submit_url_for_indexing","surface":"data","description":"Submit one or more URLs of a website property to search engines for (re)indexing via IndexNow (Bing/Yandex/Seznam/Naver) plus a sitemap ping. Use after publishing or updating pages so search engines pick them up faster. URLs must belong to the property's domain. This is a search-engine notification only — it does not modify the site.","entity":"web_property","action":"submit_index","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"urls":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uri"}}},"required":["id","urls"]},"examples":[{"description":"Ask engines to recrawl two updated pages","input":{"id":"01J0...","urls":["https://example.com/a","https://example.com/b"]},"output":{"results":[]}}],"related":["get_web_property_insights","list_web_properties"],"idempotent":true,"annotations":{"title":"Submit URL For Indexing","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["web_property:submit_index"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["web_property:submit_index"]}]}},{"name":"list_competitors","surface":"data","description":"List the competitors the tenant tracks — the rival companies whose profile, web presence, tech stack, social activity, and latest updates this module monitors. Use this to find a competitor's id before reading its full profile or battlecard. Filter by status (active / archived) or search by name/url with q.","entity":"competitor","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"status":{"type":"string","enum":["active","archived"]},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"All tracked competitors","input":{},"output":{"items":[]}},{"description":"Search by name","input":{"q":"acme"},"output":{"items":[]}}],"related":["get_competitor","create_competitor","get_competitor_battlecard"],"idempotent":true,"annotations":{"title":"List Competitors","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["competitor:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["competitor:list"]}]}},{"name":"get_competitor","surface":"data","description":"Get the profile of one competitor company tracked in the workspace: company overview, public website and technology signals, public social channels, and recent public updates. May fetch the competitor's public website when cached data is stale. Does not change any data. Use list_competitors to find the id.","entity":"competitor","action":"insights","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Competitor id from list_competitors."}},"required":["id"]},"examples":[{"description":"Profile for a competitor","input":{"id":"01J0..."},"output":{"competitorId":"01J0...","profile":{}}}],"related":["list_competitors","get_competitor_battlecard","create_competitor"],"idempotent":true,"annotations":{"title":"Get Competitor","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["competitor:insights"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["competitor:insights"]}]}},{"name":"create_competitor","surface":"data","description":"Add a competitor company to the workspace by its website URL. After the record is created, profile details are gathered in the background from the competitor's public website and other public sources. If name is omitted it is derived from the website domain.","entity":"competitor","action":"create","inputSchema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"description":"Competitor's public website URL, e.g. https://example.com."},"name":{"description":"Display name. Defaults to a name derived from the URL domain.","type":"string","minLength":1}},"required":["url"]},"examples":[{"description":"Add a competitor by URL","input":{"url":"https://example.com"},"output":{"id":"01J0...","name":"Example"}},{"description":"Add with an explicit name","input":{"url":"https://example.com","name":"Example Corp"},"output":{"id":"01J0..."}}],"related":["list_competitors","get_competitor","get_competitor_battlecard"],"idempotent":false,"annotations":{"title":"Create Competitor","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["competitor:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["competitor:create"]}]}},{"name":"delete_competitor","surface":"data","description":"Remove a tracked competitor from the workspace (soft delete). It disappears from the competitor list, its profile, updates feed, trend history and battlecard are no longer shown, and the daily data refresh stops for it. The record is retained for audit. Use list_competitors to find the id.","entity":"competitor","action":"delete","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Competitor id from list_competitors."}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Remove a competitor","input":{"id":"01J0..."},"output":{"id":"01J0..."}}],"related":["list_competitors","get_competitor"],"idempotent":true,"annotations":{"title":"Delete Competitor","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["competitor:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["competitor:delete"]}]}},{"name":"get_competitor_battlecard","surface":"data","description":"Build the us-vs-them battlecard for one competitor — a side-by-side comparison of us against them, with talking points for reps, reasons we win, and risks that lose us the deal. Use this to answer 'how do we compare to Y', 'why do we beat Y', 'what should I say against Y', or 'give me the battlecard for Y'. Get the id from list_competitors first.","entity":"competitor","action":"battlecard","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]},"examples":[{"description":"Battlecard vs a competitor","input":{"id":"01J0..."},"output":{"competitorId":"01J0...","talkingPoints":[]}}],"related":["get_competitor","list_competitors"],"idempotent":true,"annotations":{"title":"Get Competitor Battlecard","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["competitor:battlecard"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["competitor:battlecard"]}]}},{"name":"list_record_links","surface":"data","description":"List every record linked to a given record through the generic relationship graph, in BOTH directions (links created from either side are returned once — no duplicates). Use this to answer \"what else is connected to this?\" for any record type, including ones with no hard foreign key between them (e.g. an asset used on a project, a shipment tied to a work order). Returns the standard { items, pagination } envelope; each item carries the link id (needed to unlink), the other record's type/id/label, its app path when one exists, the link type and any note. Records the caller is not allowed to read are silently omitted, so a short page is NOT the end of the feed — always follow pagination.nextCursor while hasMore is true. Valid entityType values: account, activity, asset, audit_run, calendar_event, campaign, catalog_item, change_order, claim, competitor, contact, contract, control, deal, employee, expense_report, ict_provider, incident, insurance_policy, insurance_quote, inventory_item, invoice, kb_hub, kb_page, lead, location, project, purchase_order, quote, risk, segment, shipment, task, ticket, unified_task, vendor, warehouse, work_order, workforce_user, or custom:<object-slug> for a custom object's records.","entity":"entity_link","action":"list","inputSchema":{"type":"object","properties":{"entityType":{"type":"string","description":"Type token of the record you are looking at."},"entityId":{"type":"string","minLength":1,"description":"Id of the record you are looking at."},"limit":{"description":"Page size. Default 50, max 500.","type":"integer","minimum":1,"maximum":500},"cursor":{"description":"pagination.nextCursor from the previous page.","type":"string"}},"required":["entityType","entityId"]},"examples":[{"description":"What is linked to this project?","input":{"entityType":"project","entityId":"01HZ..."},"output":{"items":[],"pagination":{"limit":50,"count":0,"hasMore":false,"nextCursor":null,"prevCursor":null}}},{"description":"Second page of a busy account's links","input":{"entityType":"account","entityId":"01HZ...","limit":100,"cursor":"eyJ..."},"output":{"items":[],"pagination":{"limit":100,"count":0,"hasMore":false,"nextCursor":null,"prevCursor":null}}}],"related":["link_records","unlink_records"],"idempotent":true,"annotations":{"title":"List Record Links","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["entity_link:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["entity_link:list"]}]}},{"name":"link_records","surface":"data","description":"Link two records of any two supported types through the generic relationship graph. Use this when the two records have no dedicated field for each other — otherwise prefer setting the real field (e.g. a deal's account) so list filters and roll-ups keep working. Idempotent: re-linking the same (fromType, fromId, toType, toId, linkType) returns the existing link instead of creating a duplicate. Both records must exist, a record cannot be linked to itself, and the caller must be able to UPDATE the 'from' record and READ the 'to' record. Optionally pass linkType to label the edge (defaults to \"related\") and note to annotate it. Valid type values: account, activity, asset, audit_run, calendar_event, campaign, catalog_item, change_order, claim, competitor, contact, contract, control, deal, employee, expense_report, ict_provider, incident, insurance_policy, insurance_quote, inventory_item, invoice, kb_hub, kb_page, lead, location, project, purchase_order, quote, risk, segment, shipment, task, ticket, unified_task, vendor, warehouse, work_order, workforce_user, or custom:<object-slug> for a custom object's records.","entity":"entity_link","action":"create","inputSchema":{"type":"object","properties":{"fromType":{"type":"string","description":"Type token of the record the link starts from."},"fromId":{"type":"string","minLength":1},"toType":{"type":"string","description":"Type token of the record being linked to."},"toId":{"type":"string","minLength":1},"linkType":{"description":"Edge label, e.g. \"related\" (default), \"procured_via\", \"used_in_project\".","type":"string","minLength":1,"maxLength":64},"note":{"description":"Free-text annotation shown on the link.","type":"string","maxLength":2000}},"required":["fromType","fromId","toType","toId"]},"examples":[{"description":"Tie an asset to the project it is used on","input":{"fromType":"asset","fromId":"01HZ...","toType":"project","toId":"01HY...","linkType":"used_in_project"},"output":{"linkId":"elk_...","fromType":"asset","toType":"project","linkType":"used_in_project"}},{"description":"Relate a compliance risk to the contract that created it","input":{"fromType":"risk","fromId":"01HZ...","toType":"contract","toId":"01HY...","note":"Liability cap below policy floor"},"output":{"linkId":"elk_...","fromType":"risk","toType":"contract","linkType":"related"}}],"related":["list_record_links","unlink_records"],"idempotent":true,"annotations":{"title":"Link Records","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["entity_link:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["entity_link:create"]}]}},{"name":"unlink_records","surface":"data","description":"Remove one link from the generic relationship graph. Pass the linkId from list_record_links PLUS the record you are acting from (entityType + entityId) — the link must actually touch that record or the call fails as not-found, and the UPDATE permission is checked against that record. This is a soft delete of the edge only; neither record is touched. Valid entityType values: account, activity, asset, audit_run, calendar_event, campaign, catalog_item, change_order, claim, competitor, contact, contract, control, deal, employee, expense_report, ict_provider, incident, insurance_policy, insurance_quote, inventory_item, invoice, kb_hub, kb_page, lead, location, project, purchase_order, quote, risk, segment, shipment, task, ticket, unified_task, vendor, warehouse, work_order, workforce_user, or custom:<object-slug> for a custom object's records.","entity":"entity_link","action":"delete","inputSchema":{"type":"object","properties":{"linkId":{"type":"string","minLength":1,"description":"The link id returned by list_record_links."},"entityType":{"type":"string","description":"Type token of the record you are looking at."},"entityId":{"type":"string","minLength":1,"description":"Id of the record you are looking at."}},"required":["linkId","entityType","entityId"]},"examples":[{"description":"Detach a wrongly-linked purchase order from an asset","input":{"linkId":"elk_...","entityType":"asset","entityId":"01HZ..."},"output":null},{"description":"Remove a stale link from a project","input":{"linkId":"elk_...","entityType":"project","entityId":"01HY..."},"output":null}],"related":["list_record_links","link_records"],"annotations":{"title":"Unlink Records","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["entity_link:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["entity_link:delete"]}]}},{"name":"list_record_history","surface":"data","description":"List the edit history of one record, newest first: each item is one field change with the field key and its tenant label (fieldLabel — use it when talking to the user), the value before and after, who made it (userLabel; null = system), the source (ui, api, agent, import, …) and when (ts). UDF changes appear as `customFields.<key>`; row-level milestones are `__create`, `__delete` and similar. Use this to answer \"who changed this?\", \"what was the amount before?\" or \"when did the status move?\". History is kept for 15 months. Monetary changes are omitted when the caller cannot see financial values. Follow pagination.nextCursor while hasMore is true. Valid entityType values: account, activity, asset, audit_run, calendar_event, campaign, catalog_item, change_order, claim, competitor, contact, contract, control, deal, employee, expense_report, ict_provider, incident, insurance_policy, insurance_quote, inventory_item, invoice, kb_hub, kb_page, lead, location, project, purchase_order, quote, risk, segment, shipment, task, ticket, unified_task, vendor, warehouse, work_order, workforce_user, or custom:<object-slug> for a custom object's records, amendment, charge, framework, carrier, region, target, forecast, web_property, survey, calendar, kb_article, lead_find_run, sow_document.","entity":"entity_history","action":"list","inputSchema":{"type":"object","properties":{"entityType":{"type":"string","description":"Type token of the record, e.g. deal, work_order, calendar_event, custom:<slug>."},"entityId":{"type":"string","minLength":1,"description":"Id of the record."},"limit":{"description":"Page size. Default 50, max 500.","type":"integer","minimum":1,"maximum":500},"cursor":{"description":"pagination.nextCursor from the previous page.","type":"string"}},"required":["entityType","entityId"]},"examples":[{"description":"Who changed this deal recently?","input":{"entityType":"deal","entityId":"01HZ..."},"output":{"items":[{"field":"stage","valueFrom":"proposal","valueTo":"negotiation","userLabel":"Dana Ruiz","source":"ui","ts":"2026-09-22T14:03:11.000Z"}],"pagination":{"limit":50,"count":1,"hasMore":false,"nextCursor":null,"prevCursor":null}}}],"related":["list_record_links"],"idempotent":true,"annotations":{"title":"List Record History","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["entity_history:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["entity_history:list"]}]}},{"name":"get_relationship_graph","surface":"data","description":"Pull the ENTIRE relationship neighbourhood of one record in a single call — the record itself plus every directly connected account, contact, deal, activity, ticket, lead, project, work order and invoice, the generic record links, and the AI-extracted topics mentioned across any of them. Centre it on an account, contact, deal, project, work order or ticket via centerType. Use this FIRST whenever the user asks about a record's status, who is involved, what is happening, or anything that needs cross-module context — one call here beats five or more search_records calls and returns a coherent picture instead of disconnected lists. Returns { center, nodes, edges, counts }: `nodes` carry kind/label/href/data, `edges` carry source/target/type using the node ids. Anything the caller may not read is omitted rather than redacted to an id, and monetary values are blanked for users without financial visibility — so never present a missing branch as 'this record has none'.","entity":"entity_link","action":"list","inputSchema":{"type":"object","properties":{"centerType":{"type":"string","enum":["account","contact","deal","project","work_order","ticket"],"description":"What the graph is centred on: account | contact | deal | project | work_order | ticket."},"centerId":{"type":"string","minLength":1,"description":"Id of the record to centre the graph on."},"limit":{"description":"Max records per branch (contacts, deals, tickets, …). Default 25, max 100.","type":"integer","minimum":1,"maximum":100}},"required":["centerType","centerId"]},"examples":[{"description":"Expand everything around a customer before answering 'what's going on with Acme?'","input":{"centerType":"account","centerId":"01HZ..."},"output":{"center":{"id":"acc:01HZ...","kind":"account","label":"Acme"},"nodes":[],"edges":[],"counts":{}}},{"description":"Who and what is attached to this work order?","input":{"centerType":"work_order","centerId":"01HY...","limit":50},"output":{"center":{"id":"wo:01HY...","kind":"work_order","label":"WO-1042"},"nodes":[],"edges":[],"counts":{}}}],"related":["list_record_links","search_records"],"idempotent":true,"annotations":{"title":"Get Relationship Graph","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["entity_link:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["entity_link:list"]}]}},{"name":"get_entity_context","surface":"data","description":"Get everything relevant about ONE record in a single token-budgeted call: the record itself, its related collections (capped, each with a total and a more_url), a merged newest-first timeline, and computed signals (last_activity_at, days_idle, at_risk/health/stage/status where available, open_tasks). Supported entityType: account, contact, deal, lead, task, project, project_task, ticket, work_order, calendar_event, customer, opportunity, support_ticket, event, appointment. Prefer this over several list_/get_ calls when you need to understand a record. depth=summary (default) keeps headline fields only; depth=full returns fuller records. include narrows to named collections, limit caps items per collection (max 25), since keeps only items/timeline at or after an ISO time. Collections the caller may not read are listed in meta.omitted — never describe an omitted collection as empty. Monetary values are null for users without financial visibility.","entity":"entity_link","action":"list","inputSchema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","deal","lead","task","project","project_task","ticket","work_order","calendar_event","customer","opportunity","support_ticket","event","appointment"],"description":"Record type, e.g. account, contact, deal, ticket"},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Record id"},"depth":{"type":"string","enum":["summary","full"]},"include":{"description":"Related collection keys to include, e.g. ['deals','activities']","maxItems":50,"type":"array","items":{"type":"string","maxLength":64}},"limit":{"type":"integer","minimum":1,"maximum":25},"since":{"type":"string","format":"date-time"},"maxTokens":{"type":"integer","minimum":500,"maximum":32000}},"required":["entityType","id"],"additionalProperties":false},"examples":[{"description":"Brief an account before a call","input":{"entityType":"account","id":"acc_01HZ...","include":["contacts","deals","activities"]},"output":{"entity":{"type":"account","id":"acc_01HZ..."},"related":{"deals":{"items":[],"total":0,"more_url":"/api/v1/crm/deals?accountId=acc_01HZ..."}},"signals":{"days_idle":12},"meta":{"token_estimate":900,"truncated":false}}}],"related":["get_relationship_graph"],"idempotent":true,"annotations":{"title":"Get Entity Context","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["entity_link:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["entity_link:list"]}]}},{"name":"list_contract_templates","surface":"data","description":"List contract templates visible to the caller through tenant ACL and template group sharing.","entity":"contract_template","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"ids":{"type":"string","maxLength":8000},"type":{"type":"string","maxLength":200},"jurisdiction":{"type":"string","maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Published templates","input":{},"output":{"items":[]}}],"related":["get_contract_template","create_contract_template"],"idempotent":true,"annotations":{"title":"List Contract Templates","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["contract_template:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract_template:list"]}]}},{"name":"prepare_contract_document","surface":"data","description":"Preflight the selected template against a contract. Returns missing merge fields and the authenticated PDF/DOCX download paths; it does not send or sign the document.","entity":"contract","action":"download","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","minLength":1}},"required":["contractId"],"additionalProperties":false},"examples":[{"description":"Check whether a contract can be generated","input":{"contractId":"contract-id"},"output":{"canGenerate":true,"pdfPath":"/api/v1/contracts/contracts/contract-id/document?format=pdf"}}],"related":["list_contract_templates","get_contract_template"],"idempotent":true,"annotations":{"title":"Prepare Contract Document","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["contract:download"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract:download"]}]}},{"name":"get_contract_template","surface":"data","description":"Read one visible contract template, including its document blocks, merge tags, branding and signer blocks.","entity":"contract_template","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Read a template","input":{"id":"template-id"},"output":{}}],"related":["list_contract_templates","update_contract_template"],"idempotent":true,"annotations":{"title":"Get Contract Template","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["contract_template:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract_template:read"]}]}},{"name":"create_contract_template","surface":"data","description":"Create a tenant contract template. The document is structured rich content; sharing is everyone or restricted groups.","entity":"contract_template","action":"create","inputSchema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"type":{"type":"string","minLength":1,"maxLength":80},"jurisdiction":{"type":"string","minLength":1,"maxLength":8},"approvalWorkflow":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"document":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"logoMode":{"type":"string","enum":["company","custom","none"]},"customLogoStorageKey":{"type":["string","null"]},"signatureBlocks":{"type":"array","items":{}},"sharingMode":{"type":"string","enum":["everyone","restricted"]},"status":{"type":"string","enum":["draft","published","archived"]},"version":{"type":"number"}},"required":["name","type","jurisdiction","document","logoMode","signatureBlocks","sharingMode","status"],"additionalProperties":false},"examples":[{"description":"Create a shared MSA draft","input":{"name":"Standard MSA","type":"MSA","jurisdiction":"US","document":{"blocks":[]},"logoMode":"company","signatureBlocks":[],"sharingMode":"everyone","status":"draft"},"output":{"id":"template-id"}}],"related":["list_contract_templates","update_contract_template"],"idempotent":false,"annotations":{"title":"Create Contract Template","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["contract_template:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract_template:create"]}]}},{"name":"update_contract_template","surface":"data","description":"Update a contract template the caller may edit. Published contract snapshots are not modified.","entity":"contract_template","action":"update","inputSchema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"type":{"type":"string","maxLength":80},"jurisdiction":{"type":"string","maxLength":8},"approvalWorkflow":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"document":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"logoMode":{"type":"string","enum":["company","custom","none"]},"customLogoStorageKey":{"type":["string","null"]},"signatureBlocks":{"type":"array","items":{}},"sharingMode":{"type":"string","enum":["everyone","restricted"]},"status":{"type":"string","enum":["draft","published","archived"]},"version":{"type":"number"},"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Publish a template","input":{"id":"template-id","status":"published"},"output":{"id":"template-id","status":"published"}}],"related":["get_contract_template","share_contract_template_with_group"],"idempotent":true,"annotations":{"title":"Update Contract Template","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["contract_template:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract_template:update"]}]}},{"name":"share_contract_template_with_group","surface":"data","description":"Grant a tenant group permission to use or edit a restricted contract template.","entity":"contract_template","action":"manage_permissions","inputSchema":{"type":"object","properties":{"templateId":{"type":"string","minLength":1},"groupId":{"type":"string","minLength":1},"accessLevel":{"default":"use","type":"string","enum":["use","edit"]}},"required":["templateId","groupId"],"additionalProperties":false},"examples":[{"description":"Let Operations use a template","input":{"templateId":"template-id","groupId":"group-id","accessLevel":"use"},"output":{}}],"related":["get_contract_template"],"idempotent":true,"annotations":{"title":"Share Contract Template With Group","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["contract_template:manage_permissions"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract_template:manage_permissions"]}]}},{"name":"list_available_rental_equipment","surface":"data","description":"List Asset Inventory equipment that can still be rented: a deployable status, not assigned to anyone, and not held by another live contract. Pass contractId to also include the assets already selected for that contract.","entity":"contract","action":"read","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"contractId":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false},"examples":[{"description":"Find a free vibration analyzer","input":{"q":"analyzer"},"output":{"items":[{"assetId":"asset-id","name":"VA3 Vibration Data Collector","serialNumber":"631912"}]}}],"related":["set_contract_equipment","prepare_contract_document"],"idempotent":true,"annotations":{"title":"List Available Rental Equipment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["contract:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract:read"]}]}},{"name":"get_contract_equipment","surface":"data","description":"Read the equipment a contract covers, including serial numbers and whether each unit has been handed over to the customer yet.","entity":"contract","action":"read","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","minLength":1}},"required":["contractId"],"additionalProperties":false},"examples":[{"description":"What is out on this rental","input":{"contractId":"contract-id"},"output":{"items":[]}}],"related":["set_contract_equipment","list_available_rental_equipment"],"idempotent":true,"annotations":{"title":"Get Contract Equipment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["contract:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract:read"]}]}},{"name":"set_contract_equipment","surface":"data","description":"Replace the equipment selection on a contract. Every asset must be available; an asset already handed over to the customer cannot be removed (terminate the contract to release it). The assets are assigned to the customer account when the contract becomes Active.","entity":"contract","action":"update","inputSchema":{"type":"object","properties":{"contractId":{"type":"string","minLength":1},"assetIds":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}},"required":["contractId","assetIds"],"additionalProperties":false},"examples":[{"description":"Put one analyzer on a rental","input":{"contractId":"contract-id","assetIds":["asset-id"]},"output":{"items":[{"assetId":"asset-id"}]}}],"related":["list_available_rental_equipment","get_contract_equipment"],"idempotent":true,"annotations":{"title":"Set Contract Equipment","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["contract:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract:update"]}]}},{"name":"explain_commercial_terms","surface":"data","description":"Explain approved effective commercial terms field by field, including winning provenance, lower-priority alternatives, and conflicts. This read-only tool never extracts, approves, or activates terms.","entity":"contract","action":"read","inputSchema":{"type":"object","properties":{"scopeType":{"type":"string","enum":["account","deal","quote","contract","project","work_order","ticket","invoice"]},"scopeId":{"type":"string","minLength":1},"accountId":{"type":"string","minLength":1},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["scopeType","scopeId"],"additionalProperties":false},"examples":[{"description":"Explain the terms governing a deal","input":{"scopeType":"deal","scopeId":"deal-id","accountId":"account-id"},"output":{"frozen":false,"fields":{}}}],"related":["get_binding_commercial_terms"],"idempotent":true,"annotations":{"title":"Explain Commercial Terms","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["contract:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract:read"]}]}},{"name":"get_binding_commercial_terms","surface":"data","description":"Read an immutable binding commercial-terms snapshot and source-document provenance. Use this for downstream records instead of recalculating live terms.","entity":"contract","action":"read","inputSchema":{"type":"object","properties":{"snapshotId":{"type":"string","minLength":1}},"required":["snapshotId"],"additionalProperties":false},"examples":[{"description":"Read frozen invoice terms","input":{"snapshotId":"snapshot-id"},"output":{"fields":[]}}],"related":["explain_commercial_terms"],"idempotent":true,"annotations":{"title":"Get Binding Commercial Terms","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["contract:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["contract:read"]}]}},{"name":"list_mailboxes","surface":"data","description":"List the current user's connected mailboxes and their capabilities. Use this before inspecting mail when the user has not named an account. Never returns another workspace member's mailbox. Each mailbox carries inboxUnreadCount and the top-level totalInboxUnread — the unread count of the Inbox folder as the Email screen's badge shows it (provider-reported, not a count of this page of messages). Use these for 'how many unread emails do I have?'.","entity":"mailbox","action":"list","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"Discover connected mail accounts","input":{},"output":{"items":[]}},{"description":"Unread mail across connected mailboxes","input":{},"output":{"items":[{"provider":"google","inboxUnreadCount":1}],"totalInboxUnread":1}}],"related":["list_mail_folders","list_mail_messages","search_mail"],"idempotent":true,"annotations":{"title":"List Mailboxes","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:list"]}]}},{"name":"list_mail_folders","surface":"data","description":"List every folder/label in one of the current user's connected mailboxes, including nested provider folders, stable roles, unread/total counts when available, and whether a folder is a valid filing destination. Use this instead of assuming Inbox is the whole mailbox.","entity":"mailbox","action":"list","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"refresh":{"default":false,"type":"boolean"}},"additionalProperties":false},"examples":[{"description":"Inspect all Outlook folders","input":{"account":"microsoft"},"output":{"items":[]}},{"description":"Refresh Gmail labels before filing","input":{"account":"google","refresh":true},"output":{"items":[{"id":"Label_42","name":"Customers / Acme"}]}}],"related":["list_mailboxes","list_mail_messages","move_mail_message"],"idempotent":true,"annotations":{"title":"List Mail Folders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:list"]}]}},{"name":"list_mail_messages","surface":"data","description":"List message envelopes from any mailbox folder, not only Inbox. Returns sender, recipients, Bcc, subject, date, read state, attachment/thread metadata, and opaque message ids for get_mail_message. Discover provider folder ids with list_mail_folders first.","entity":"mailbox","action":"list","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"folder":{"default":"inbox","type":"string","minLength":1,"maxLength":4096},"cursor":{"default":"","type":"string","maxLength":4096},"limit":{"default":50,"type":"integer","minimum":1,"maximum":50},"refresh":{"default":false,"type":"boolean"}},"additionalProperties":false},"examples":[{"description":"List messages in a custom folder","input":{"account":"google","folder":"Label_42","limit":25},"output":{"items":[]}},{"description":"Continue through an Outlook folder","input":{"account":"microsoft","folder":"AAMkFolder","cursor":"provider~YWJj","limit":50},"output":{"items":[],"pagination":{"hasMore":false}}}],"related":["list_mail_folders","get_mail_message","search_mail"],"idempotent":true,"annotations":{"title":"List Mail Messages","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:list"]}]}},{"name":"search_mail","surface":"data","description":"Search the current user's connected mailbox with provider-native search. Can be scoped to any discovered folder and filtered by person, sender, unread state, and date range. For emails for/with/about a PERSON pass their name or address as `person`: it matches them in From/To/Cc by display name OR address (plus the matching CRM contact's addresses) AND messages whose subject/body mentions them, ranked participant-first (`personMatch`: participant, mention, other). `from` is a sender-only filter. Returns message envelopes; call get_mail_message before relying on full content.","entity":"mailbox","action":"search","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"folder":{"type":"string","minLength":1,"maxLength":4096},"query":{"type":"string","maxLength":500},"from":{"type":"string","maxLength":320},"person":{"type":"string","minLength":1,"maxLength":320},"unread":{"type":"boolean"},"since":{"type":"string","maxLength":64},"until":{"type":"string","maxLength":64},"limit":{"default":25,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false},"examples":[{"description":"Unread invoices in a Finance folder","input":{"folder":"Finance","query":"invoice","unread":true},"output":{"items":[]}},{"description":"Read mail from a sender during a date range","input":{"from":"customer@example.com","unread":false,"since":"2026-08-01","until":"2026-09-01"},"output":{"items":[]}},{"description":"Review every email with or about a person","input":{"person":"Woody Smith"},"output":{"items":[]}}],"related":["list_mailboxes","list_mail_folders","get_mail_message"],"idempotent":true,"annotations":{"title":"Search Mail","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:search"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:search"]}]}},{"name":"get_mail_message","surface":"data","description":"Read one complete message from the current user's mailbox, including To/Cc/Bcc, plaintext and provider HTML, opaque reply/thread references, and attachment metadata. Message bodies are capped at 100,000 characters per representation to protect the agent context; truncation is stated explicitly.","entity":"mailbox","action":"read","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"messageId":{"type":"string","minLength":1,"maxLength":16384}},"required":["messageId"],"additionalProperties":false},"examples":[{"description":"Read a search result","input":{"account":"microsoft","messageId":"b64~..."},"output":{"message":{}}},{"description":"Read a Gmail message before replying","input":{"account":"google","messageId":"b64~..."},"output":{"message":{"bodyTruncated":false}}}],"related":["search_mail","set_mail_read_state","move_mail_message","create_mail_draft"],"idempotent":true,"annotations":{"title":"Get Mail Message","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:read"]}]}},{"name":"analyze_mail_message","surface":"data","description":"Analyze one exact provider message with the same cached, credit-gated Atlas review used by the Email screen. Returns summary, sentiment, CRM matches, action items with assignee/due hints, decisions, and safe contact/company/vendor suggestions. Use this before deciding how to classify or file important mail.","entity":"mailbox","action":"read","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"messageId":{"type":"string","minLength":1,"maxLength":16384}},"required":["messageId"],"additionalProperties":false},"examples":[{"description":"Triage an important message","input":{"messageId":"b64~..."},"output":{"analysis":{}}},{"description":"Extract action items from an Outlook message","input":{"account":"microsoft","messageId":"b64~..."},"output":{"analysis":{"actionItems":[]}}}],"related":["get_mail_message","log_mail_as_activity","save_mail_to_knowledge","create_task"],"idempotent":true,"annotations":{"title":"Analyze Mail Message","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:read"]}]}},{"name":"log_mail_as_activity","surface":"data","description":"Archive one exact provider email as a durable CRM activity linked to one or more records. The server re-fetches the authoritative message and preserves its envelope/body metadata; never copy a model summary in place of the email. Use only after the user has chosen or clearly identified the target records.","entity":"activity","action":"create","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"messageId":{"type":"string","minLength":1,"maxLength":16384},"links":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["contact","lead","account","deal","project","work_order","ticket","expense_report"]},"id":{"type":"string","minLength":1,"maxLength":64}},"required":["type","id"],"additionalProperties":false}},"subject":{"type":"string","minLength":1,"maxLength":300},"date":{"type":"string","format":"date-time"}},"required":["messageId","links"],"additionalProperties":false},"examples":[{"description":"Log a customer email against its deal","input":{"messageId":"b64~...","links":[{"type":"deal","id":"01HZ..."}]},"output":{"activityId":"01HZ..."}},{"description":"Link one email to a contact and project","input":{"messageId":"b64~...","links":[{"type":"contact","id":"01HC..."},{"type":"project","id":"01HP..."}]},"output":{"activityId":"01HA..."}}],"related":["analyze_mail_message","get_mail_message","create_task"],"idempotent":false,"annotations":{"title":"Log Mail As Activity","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["activity:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["activity:create"]}]}},{"name":"save_mail_to_knowledge","surface":"data","description":"Save one exact provider email into Personal Knowledge or a writable shared knowledge hub. The server re-fetches the authoritative sender, recipients, date, subject, and body and records a provider source reference. Omit hubId for the caller's private Personal Knowledge hub.","entity":"kb_hub_item","action":"create","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"messageId":{"type":"string","minLength":1,"maxLength":16384},"hubId":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}}},"required":["messageId"],"additionalProperties":false},"examples":[{"description":"Remember an email privately","input":{"messageId":"b64~...","tags":["renewal"]},"output":{"id":"01HZ..."}},{"description":"Save a policy email to a shared hub","input":{"messageId":"b64~...","hubId":"01HK...","tags":["policy","email"]},"output":{"id":"01HI..."}}],"related":["analyze_mail_message","get_mail_message","list_knowledge_hubs"],"idempotent":false,"annotations":{"title":"Save Mail To Knowledge","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["kb_hub_item:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["kb_hub_item:create"]}]}},{"name":"suggest_email_rewrite","surface":"data","description":"Rewrite a passage of an email the user is writing: improve, shorten, fix_grammar, friendlier, more_formal, or custom (with an instruction). Returns only the suggested replacement text — it never edits, saves or sends anything. Show the suggestion to the user; they decide whether to use it. Input is capped at 4,000 characters of selected text.","entity":"mailbox","action":"create_draft","inputSchema":{"type":"object","properties":{"action":{"type":"string","enum":["improve","shorten","fix_grammar","friendlier","more_formal","custom"]},"instruction":{"type":"string","maxLength":300},"selectedText":{"type":"string","maxLength":40000},"draftContext":{"type":"string","maxLength":40000},"contextBefore":{"type":"string","maxLength":600},"contextAfter":{"type":"string","maxLength":600},"subject":{"type":"string","maxLength":998},"attempt":{"type":"integer","minimum":0,"maximum":20},"useWritingStyle":{"type":"boolean"},"recipients":{"maxItems":100,"type":"array","items":{"type":"string","format":"email"}},"account":{"type":"string","enum":["google","microsoft","imap"]}},"required":["action","selectedText"],"additionalProperties":false},"examples":[{"description":"Tighten a paragraph","input":{"action":"shorten","selectedText":"I just wanted to reach out and follow up on…"},"output":{"text":"Following up on…","action":"shorten"}},{"description":"Custom instruction","input":{"action":"custom","instruction":"Add a polite deadline of Friday","selectedText":"Please send the signed contract."},"output":{"text":"Could you send the signed contract by Friday?","action":"custom"}}],"related":["create_mail_draft","get_mail_message"],"idempotent":false,"annotations":{"title":"Suggest Email Rewrite","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:create_draft"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:create_draft"]}]}},{"name":"create_mail_draft","surface":"data","description":"Create a provider draft for the current user with complete To/Cc/Bcc, subject, body, priority, and reply-thread metadata. This NEVER sends mail. In Atlas, present the complete draft to the user for editing and explicit confirmation; do not imply it was sent.","entity":"mailbox","action":"create_draft","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"to":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"email"}},"cc":{"maxItems":100,"type":"array","items":{"type":"string","format":"email"}},"bcc":{"maxItems":100,"type":"array","items":{"type":"string","format":"email"}},"subject":{"type":"string","minLength":1,"maxLength":998},"bodyHtml":{"type":"string","minLength":1,"maxLength":500000},"importance":{"type":"string","enum":["low","normal","high"]},"inReplyTo":{"type":"string","minLength":1,"maxLength":16384},"threadId":{"type":"string","minLength":1,"maxLength":16384}},"required":["to","subject","bodyHtml"],"additionalProperties":false},"examples":[{"description":"Create a reply draft for review","input":{"to":["customer@example.com"],"subject":"Re: Renewal","bodyHtml":"<p>Hi…</p>"},"output":{"draftId":"b64~...","sent":false}},{"description":"Create a high-priority draft with copy recipients","input":{"account":"google","to":["customer@example.com"],"cc":["owner@example.com"],"bcc":["archive@example.com"],"subject":"Revised proposal","bodyHtml":"<p>Please review.</p>","importance":"high"},"output":{"draftId":"b64~...","reviewRequired":true}}],"related":["get_mail_message","list_mail_folders"],"idempotent":false,"annotations":{"title":"Create Mail Draft","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:create_draft"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:create_draft"]}]}},{"name":"set_mail_read_state","surface":"data","description":"Mark a message read or unread in the current user's provider mailbox.","entity":"mailbox","action":"update","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"messageId":{"type":"string","minLength":1,"maxLength":16384},"read":{"type":"boolean"}},"required":["messageId","read"],"additionalProperties":false},"examples":[{"description":"Mark a message unread","input":{"messageId":"b64~...","read":false},"output":{"ok":true}},{"description":"Mark a handled Gmail message read","input":{"account":"google","messageId":"b64~...","read":true},"output":{"ok":true,"read":true}}],"related":["get_mail_message","move_mail_message"],"idempotent":true,"annotations":{"title":"Set Mail Read State","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:update"]}]}},{"name":"move_mail_message","surface":"data","description":"File a message by moving it into a provider folder. Call list_mail_folders first and use an exact folder id whose canMoveTo is true. This changes the user's mailbox and should only be done when their intent is clear.","entity":"mailbox","action":"update","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"]},"messageId":{"type":"string","minLength":1,"maxLength":16384},"destinationFolder":{"type":"string","minLength":1,"maxLength":4096}},"required":["messageId","destinationFolder"],"additionalProperties":false},"examples":[{"description":"File a handled message","input":{"messageId":"b64~...","destinationFolder":"Processed"},"output":{"ok":true}},{"description":"Archive a Gmail message","input":{"account":"google","messageId":"b64~...","destinationFolder":"archive"},"output":{"ok":true,"destinationFolder":"archive"}}],"related":["list_mail_folders","get_mail_message","set_mail_read_state"],"idempotent":false,"annotations":{"title":"Move Mail Message","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:update"]}]}},{"name":"list_email_engagement_activity","surface":"data","description":"List counted email opens/clicks from the existing engagement feed. Defaults to the current sender; all remains limited by mailbox record scope. Opens identify an email, not a person; proxy device/location is unknown. Uses existing retention deadlines.","entity":"mailbox","action":"list","inputSchema":{"type":"object","properties":{"scope":{"default":"mine","description":"Own sends or all sends allowed by the existing mailbox record scope","type":"string","enum":["mine","all"]},"kind":{"default":"any","description":"Activity type","type":"string","enum":["any","opens","clicks"]},"days":{"default":30,"description":"Lookback days","anyOf":[{"type":"number","const":7},{"type":"number","const":30},{"type":"number","const":100}]},"limit":{"default":50,"description":"Page size; maximum 500","type":"integer","minimum":1,"maximum":500},"cursor":{"description":"Opaque nextCursor returned by the preceding page","type":"string","maxLength":2048}},"additionalProperties":false},"outputSchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"sendId":{"type":"string"},"subject":{"type":["string","null"]},"sentAt":{"type":"string"},"captureEndsAt":{"type":"string"},"retentionEndsAt":{"type":"string"},"state":{"type":"string","enum":["capturing","summary"]},"recipientEmail":{"type":["string","null"]},"openCount":{"type":"number"},"clickCount":{"type":"number"},"firstActivityAt":{"type":["string","null"]},"lastActivityAt":{"type":["string","null"]},"captureDays":{"type":"number"},"contact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"account":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"sentByMe":{"type":"boolean"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["opened","clicked"]},"occurredAt":{"type":"string"},"device":{"type":"string","enum":["desktop","mobile","tablet","unknown"]},"url":{"type":["string","null"]},"openOrdinal":{"type":["number","null"]},"countsTowardTotals":{"type":"boolean"},"flags":{"type":"object","properties":{"prefetch":{"type":"boolean"},"machine":{"type":"boolean"},"bot":{"type":"boolean"}},"required":["prefetch","machine","bot"],"additionalProperties":false}},"required":["id","type","occurredAt","device","url","openOrdinal","countsTowardTotals","flags"],"additionalProperties":false}},"eventsTruncated":{"type":"boolean"},"detailAvailable":{"type":"boolean"}},"required":["sendId","subject","sentAt","captureEndsAt","retentionEndsAt","state","recipientEmail","openCount","clickCount","firstActivityAt","lastActivityAt","captureDays","contact","account","sentByMe","events","eventsTruncated","detailAvailable"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"limit":{"type":"number"},"count":{"type":"number"},"hasMore":{"type":"boolean"},"nextCursor":{"type":["string","null"]},"prevCursor":{"type":"null"},"total":{"type":"number"},"totalPages":{"type":"number"},"currentPage":{"type":"number"}},"required":["limit","count","hasMore","nextCursor","prevCursor","total","totalPages","currentPage"],"additionalProperties":false},"wideScopeAvailable":{"type":"boolean"},"location":{"type":"object","properties":{"available":{"type":"boolean","const":false}},"required":["available"],"additionalProperties":false},"limitations":{"readOnly":true,"type":"array","items":{"type":"string"}},"filters":{"type":"object","properties":{"scope":{"type":"string","enum":["mine","all"]},"kind":{"type":"string","enum":["any","opens","clicks"]},"days":{"type":"number"}},"required":["scope","kind","days"],"additionalProperties":false}},"required":["items","pagination","wideScopeAvailable","location","limitations","filters"],"additionalProperties":false},"examples":[{"description":"My recent opens","input":{"scope":"mine","kind":"opens","days":7},"output":{"items":[],"pagination":{"limit":50,"count":0,"hasMore":false,"nextCursor":null,"prevCursor":null,"total":0,"totalPages":1,"currentPage":1},"filters":{"scope":"mine","kind":"opens","days":7},"wideScopeAvailable":false,"location":{"available":false},"limitations":["event_identifies_email_not_person"]}},{"description":"Clicks in the allowed mailbox scope","input":{"scope":"all","kind":"clicks","days":30,"limit":50},"output":{"items":[],"pagination":{"limit":50,"count":0,"hasMore":false,"nextCursor":null,"prevCursor":null,"total":0,"totalPages":1,"currentPage":1},"filters":{"scope":"all","kind":"clicks","days":30},"wideScopeAvailable":false,"location":{"available":false},"limitations":["event_identifies_email_not_person"]}}],"related":["get_email_engagement"],"idempotent":true,"annotations":{"title":"List Email Engagement Activity","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:list"]}]}},{"name":"get_email_engagement","surface":"data","description":"Read the current sender's tracked-email summary and bounded open/click history, including excluded scanner/prefetch events, inferred device and frozen capture/retention deadlines. Expired or another sender's analytics are unavailable; no IP or precise location is returned.","entity":"mailbox","action":"read","inputSchema":{"type":"object","properties":{"sendId":{"type":"string","pattern":"^eng_[A-Za-z0-9_-]{1,80}$","description":"Exact sendId from the engagement activity list"}},"required":["sendId"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"email":{"type":"object","properties":{"sendId":{"type":"string"},"subject":{"type":["string","null"]},"sentAt":{"type":"string"},"captureEndsAt":{"type":"string"},"retentionEndsAt":{"type":"string"},"state":{"type":"string","enum":["capturing","summary"]},"recipientEmail":{"type":["string","null"]},"openCount":{"type":"number"},"clickCount":{"type":"number"},"firstActivityAt":{"type":["string","null"]},"lastActivityAt":{"type":["string","null"]},"contactId":{"type":["string","null"]}},"required":["sendId","subject","sentAt","captureEndsAt","retentionEndsAt","state","recipientEmail","openCount","clickCount","firstActivityAt","lastActivityAt","contactId"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["opened","clicked"]},"occurredAt":{"type":"string"},"device":{"type":"string","enum":["desktop","mobile","tablet","unknown"]},"url":{"type":["string","null"]},"openOrdinal":{"type":["number","null"]},"countsTowardTotals":{"type":"boolean"},"flags":{"type":"object","properties":{"prefetch":{"type":"boolean"},"machine":{"type":"boolean"},"bot":{"type":"boolean"}},"required":["prefetch","machine","bot"],"additionalProperties":false}},"required":["id","type","occurredAt","device","url","openOrdinal","countsTowardTotals","flags"],"additionalProperties":false}},"detailAvailable":{"type":"boolean"},"location":{"type":"object","properties":{"available":{"type":"boolean","const":false}},"required":["available"],"additionalProperties":false},"limitations":{"readOnly":true,"type":"array","items":{"type":"string"}}},"required":["email","events","detailAvailable","location","limitations"],"additionalProperties":false},"examples":[{"description":"Inspect a tracked email from my feed","input":{"sendId":"eng_example"},"output":{"email":{"sendId":"eng_example","subject":"Example email","sentAt":"2026-10-19T08:00:00Z","captureEndsAt":"2027-01-27T08:00:00Z","retentionEndsAt":"2027-10-19T08:00:00Z","state":"capturing","recipientEmail":null,"openCount":0,"clickCount":0,"firstActivityAt":null,"lastActivityAt":null,"contactId":null},"detailAvailable":true,"events":[],"location":{"available":false},"limitations":[]}},{"description":"Read a finalized compact summary","input":{"sendId":"eng_summary"},"output":{"email":{"sendId":"eng_summary","subject":"Example email","sentAt":"2026-10-19T08:00:00Z","captureEndsAt":"2027-01-27T08:00:00Z","retentionEndsAt":"2027-10-19T08:00:00Z","state":"summary","recipientEmail":null,"openCount":0,"clickCount":0,"firstActivityAt":null,"lastActivityAt":null,"contactId":null},"detailAvailable":false,"events":[],"location":{"available":false},"limitations":[]}}],"related":["list_email_engagement_activity"],"idempotent":true,"annotations":{"title":"Get Email Engagement","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:read"]}]}},{"name":"get_email_thread_filing","surface":"data","description":"Inspect the current user's message-to-record filing and scoped suggestions. A suggestion is not a confirmed association. Supports deals, projects, work orders and tickets through the same reader service. This inspection does not materialize reference tags or write attribution; use update_email_thread_filing after confirmation.","entity":"mailbox","action":"read","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"],"description":"Current user's connected mailbox provider"},"messageId":{"type":"string","minLength":1,"maxLength":16384,"description":"Transport-safe message id returned by get/list mail tools"}},"required":["account","messageId"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"supported":{"type":"boolean"},"confirmed":{"anyOf":[{"type":"object","properties":{"windowId":{"type":"string"},"entityType":{"type":"string","enum":["deal","project","work_order","ticket"]},"entityId":{"type":"string"},"label":{"type":["string","null"]},"referenceNo":{"type":["string","null"]},"href":{"type":["string","null"]},"source":{"type":"string"},"effectiveFrom":{"type":["string","null"]},"autoLog":{"type":"boolean"}},"required":["windowId","entityType","entityId","label","referenceNo","href","source","effectiveFrom","autoLog"],"additionalProperties":false},{"type":"null"}]},"suggestion":{"type":"object","properties":{"level":{"type":"string","enum":["high","low","none"]},"suggestions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["deal","project","work_order","ticket"]},"id":{"type":"string"},"label":{"type":"string"},"confidence":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}}},"required":["type","id","label","confidence","reasons"],"additionalProperties":false}}},"required":["level","suggestions"],"additionalProperties":false}},"required":["supported","confirmed","suggestion"],"additionalProperties":false},"examples":[{"description":"Inspect an existing conversation","input":{"account":"microsoft","messageId":"message-a"},"output":{"supported":true,"confirmed":null,"suggestion":{"level":"none","suggestions":[]}}},{"description":"Inspect a message without a conversation id","input":{"account":"google","messageId":"message-b"},"output":{"supported":false,"confirmed":null,"suggestion":{"level":"none","suggestions":[]}}}],"related":["update_email_thread_filing","get_mail_message"],"idempotent":true,"annotations":{"title":"Get Email Thread Filing","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["mailbox:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["mailbox:read"]}]}},{"name":"update_email_thread_filing","surface":"data","description":"Confirm or correct email filing ONLY after the user explicitly chooses the target record and scope. Requires mailbox:read, activity:create and target-record read scope. Files the current message and enables differential, deduplicated future thread logging while access remains. from_here splits a reused thread. moveLogged can rehome earlier auto-logged entries in that range; never infer approval.","entity":"activity","action":"create","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"],"description":"Current user's connected mailbox provider"},"messageId":{"type":"string","minLength":1,"maxLength":16384,"description":"Transport-safe message id returned by get/list mail tools"},"entityType":{"type":"string","enum":["deal","project","work_order","ticket"],"description":"Confirmed target record kind"},"entityId":{"type":"string","minLength":1,"maxLength":64,"description":"Confirmed accessible target record id"},"scope":{"default":"thread","description":"Whole conversation or only this message and newer replies","type":"string","enum":["thread","from_here"]},"moveLogged":{"description":"Rehome existing auto-logged entries in the selected range","type":"boolean"},"confirmed":{"type":"boolean","const":true,"description":"True only after the user explicitly confirms target and scope"}},"required":["account","messageId","entityType","entityId","confirmed"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"windowId":{"type":"string"},"logged":{"type":"boolean"},"moved":{"type":"number"}},"required":["windowId","logged","moved"],"additionalProperties":false},"examples":[{"description":"Confirm a ticket conversation","input":{"account":"microsoft","messageId":"message-a","entityType":"ticket","entityId":"ticket-a","scope":"thread","confirmed":true},"output":{"windowId":"window-a","logged":true,"moved":0}},{"description":"Split a reused thread for another work order","input":{"account":"imap","messageId":"message-b","entityType":"work_order","entityId":"work-order-b","scope":"from_here","moveLogged":false,"confirmed":true},"output":{"windowId":"window-b","logged":true,"moved":0}}],"related":["get_email_thread_filing"],"idempotent":false,"annotations":{"title":"Update Email Thread Filing","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["activity:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["activity:create"]}]}},{"name":"create_ticket_from_email","surface":"data","description":"Log the open email as a support ticket ONLY after the user explicitly asks. Subject, sender and body are read from the real message; the sender is linked to a CRM contact when exactly one matches. Idempotent per message (existing=true returns the ticket already opened from it). followThread (default true) logs later replies of the conversation on the ticket. Requires mailbox:read and ticket:create.","entity":"ticket","action":"create","inputSchema":{"type":"object","properties":{"account":{"type":"string","enum":["google","microsoft","imap"],"description":"Current user's connected mailbox provider"},"messageId":{"type":"string","minLength":1,"maxLength":16384,"description":"Transport-safe message id returned by get/list mail tools"},"subject":{"description":"Override the email subject","type":"string","maxLength":300},"priority":{"type":"string","enum":["critical","high","medium","low"]},"ticketType":{"type":"string","enum":["question","problem","feature_request","incident","task"]},"category":{"type":"string","maxLength":120},"followThread":{"description":"Log later replies on the ticket (default true)","type":"boolean"},"confirmed":{"type":"boolean","const":true,"description":"True only after the user explicitly asked to create the ticket"}},"required":["account","messageId","confirmed"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"ticketNumber":{"type":["string","null"]},"existing":{"type":"boolean"},"threadFollowed":{"type":"boolean"}},"required":["id","ticketNumber","existing","threadFollowed"],"additionalProperties":false},"examples":[{"description":"Turn a customer email into a ticket","input":{"account":"microsoft","messageId":"message-a","priority":"high","confirmed":true},"output":{"id":"ticket-a","ticketNumber":"CS-0142","existing":false,"threadFollowed":true}}],"related":["get_mail_message","get_ticket_recommendations","update_email_thread_filing"],"idempotent":true,"annotations":{"title":"Create Ticket From Email","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:create"]}]}},{"name":"list_employees","surface":"data","description":"List HR/workforce employee records. Filter by department (name, e.g. \"sales\") or departmentId. Employees may exist without a CaptivaHQ login; accessStatus and userId show the optional access link. For headcount use countOnly=true or groupBy=department|status over ALL matching employees (not the page).","entity":"employee","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"departmentId":{"type":"string"},"department":{"type":"string","maxLength":120},"groupBy":{"type":"string","enum":["department","status"]},"countOnly":{"type":"boolean"},"regionId":{"type":"string"},"status":{"type":"string"},"accessStatus":{"type":"string","enum":["none","pending","active","suspended"]},"assignable":{"type":"string","enum":["1"]},"userIds":{"anyOf":[{"type":"string","maxLength":8000},{"maxItems":200,"type":"array","items":{"type":"string","maxLength":128}}]},"linked":{"type":"string","enum":["true","false"]},"directory":{"type":"string","enum":["1"]},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"All employees","input":{},"output":{"items":[]}}],"related":["get_employee","create_employee","list_workspace_users"],"idempotent":true,"annotations":{"title":"List Employees","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["employee:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["employee:list"]}]}},{"name":"get_employee","surface":"data","description":"Read an employee's HR profile, employment status, and optional system-access link.","entity":"employee","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Employee profile","input":{"id":"employee-id"},"output":{"id":"employee-id"}}],"related":["list_employees","update_employee","list_employee_compensation"],"idempotent":true,"annotations":{"title":"Get Employee","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["employee:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["employee:read"]}]}},{"name":"create_employee","surface":"data","description":"Create an employee record without granting login access. Use invite_user separately only when access is wanted.","entity":"employee","action":"create","inputSchema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":120},"lastName":{"type":"string","minLength":1,"maxLength":120},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"managerId":{"type":["string","null"]},"departmentId":{"type":["string","null"]},"costCenterId":{"type":["string","null"]},"regionId":{"type":["string","null"]},"locale":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"personalEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"workLocation":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"employmentType":{"type":"string","enum":["full_time","part_time","contractor","temporary","intern","other"]},"status":{"type":"string","enum":["active","on_leave","inactive","terminated"]},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["firstName","lastName"],"additionalProperties":false},"examples":[{"description":"Employee only","input":{"firstName":"Alex","lastName":"Rivera","employmentType":"full_time"},"output":{"id":"employee-id","accessStatus":"none"}}],"related":["invite_user","list_employees"],"idempotent":false,"annotations":{"title":"Create Employee","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["employee:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["employee:create"]}]}},{"name":"update_employee","surface":"data","description":"Update HR employee details. This does not grant or revoke system access.","entity":"employee","action":"update","inputSchema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":120},"lastName":{"type":"string","minLength":1,"maxLength":120},"title":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"managerId":{"type":["string","null"]},"departmentId":{"type":["string","null"]},"costCenterId":{"type":["string","null"]},"regionId":{"type":["string","null"]},"locale":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"personalEmail":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"workLocation":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"employmentType":{"type":"string","enum":["full_time","part_time","contractor","temporary","intern","other"]},"status":{"type":"string","enum":["active","on_leave","inactive","terminated"]},"startDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"endDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Put employee on leave","input":{"id":"employee-id","status":"on_leave"},"output":{"ok":true}}],"related":["get_employee"],"idempotent":true,"annotations":{"title":"Update Employee","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["employee:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["employee:update"]}]}},{"name":"list_workspace_users","surface":"data","description":"Admin-only list of sign-in identities, invitations, roles, groups, MFA, last login, and optional employee links.","entity":"user","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"status":{"type":"string","enum":["active","pending","suspended","revoked"]},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"additionalProperties":{}},"examples":[{"description":"Users and pending invites","input":{},"output":{"items":[]}}],"related":["invite_user","list_employees"],"idempotent":true,"annotations":{"title":"List Workspace Users","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["user:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["user:list"]}]}},{"name":"invite_user","surface":"data","description":"Invite a user to sign in. employeeId optionally links an existing employee; omit it for a user-only identity.","entity":"user","action":"create","inputSchema":{"type":"object","properties":{"email":{"type":"string","minLength":1},"firstName":{"type":"string","minLength":1,"maxLength":120},"lastName":{"type":"string","minLength":1,"maxLength":120},"role":{"type":"string","enum":["owner","admin","member"]},"groupId":{"type":"string","minLength":1,"maxLength":64},"employeeId":{"type":"string","minLength":1,"maxLength":128}},"required":["email","firstName","lastName"],"additionalProperties":false},"examples":[{"description":"Grant an employee access","input":{"firstName":"Alex","lastName":"Rivera","email":"alex@example.com","role":"member","employeeId":"employee-id"},"output":{"ok":true}}],"related":["create_employee","list_workspace_users"],"idempotent":false,"annotations":{"title":"Invite User","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["user:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["user:create"]}]}},{"name":"list_employee_compensation","surface":"data","description":"List permission-sensitive effective-dated compensation for one employee.","entity":"employee-compensation","action":"list","inputSchema":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":2000},"count":{"type":"string","const":"false"}},"required":["employeeId"],"additionalProperties":false},"examples":[{"description":"Compensation history","input":{"employeeId":"employee-id"},"output":{"items":[]}}],"related":["create_employee_compensation","get_employee"],"idempotent":true,"annotations":{"title":"List Employee Compensation","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["employee-compensation:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["employee-compensation:list"]}]}},{"name":"create_employee_compensation","surface":"data","description":"Add an effective-dated salary, hourly, daily, or contract compensation record.","entity":"employee-compensation","action":"create","inputSchema":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"payType":{"type":"string","enum":["salary","hourly","daily","contract"]},"amount":{"type":"number","minimum":0},"currency":{"default":"USD","type":"string","minLength":3,"maxLength":3},"payFrequency":{"type":"string","enum":["hourly","weekly","biweekly","semimonthly","monthly","annual","one_time"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["employeeId","payType","amount","payFrequency","effectiveFrom"],"additionalProperties":false},"examples":[{"description":"Annual salary","input":{"employeeId":"employee-id","payType":"salary","amount":85000,"currency":"USD","payFrequency":"annual","effectiveFrom":"2026-01-01"},"output":{"id":"compensation-id"}}],"related":["list_employee_compensation"],"idempotent":false,"annotations":{"title":"Create Employee Compensation","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["employee-compensation:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["employee-compensation:create"]}]}},{"name":"preflight_project_portal_share","surface":"data","description":"Check whether a project can be shared with selected contacts or the whole customer company. The check is read-only and returns bounded counts and reason codes.","entity":"project","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recordId","scope"],"additionalProperties":false},"examples":[{"description":"Check selected contacts before sharing a project","input":{"recordId":"project_123","scope":"contact","contactIds":["con_123"]},"output":{"eligible":true,"reasonCode":"ready"}},{"description":"Check whole-company eligibility for a project","input":{"recordId":"project_123","scope":"company"},"output":{"eligible":true,"requestedContactCount":12}}],"related":["share_project_portal","get_project_portal_share_status"],"idempotent":true,"annotations":{"title":"Preflight Project Portal Share","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}]}},{"name":"share_project_portal","surface":"data","description":"Create or reopen the authoritative portal control for a project and grant access to a validated contact audience. Every mutation requires expectedVersion and the MCP _meta.idempotencyKey.","entity":"project","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"notify":{"type":"boolean"}},"required":["recordId","expectedVersion","scope","notify"],"additionalProperties":false},"examples":[{"description":"Share a project with one contact","input":{"recordId":"project_123","expectedVersion":0,"scope":"contact","contactIds":["con_123"],"notify":true},"output":{"applied":true,"version":1}},{"description":"Share a project with the full customer company","input":{"recordId":"project_123","expectedVersion":0,"scope":"company","notify":false},"output":{"applied":true,"version":1}}],"related":["preflight_project_portal_share","revoke_project_portal_share"],"annotations":{"title":"Share Project Portal","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}]}},{"name":"get_project_portal_share_status","surface":"data","description":"Read the authoritative portal control, grant counts, exclusions, and effective recipient count for a project. An unshared parent returns virtual version zero without creating state.","entity":"project","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"Read project portal sharing state","input":{"recordId":"project_123"},"output":{"record":{"version":1,"enabled":true},"effectiveRecipientCount":1}},{"description":"Read a project that has never been shared","input":{"recordId":"project_123"},"output":{"record":{"version":0,"enabled":false},"effectiveRecipientCount":0}}],"related":["preflight_project_portal_share","list_project_portal_share_recipients"],"idempotent":true,"annotations":{"title":"Get Project Portal Share Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}]}},{"name":"list_project_portal_share_recipients","surface":"data","description":"List paginated portal recipients for a project, including direct, company, creator, exclusion, effective, and bounded block-reason state.","entity":"project","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"List the first page of project recipients","input":{"recordId":"project_123","limit":50},"output":{"items":[],"pagination":{"hasMore":false}}},{"description":"Continue a project recipient page","input":{"recordId":"project_123","cursor":"con_123","limit":25},"output":{"items":[],"pagination":{"currentPage":2}}}],"related":["get_project_portal_share_status","revoke_project_portal_share"],"idempotent":true,"annotations":{"title":"List Project Portal Share Recipients","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}]}},{"name":"revoke_project_portal_share","surface":"data","description":"Revoke one active portal grant for a project. The service reauthorizes the current parent scope before replaying an idempotency receipt.","entity":"project","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"grantId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","grantId"],"additionalProperties":false},"examples":[{"description":"Revoke a direct project portal grant","input":{"recordId":"project_123","grantId":"pgr_123","expectedVersion":2},"output":{"applied":true,"version":3}},{"description":"Revoke a company project portal grant","input":{"recordId":"project_123","grantId":"pgr_company","expectedVersion":1},"output":{"applied":true,"version":2}}],"related":["share_project_portal","get_project_portal_share_status"],"annotations":{"title":"Revoke Project Portal Share","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}]}},{"name":"exclude_project_portal_contact","surface":"data","description":"Explicitly exclude one contact from a project portal audience. Exclusions override direct, company, and creator origins and require expectedVersion plus _meta.idempotencyKey.","entity":"project","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Exclude a contact from a project","input":{"recordId":"project_123","contactId":"con_123","expectedVersion":1},"output":{"applied":true,"scope":"exclude"}},{"description":"Exclude another contact from a project","input":{"recordId":"project_123","contactId":"con_456","expectedVersion":2},"output":{"applied":true,"scope":"exclude"}}],"related":["clear_project_portal_contact_exclusion","list_project_portal_share_recipients"],"annotations":{"title":"Exclude Project Portal Contact","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}]}},{"name":"clear_project_portal_contact_exclusion","surface":"data","description":"Clear one explicit project portal contact exclusion after current platform, profile, company, contact, grant, and scope checks. Clearing can expand access and is fully revalidated.","entity":"project","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Restore a previously excluded project contact","input":{"recordId":"project_123","contactId":"con_123","expectedVersion":2},"output":{"applied":true,"scope":"clear_exclusion"}},{"description":"Restore another project contact after review","input":{"recordId":"project_123","contactId":"con_456","expectedVersion":5},"output":{"applied":true,"scope":"clear_exclusion"}}],"related":["exclude_project_portal_contact","list_project_portal_share_recipients"],"annotations":{"title":"Clear Project Portal Contact Exclusion","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}]}},{"name":"set_project_portal_publication","surface":"data","description":"Enable or disable publication of a project through its authoritative portal record control. Enabling rechecks the current company and effective audience.","entity":"project","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"boolean"}},"required":["recordId","expectedVersion","enabled"],"additionalProperties":false},"examples":[{"description":"Publish a reviewed project","input":{"recordId":"project_123","expectedVersion":1,"enabled":true},"output":{"applied":true,"version":2}},{"description":"Unpublish a project while retaining grants","input":{"recordId":"project_123","expectedVersion":2,"enabled":false},"output":{"applied":true,"version":3}}],"related":["share_project_portal","get_project_portal_share_status"],"annotations":{"title":"Set Project Portal Publication","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["project:share_portal"]}]}},{"name":"preflight_invoice_portal_share","surface":"data","description":"Check whether a invoice can be shared with selected contacts or the whole customer company. The check is read-only and returns bounded counts and reason codes.","entity":"invoice","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recordId","scope"],"additionalProperties":false},"examples":[{"description":"Check selected contacts before sharing a invoice","input":{"recordId":"invoice_123","scope":"contact","contactIds":["con_123"]},"output":{"eligible":true,"reasonCode":"ready"}},{"description":"Check whole-company eligibility for a invoice","input":{"recordId":"invoice_123","scope":"company"},"output":{"eligible":true,"requestedContactCount":12}}],"related":["share_invoice_portal","get_invoice_portal_share_status"],"idempotent":true,"annotations":{"title":"Preflight Invoice Portal Share","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}]}},{"name":"share_invoice_portal","surface":"data","description":"Create or reopen the authoritative portal control for a invoice and grant access to a validated contact audience. Every mutation requires expectedVersion and the MCP _meta.idempotencyKey.","entity":"invoice","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"notify":{"type":"boolean"}},"required":["recordId","expectedVersion","scope","notify"],"additionalProperties":false},"examples":[{"description":"Share a invoice with one contact","input":{"recordId":"invoice_123","expectedVersion":0,"scope":"contact","contactIds":["con_123"],"notify":true},"output":{"applied":true,"version":1}},{"description":"Share a invoice with the full customer company","input":{"recordId":"invoice_123","expectedVersion":0,"scope":"company","notify":false},"output":{"applied":true,"version":1}}],"related":["preflight_invoice_portal_share","revoke_invoice_portal_share"],"annotations":{"title":"Share Invoice Portal","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}]}},{"name":"get_invoice_portal_share_status","surface":"data","description":"Read the authoritative portal control, grant counts, exclusions, and effective recipient count for a invoice. An unshared parent returns virtual version zero without creating state.","entity":"invoice","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"Read invoice portal sharing state","input":{"recordId":"invoice_123"},"output":{"record":{"version":1,"enabled":true},"effectiveRecipientCount":1}},{"description":"Read a invoice that has never been shared","input":{"recordId":"invoice_123"},"output":{"record":{"version":0,"enabled":false},"effectiveRecipientCount":0}}],"related":["preflight_invoice_portal_share","list_invoice_portal_share_recipients"],"idempotent":true,"annotations":{"title":"Get Invoice Portal Share Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}]}},{"name":"list_invoice_portal_share_recipients","surface":"data","description":"List paginated portal recipients for a invoice, including direct, company, creator, exclusion, effective, and bounded block-reason state.","entity":"invoice","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"List the first page of invoice recipients","input":{"recordId":"invoice_123","limit":50},"output":{"items":[],"pagination":{"hasMore":false}}},{"description":"Continue a invoice recipient page","input":{"recordId":"invoice_123","cursor":"con_123","limit":25},"output":{"items":[],"pagination":{"currentPage":2}}}],"related":["get_invoice_portal_share_status","revoke_invoice_portal_share"],"idempotent":true,"annotations":{"title":"List Invoice Portal Share Recipients","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}]}},{"name":"revoke_invoice_portal_share","surface":"data","description":"Revoke one active portal grant for a invoice. The service reauthorizes the current parent scope before replaying an idempotency receipt.","entity":"invoice","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"grantId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","grantId"],"additionalProperties":false},"examples":[{"description":"Revoke a direct invoice portal grant","input":{"recordId":"invoice_123","grantId":"pgr_123","expectedVersion":2},"output":{"applied":true,"version":3}},{"description":"Revoke a company invoice portal grant","input":{"recordId":"invoice_123","grantId":"pgr_company","expectedVersion":1},"output":{"applied":true,"version":2}}],"related":["share_invoice_portal","get_invoice_portal_share_status"],"annotations":{"title":"Revoke Invoice Portal Share","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}]}},{"name":"exclude_invoice_portal_contact","surface":"data","description":"Explicitly exclude one contact from a invoice portal audience. Exclusions override direct, company, and creator origins and require expectedVersion plus _meta.idempotencyKey.","entity":"invoice","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Exclude a contact from a invoice","input":{"recordId":"invoice_123","contactId":"con_123","expectedVersion":1},"output":{"applied":true,"scope":"exclude"}},{"description":"Exclude another contact from a invoice","input":{"recordId":"invoice_123","contactId":"con_456","expectedVersion":2},"output":{"applied":true,"scope":"exclude"}}],"related":["clear_invoice_portal_contact_exclusion","list_invoice_portal_share_recipients"],"annotations":{"title":"Exclude Invoice Portal Contact","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}]}},{"name":"clear_invoice_portal_contact_exclusion","surface":"data","description":"Clear one explicit invoice portal contact exclusion after current platform, profile, company, contact, grant, and scope checks. Clearing can expand access and is fully revalidated.","entity":"invoice","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Restore a previously excluded invoice contact","input":{"recordId":"invoice_123","contactId":"con_123","expectedVersion":2},"output":{"applied":true,"scope":"clear_exclusion"}},{"description":"Restore another invoice contact after review","input":{"recordId":"invoice_123","contactId":"con_456","expectedVersion":5},"output":{"applied":true,"scope":"clear_exclusion"}}],"related":["exclude_invoice_portal_contact","list_invoice_portal_share_recipients"],"annotations":{"title":"Clear Invoice Portal Contact Exclusion","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}]}},{"name":"set_invoice_portal_publication","surface":"data","description":"Enable or disable publication of a invoice through its authoritative portal record control. Enabling rechecks the current company and effective audience.","entity":"invoice","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"boolean"}},"required":["recordId","expectedVersion","enabled"],"additionalProperties":false},"examples":[{"description":"Publish a reviewed invoice","input":{"recordId":"invoice_123","expectedVersion":1,"enabled":true},"output":{"applied":true,"version":2}},{"description":"Unpublish a invoice while retaining grants","input":{"recordId":"invoice_123","expectedVersion":2,"enabled":false},"output":{"applied":true,"version":3}}],"related":["share_invoice_portal","get_invoice_portal_share_status"],"annotations":{"title":"Set Invoice Portal Publication","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["invoice:share_portal"]}]}},{"name":"preflight_work_order_portal_share","surface":"data","description":"Check whether a work order can be shared with selected contacts or the whole customer company. The check is read-only and returns bounded counts and reason codes.","entity":"work_order","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recordId","scope"],"additionalProperties":false},"examples":[{"description":"Check selected contacts before sharing a work order","input":{"recordId":"work_order_123","scope":"contact","contactIds":["con_123"]},"output":{"eligible":true,"reasonCode":"ready"}},{"description":"Check whole-company eligibility for a work order","input":{"recordId":"work_order_123","scope":"company"},"output":{"eligible":true,"requestedContactCount":12}}],"related":["share_work_order_portal","get_work_order_portal_share_status"],"idempotent":true,"annotations":{"title":"Preflight Work Order Portal Share","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}]}},{"name":"share_work_order_portal","surface":"data","description":"Create or reopen the authoritative portal control for a work order and grant access to a validated contact audience. Every mutation requires expectedVersion and the MCP _meta.idempotencyKey.","entity":"work_order","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"notify":{"type":"boolean"}},"required":["recordId","expectedVersion","scope","notify"],"additionalProperties":false},"examples":[{"description":"Share a work order with one contact","input":{"recordId":"work_order_123","expectedVersion":0,"scope":"contact","contactIds":["con_123"],"notify":true},"output":{"applied":true,"version":1}},{"description":"Share a work order with the full customer company","input":{"recordId":"work_order_123","expectedVersion":0,"scope":"company","notify":false},"output":{"applied":true,"version":1}}],"related":["preflight_work_order_portal_share","revoke_work_order_portal_share"],"annotations":{"title":"Share Work Order Portal","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}]}},{"name":"get_work_order_portal_share_status","surface":"data","description":"Read the authoritative portal control, grant counts, exclusions, and effective recipient count for a work order. An unshared parent returns virtual version zero without creating state.","entity":"work_order","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"Read work order portal sharing state","input":{"recordId":"work_order_123"},"output":{"record":{"version":1,"enabled":true},"effectiveRecipientCount":1}},{"description":"Read a work order that has never been shared","input":{"recordId":"work_order_123"},"output":{"record":{"version":0,"enabled":false},"effectiveRecipientCount":0}}],"related":["preflight_work_order_portal_share","list_work_order_portal_share_recipients"],"idempotent":true,"annotations":{"title":"Get Work Order Portal Share Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}]}},{"name":"list_work_order_portal_share_recipients","surface":"data","description":"List paginated portal recipients for a work order, including direct, company, creator, exclusion, effective, and bounded block-reason state.","entity":"work_order","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"List the first page of work order recipients","input":{"recordId":"work_order_123","limit":50},"output":{"items":[],"pagination":{"hasMore":false}}},{"description":"Continue a work order recipient page","input":{"recordId":"work_order_123","cursor":"con_123","limit":25},"output":{"items":[],"pagination":{"currentPage":2}}}],"related":["get_work_order_portal_share_status","revoke_work_order_portal_share"],"idempotent":true,"annotations":{"title":"List Work Order Portal Share Recipients","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}]}},{"name":"revoke_work_order_portal_share","surface":"data","description":"Revoke one active portal grant for a work order. The service reauthorizes the current parent scope before replaying an idempotency receipt.","entity":"work_order","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"grantId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","grantId"],"additionalProperties":false},"examples":[{"description":"Revoke a direct work order portal grant","input":{"recordId":"work_order_123","grantId":"pgr_123","expectedVersion":2},"output":{"applied":true,"version":3}},{"description":"Revoke a company work order portal grant","input":{"recordId":"work_order_123","grantId":"pgr_company","expectedVersion":1},"output":{"applied":true,"version":2}}],"related":["share_work_order_portal","get_work_order_portal_share_status"],"annotations":{"title":"Revoke Work Order Portal Share","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}]}},{"name":"exclude_work_order_portal_contact","surface":"data","description":"Explicitly exclude one contact from a work order portal audience. Exclusions override direct, company, and creator origins and require expectedVersion plus _meta.idempotencyKey.","entity":"work_order","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Exclude a contact from a work order","input":{"recordId":"work_order_123","contactId":"con_123","expectedVersion":1},"output":{"applied":true,"scope":"exclude"}},{"description":"Exclude another contact from a work order","input":{"recordId":"work_order_123","contactId":"con_456","expectedVersion":2},"output":{"applied":true,"scope":"exclude"}}],"related":["clear_work_order_portal_contact_exclusion","list_work_order_portal_share_recipients"],"annotations":{"title":"Exclude Work Order Portal Contact","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}]}},{"name":"clear_work_order_portal_contact_exclusion","surface":"data","description":"Clear one explicit work order portal contact exclusion after current platform, profile, company, contact, grant, and scope checks. Clearing can expand access and is fully revalidated.","entity":"work_order","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Restore a previously excluded work order contact","input":{"recordId":"work_order_123","contactId":"con_123","expectedVersion":2},"output":{"applied":true,"scope":"clear_exclusion"}},{"description":"Restore another work order contact after review","input":{"recordId":"work_order_123","contactId":"con_456","expectedVersion":5},"output":{"applied":true,"scope":"clear_exclusion"}}],"related":["exclude_work_order_portal_contact","list_work_order_portal_share_recipients"],"annotations":{"title":"Clear Work Order Portal Contact Exclusion","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}]}},{"name":"set_work_order_portal_publication","surface":"data","description":"Enable or disable publication of a work order through its authoritative portal record control. Enabling rechecks the current company and effective audience.","entity":"work_order","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"boolean"}},"required":["recordId","expectedVersion","enabled"],"additionalProperties":false},"examples":[{"description":"Publish a reviewed work order","input":{"recordId":"work_order_123","expectedVersion":1,"enabled":true},"output":{"applied":true,"version":2}},{"description":"Unpublish a work order while retaining grants","input":{"recordId":"work_order_123","expectedVersion":2,"enabled":false},"output":{"applied":true,"version":3}}],"related":["share_work_order_portal","get_work_order_portal_share_status"],"annotations":{"title":"Set Work Order Portal Publication","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["work_order:share_portal"]}]}},{"name":"preflight_ticket_portal_share","surface":"data","description":"Check whether a ticket can be shared with selected contacts or the whole customer company. The check is read-only and returns bounded counts and reason codes.","entity":"ticket","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recordId","scope"],"additionalProperties":false},"examples":[{"description":"Check selected contacts before sharing a ticket","input":{"recordId":"ticket_123","scope":"contact","contactIds":["con_123"]},"output":{"eligible":true,"reasonCode":"ready"}},{"description":"Check whole-company eligibility for a ticket","input":{"recordId":"ticket_123","scope":"company"},"output":{"eligible":true,"requestedContactCount":12}}],"related":["share_ticket_portal","get_ticket_portal_share_status"],"idempotent":true,"annotations":{"title":"Preflight Ticket Portal Share","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}]}},{"name":"share_ticket_portal","surface":"data","description":"Create or reopen the authoritative portal control for a ticket and grant access to a validated contact audience. Every mutation requires expectedVersion and the MCP _meta.idempotencyKey.","entity":"ticket","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"notify":{"type":"boolean"}},"required":["recordId","expectedVersion","scope","notify"],"additionalProperties":false},"examples":[{"description":"Share a ticket with one contact","input":{"recordId":"ticket_123","expectedVersion":0,"scope":"contact","contactIds":["con_123"],"notify":true},"output":{"applied":true,"version":1}},{"description":"Share a ticket with the full customer company","input":{"recordId":"ticket_123","expectedVersion":0,"scope":"company","notify":false},"output":{"applied":true,"version":1}}],"related":["preflight_ticket_portal_share","revoke_ticket_portal_share"],"annotations":{"title":"Share Ticket Portal","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}]}},{"name":"get_ticket_portal_share_status","surface":"data","description":"Read the authoritative portal control, grant counts, exclusions, and effective recipient count for a ticket. An unshared parent returns virtual version zero without creating state.","entity":"ticket","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"Read ticket portal sharing state","input":{"recordId":"ticket_123"},"output":{"record":{"version":1,"enabled":true},"effectiveRecipientCount":1}},{"description":"Read a ticket that has never been shared","input":{"recordId":"ticket_123"},"output":{"record":{"version":0,"enabled":false},"effectiveRecipientCount":0}}],"related":["preflight_ticket_portal_share","list_ticket_portal_share_recipients"],"idempotent":true,"annotations":{"title":"Get Ticket Portal Share Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}]}},{"name":"list_ticket_portal_share_recipients","surface":"data","description":"List paginated portal recipients for a ticket, including direct, company, creator, exclusion, effective, and bounded block-reason state.","entity":"ticket","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"List the first page of ticket recipients","input":{"recordId":"ticket_123","limit":50},"output":{"items":[],"pagination":{"hasMore":false}}},{"description":"Continue a ticket recipient page","input":{"recordId":"ticket_123","cursor":"con_123","limit":25},"output":{"items":[],"pagination":{"currentPage":2}}}],"related":["get_ticket_portal_share_status","revoke_ticket_portal_share"],"idempotent":true,"annotations":{"title":"List Ticket Portal Share Recipients","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}]}},{"name":"revoke_ticket_portal_share","surface":"data","description":"Revoke one active portal grant for a ticket. The service reauthorizes the current parent scope before replaying an idempotency receipt.","entity":"ticket","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"grantId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","grantId"],"additionalProperties":false},"examples":[{"description":"Revoke a direct ticket portal grant","input":{"recordId":"ticket_123","grantId":"pgr_123","expectedVersion":2},"output":{"applied":true,"version":3}},{"description":"Revoke a company ticket portal grant","input":{"recordId":"ticket_123","grantId":"pgr_company","expectedVersion":1},"output":{"applied":true,"version":2}}],"related":["share_ticket_portal","get_ticket_portal_share_status"],"annotations":{"title":"Revoke Ticket Portal Share","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}]}},{"name":"exclude_ticket_portal_contact","surface":"data","description":"Explicitly exclude one contact from a ticket portal audience. Exclusions override direct, company, and creator origins and require expectedVersion plus _meta.idempotencyKey.","entity":"ticket","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Exclude a contact from a ticket","input":{"recordId":"ticket_123","contactId":"con_123","expectedVersion":1},"output":{"applied":true,"scope":"exclude"}},{"description":"Exclude another contact from a ticket","input":{"recordId":"ticket_123","contactId":"con_456","expectedVersion":2},"output":{"applied":true,"scope":"exclude"}}],"related":["clear_ticket_portal_contact_exclusion","list_ticket_portal_share_recipients"],"annotations":{"title":"Exclude Ticket Portal Contact","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}]}},{"name":"clear_ticket_portal_contact_exclusion","surface":"data","description":"Clear one explicit ticket portal contact exclusion after current platform, profile, company, contact, grant, and scope checks. Clearing can expand access and is fully revalidated.","entity":"ticket","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Restore a previously excluded ticket contact","input":{"recordId":"ticket_123","contactId":"con_123","expectedVersion":2},"output":{"applied":true,"scope":"clear_exclusion"}},{"description":"Restore another ticket contact after review","input":{"recordId":"ticket_123","contactId":"con_456","expectedVersion":5},"output":{"applied":true,"scope":"clear_exclusion"}}],"related":["exclude_ticket_portal_contact","list_ticket_portal_share_recipients"],"annotations":{"title":"Clear Ticket Portal Contact Exclusion","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}]}},{"name":"set_ticket_portal_publication","surface":"data","description":"Enable or disable publication of a ticket through its authoritative portal record control. Enabling rechecks the current company and effective audience.","entity":"ticket","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"boolean"}},"required":["recordId","expectedVersion","enabled"],"additionalProperties":false},"examples":[{"description":"Publish a reviewed ticket","input":{"recordId":"ticket_123","expectedVersion":1,"enabled":true},"output":{"applied":true,"version":2}},{"description":"Unpublish a ticket while retaining grants","input":{"recordId":"ticket_123","expectedVersion":2,"enabled":false},"output":{"applied":true,"version":3}}],"related":["share_ticket_portal","get_ticket_portal_share_status"],"annotations":{"title":"Set Ticket Portal Publication","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["ticket:share_portal"]}]}},{"name":"preflight_task_portal_share","surface":"data","description":"Check whether a task can be shared with selected contacts or the whole customer company. The check is read-only and returns bounded counts and reason codes.","entity":"task","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["recordId","scope"],"additionalProperties":false},"examples":[{"description":"Check selected contacts before sharing a task","input":{"recordId":"task_123","scope":"contact","contactIds":["con_123"]},"output":{"eligible":true,"reasonCode":"ready"}},{"description":"Check whole-company eligibility for a task","input":{"recordId":"task_123","scope":"company"},"output":{"eligible":true,"requestedContactCount":12}}],"related":["share_task_portal","get_task_portal_share_status"],"idempotent":true,"annotations":{"title":"Preflight Task Portal Share","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}]}},{"name":"share_task_portal","surface":"data","description":"Create or reopen the authoritative portal control for a task and grant access to a validated contact audience. Every mutation requires expectedVersion and the MCP _meta.idempotencyKey.","entity":"task","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"scope":{"type":"string","enum":["contact","company"]},"contactIds":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"notify":{"type":"boolean"}},"required":["recordId","expectedVersion","scope","notify"],"additionalProperties":false},"examples":[{"description":"Share a task with one contact","input":{"recordId":"task_123","expectedVersion":0,"scope":"contact","contactIds":["con_123"],"notify":true},"output":{"applied":true,"version":1}},{"description":"Share a task with the full customer company","input":{"recordId":"task_123","expectedVersion":0,"scope":"company","notify":false},"output":{"applied":true,"version":1}}],"related":["preflight_task_portal_share","revoke_task_portal_share"],"annotations":{"title":"Share Task Portal","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}]}},{"name":"get_task_portal_share_status","surface":"data","description":"Read the authoritative portal control, grant counts, exclusions, and effective recipient count for a task. An unshared parent returns virtual version zero without creating state.","entity":"task","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"Read task portal sharing state","input":{"recordId":"task_123"},"output":{"record":{"version":1,"enabled":true},"effectiveRecipientCount":1}},{"description":"Read a task that has never been shared","input":{"recordId":"task_123"},"output":{"record":{"version":0,"enabled":false},"effectiveRecipientCount":0}}],"related":["preflight_task_portal_share","list_task_portal_share_recipients"],"idempotent":true,"annotations":{"title":"Get Task Portal Share Status","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}]}},{"name":"list_task_portal_share_recipients","surface":"data","description":"List paginated portal recipients for a task, including direct, company, creator, exclusion, effective, and bounded block-reason state.","entity":"task","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","maxLength":200}},"required":["recordId"],"additionalProperties":false},"examples":[{"description":"List the first page of task recipients","input":{"recordId":"task_123","limit":50},"output":{"items":[],"pagination":{"hasMore":false}}},{"description":"Continue a task recipient page","input":{"recordId":"task_123","cursor":"con_123","limit":25},"output":{"items":[],"pagination":{"currentPage":2}}}],"related":["get_task_portal_share_status","revoke_task_portal_share"],"idempotent":true,"annotations":{"title":"List Task Portal Share Recipients","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}]}},{"name":"revoke_task_portal_share","surface":"data","description":"Revoke one active portal grant for a task. The service reauthorizes the current parent scope before replaying an idempotency receipt.","entity":"task","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"grantId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","grantId"],"additionalProperties":false},"examples":[{"description":"Revoke a direct task portal grant","input":{"recordId":"task_123","grantId":"pgr_123","expectedVersion":2},"output":{"applied":true,"version":3}},{"description":"Revoke a company task portal grant","input":{"recordId":"task_123","grantId":"pgr_company","expectedVersion":1},"output":{"applied":true,"version":2}}],"related":["share_task_portal","get_task_portal_share_status"],"annotations":{"title":"Revoke Task Portal Share","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}]}},{"name":"exclude_task_portal_contact","surface":"data","description":"Explicitly exclude one contact from a task portal audience. Exclusions override direct, company, and creator origins and require expectedVersion plus _meta.idempotencyKey.","entity":"task","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Exclude a contact from a task","input":{"recordId":"task_123","contactId":"con_123","expectedVersion":1},"output":{"applied":true,"scope":"exclude"}},{"description":"Exclude another contact from a task","input":{"recordId":"task_123","contactId":"con_456","expectedVersion":2},"output":{"applied":true,"scope":"exclude"}}],"related":["clear_task_portal_contact_exclusion","list_task_portal_share_recipients"],"annotations":{"title":"Exclude Task Portal Contact","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}]}},{"name":"clear_task_portal_contact_exclusion","surface":"data","description":"Clear one explicit task portal contact exclusion after current platform, profile, company, contact, grant, and scope checks. Clearing can expand access and is fully revalidated.","entity":"task","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"contactId":{"type":"string","minLength":1,"maxLength":200}},"required":["recordId","expectedVersion","contactId"],"additionalProperties":false},"examples":[{"description":"Restore a previously excluded task contact","input":{"recordId":"task_123","contactId":"con_123","expectedVersion":2},"output":{"applied":true,"scope":"clear_exclusion"}},{"description":"Restore another task contact after review","input":{"recordId":"task_123","contactId":"con_456","expectedVersion":5},"output":{"applied":true,"scope":"clear_exclusion"}}],"related":["exclude_task_portal_contact","list_task_portal_share_recipients"],"annotations":{"title":"Clear Task Portal Contact Exclusion","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}]}},{"name":"set_task_portal_publication","surface":"data","description":"Enable or disable publication of a task through its authoritative portal record control. Enabling rechecks the current company and effective audience.","entity":"task","action":"share_portal","inputSchema":{"type":"object","properties":{"recordId":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"boolean"}},"required":["recordId","expectedVersion","enabled"],"additionalProperties":false},"examples":[{"description":"Publish a reviewed task","input":{"recordId":"task_123","expectedVersion":1,"enabled":true},"output":{"applied":true,"version":2}},{"description":"Unpublish a task while retaining grants","input":{"recordId":"task_123","expectedVersion":2,"enabled":false},"output":{"applied":true,"version":3}}],"related":["share_task_portal","get_task_portal_share_status"],"annotations":{"title":"Set Task Portal Publication","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["task:share_portal"]}]}},{"name":"list_portal_requests","surface":"data","description":"List client portal intake requests in the current staff record scope.","entity":"portal_request","action":"list","inputSchema":{"type":"object","properties":{"limit":{"default":50,"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string","minLength":1,"maxLength":512},"sort":{"default":"-created_at","type":"string","enum":["created_at","-created_at","updated_at","-updated_at"]},"includeTotal":{"default":false,"type":"boolean"},"requestKind":{"type":"string","enum":["general","ticket","task","work_order","project_feedback"]},"clientStatus":{"type":"string","enum":["submitted","acknowledged","in_progress","resolved","closed","cancelled"]},"routingStatus":{"type":"string","enum":["unassigned","queued","assigned","converted","failed"]}},"additionalProperties":false},"annotations":{"title":"List Portal Requests","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["portal_request:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["portal_request:list"]}]}},{"name":"get_portal_request","surface":"data","description":"Read one client portal request the caller is scoped to see: subject, kind, routing state, requester and its converted target record.","entity":"portal_request","action":"read","inputSchema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200}},"required":["requestId"],"additionalProperties":false},"annotations":{"title":"Get Portal Request","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["portal_request:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["portal_request:read"]}]}},{"name":"update_portal_request","surface":"data","description":"Update a portal request using its current version.","entity":"portal_request","action":"update","inputSchema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"changes":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"subject":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","minLength":1,"maxLength":32768},"clientStatus":{"type":"string","enum":["submitted","acknowledged","in_progress","resolved","closed","cancelled"]}},"required":["expectedVersion"],"additionalProperties":false}},"required":["requestId","changes"],"additionalProperties":false},"annotations":{"title":"Update Portal Request","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["portal_request:update"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["portal_request:update"]}]}},{"name":"route_portal_request","surface":"data","description":"Route a portal request to a verified active internal user or team.","entity":"portal_request","action":"route","inputSchema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"routing":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"destinationKind":{"type":"string","enum":["user","team"]},"destinationId":{"type":"string","minLength":1,"maxLength":200}},"required":["expectedVersion","destinationKind","destinationId"],"additionalProperties":false}},"required":["requestId","routing"],"additionalProperties":false},"annotations":{"title":"Route Portal Request","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["portal_request:route"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["portal_request:route"]}]}},{"name":"convert_portal_request","surface":"data","description":"Convert an authorized portal request or link its explicitly staff-created work order without publishing the target.","entity":"portal_request","action":"convert","inputSchema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"conversion":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"targetEntity":{"type":"string","enum":["ticket","task","work_order"]},"targetId":{"type":"string","minLength":1,"maxLength":200}},"required":["expectedVersion","targetEntity"],"additionalProperties":false}},"required":["requestId","conversion"],"additionalProperties":false},"annotations":{"title":"Convert Portal Request","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["portal_request:convert"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["portal_request:convert"]}]}},{"name":"submit_product_feedback","surface":"data","description":"Send product feedback — a feature request, a bug report, or other feedback — to the CaptivaHQ product team (the people who build this software, NOT the workspace's own support desk; use create_ticket for a customer support case). Only call this AFTER showing the user the exact type and text you will send and getting their explicit confirmation. Optional `details` adds structure (moduleLabel, problem + importance for a feature request; record, currentBehavior, expectedBehavior, stepsToReproduce for a bug). Never include customer personal data. Rate-limited per user; an identical resubmit within a few minutes returns the earlier receipt (duplicate: true).","entity":"product_feedback","action":"create","inputSchema":{"type":"object","properties":{"type":{"type":"string","enum":["feature_request","bug","other"]},"message":{"type":"string","minLength":3,"maxLength":4000},"context":{"type":"object","properties":{"pagePath":{"type":"string","maxLength":500},"locale":{"type":"string","maxLength":16,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}},"additionalProperties":false},"origin":{"type":"string","enum":["in_app","atlas"]},"details":{"type":"object","properties":{"moduleId":{"type":"string","maxLength":80,"pattern":"^[A-Za-z0-9_:-]*$"},"moduleLabel":{"type":"string","maxLength":120},"problem":{"type":"string","maxLength":4000},"importance":{"type":"string","enum":["nice_to_have","important","critical"]},"record":{"type":"string","maxLength":500},"currentBehavior":{"type":"string","maxLength":4000},"expectedBehavior":{"type":"string","maxLength":4000},"stepsToReproduce":{"type":"string","maxLength":4000}},"additionalProperties":false}},"required":["type","message"],"additionalProperties":false},"examples":[{"description":"Request a feature the user described","input":{"type":"feature_request","message":"Let me export the deals list to Excel with the current filters applied."},"output":{"id":"fbk_…","type":"feature_request","status":"received","duplicate":false,"createdAt":"2026-10-06T10:00:00.000Z"}}],"related":["create_ticket"],"annotations":{"title":"Submit Product Feedback","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["product_feedback:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["product_feedback:create"]}]}},{"name":"add_favorite","surface":"data","description":"Star (favorite) a record for the current user so it is pinned first in its list view, starred on its overview header and pinned in the top bar's record tabs ('star the Acme account'). entityType is one of: account, contact, lead, deal, ticket, project, work_order, invoice, quote, product, task. Resolve the record id first (search_records / list_* / get_*). Idempotent — starring a starred record is a no-op. Only records the user can read can be starred.","entity":"favorite","action":"create","inputSchema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","lead","deal","ticket","project","work_order","invoice","quote","product","task"]},"recordId":{"type":"string","minLength":1,"maxLength":64}},"required":["entityType","recordId"],"additionalProperties":false},"examples":[{"description":"Star an account","input":{"entityType":"account","recordId":"acc_01HX…"},"output":{"id":"fav_…","entityType":"account","recordId":"acc_01HX…","label":"Acme Corp","starred":true,"createdAt":"2026-10-06T10:00:00.000Z"}}],"related":["remove_favorite","list_favorites","search_records"],"idempotent":true,"annotations":{"title":"Add Favorite","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["favorite:create"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["favorite:create"]}]}},{"name":"remove_favorite","surface":"data","description":"Unstar a record for the current user (entityType is one of: account, contact, lead, deal, ticket, project, work_order, invoice, quote, product, task). Idempotent — unstarring a record that is not starred succeeds with removed: false. Works even if the user can no longer open the record.","entity":"favorite","action":"delete","inputSchema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","lead","deal","ticket","project","work_order","invoice","quote","product","task"]},"recordId":{"type":"string","minLength":1,"maxLength":64}},"required":["entityType","recordId"],"additionalProperties":false},"examples":[{"description":"Unstar a deal","input":{"entityType":"deal","recordId":"deal_01HX…"},"output":{"entityType":"deal","recordId":"deal_01HX…","starred":false,"removed":true}}],"related":["add_favorite","list_favorites"],"idempotent":true,"annotations":{"title":"Remove Favorite","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true},"securitySchemes":[{"type":"oauth2","scopes":["favorite:delete"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["favorite:delete"]}]}},{"name":"list_favorites","surface":"data","description":"List the current user's starred records, newest first, optionally for one entityType (account, contact, lead, deal, ticket, project, work_order, invoice, quote, product, task). Each item has entityType, recordId and the record's display label. Records the user can no longer read are omitted. Paginated with limit + cursor.","entity":"favorite","action":"list","inputSchema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","lead","deal","ticket","project","work_order","invoice","quote","product","task"]},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"additionalProperties":false},"examples":[{"description":"My starred deals","input":{"entityType":"deal","limit":20},"output":{"items":[{"id":"fav_…","entityType":"deal","recordId":"deal_…","label":"Acme renewal","starred":true}],"pagination":{"limit":20,"count":1,"hasMore":false,"nextCursor":null}}}],"related":["add_favorite","remove_favorite"],"annotations":{"title":"List Favorites","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["favorite:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["favorite:list"]}]}},{"name":"list_attachments","surface":"data","description":"List the files attached to one record (newest first) — uploads and external links, across every place files are stored for that record type (e.g. a deal's generic files AND its Negotiating-gate PDFs). entityType is the parent record type: account, contact, deal, lead, ticket, project, invoice, work_order, employee, location, custom_object_record, expense_report, contract, calendar_event (an appointment), ict_provider, asset or task. Returns metadata only: id, filename, contentType, sizeBytes, sourceType, externalUrl, attachmentType, uploadedBy, createdAt and `url` — the in-app download path (requires a signed-in session; never a public link). Use get_attachment with includeContent=true to actually see an image or read a text file. A record the caller cannot read returns not found.","entity":"attachment","action":"list","inputSchema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","deal","lead","ticket","project","invoice","work_order","employee","location","custom_object_record","expense_report","contract","calendar_event","ict_provider","asset","task"]},"recordId":{"type":"string","minLength":1,"maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":200}},"required":["entityType","recordId"],"additionalProperties":false},"examples":[{"description":"Files on an appointment","input":{"entityType":"calendar_event","recordId":"evt_01HZ..."},"output":{"entityType":"calendar_event","recordId":"evt_01HZ...","hasMore":false,"items":[{"id":"8f0c…","filename":"site-plan.pdf","contentType":"application/pdf","sizeBytes":482113,"sourceType":"upload","url":"/api/crm/attachments/8f0c…"}]}},{"description":"Files on a deal (generic + Negotiating-gate attachments)","input":{"entityType":"deal","recordId":"deal_42","limit":20},"output":{"entityType":"deal","recordId":"deal_42","hasMore":false,"items":[]}}],"related":["get_attachment","get_calendar_event","get_deal","get_work_order","get_ticket"],"idempotent":true,"annotations":{"title":"List Attachments","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["attachment:list"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["attachment:list"]}]}},{"name":"get_attachment","surface":"data","description":"Get one attached file by attachmentId (from list_attachments). entityType is the parent record type: account, contact, deal, lead, ticket, project, invoice, work_order, employee, location, custom_object_record, expense_report, contract, calendar_event (an appointment), ict_provider, asset or task. Optional recordId must match the file's parent when given. Set includeContent=true to DISPLAY the file: PNG/JPEG/GIF/WebP images up to 4 MB come back as an image content block, and text files (text/*, JSON, CSV, XML) up to 1 MB as a text content block. PDFs, Office documents, larger files and external links return metadata only — `inlineContent.reason` says why. Reading content is audited. A file whose parent record the caller cannot read returns not found.","entity":"attachment","action":"read","inputSchema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","deal","lead","ticket","project","invoice","work_order","employee","location","custom_object_record","expense_report","contract","calendar_event","ict_provider","asset","task"]},"attachmentId":{"type":"string","minLength":1,"maxLength":200},"recordId":{"type":"string","minLength":1,"maxLength":200},"includeContent":{"type":"boolean"}},"required":["entityType","attachmentId"],"additionalProperties":false},"examples":[{"description":"Metadata for a ticket file","input":{"entityType":"ticket","attachmentId":"8f0c…"},"output":{"id":"8f0c…","filename":"error.log","contentType":"text/plain","sizeBytes":2048,"url":"/api/crm/attachments/8f0c…"}},{"description":"Show a job-site photo on a work order","input":{"entityType":"work_order","attachmentId":"a1b2…","includeContent":true},"output":{"id":"a1b2…","filename":"before.jpg","contentType":"image/jpeg","inlineContent":{"included":true,"kind":"image"}}}],"related":["list_attachments","get_calendar_event","get_deal","get_work_order"],"idempotent":true,"annotations":{"title":"Get Attachment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"securitySchemes":[{"type":"oauth2","scopes":["attachment:read"]}],"_meta":{"securitySchemes":[{"type":"oauth2","scopes":["attachment:read"]}]}}],"x-links":{"openapi":"/api/v1/public/docs","publicManifest":"/api/v1/public/mcp/manifest"}}