{"surface":"data","protocol":"mcp","endpoint":"/api/v1/mcp","catalogScope":"platform","tenantFiltered":false,"authoritativeTenantCatalog":"POST /api/v1/mcp — tools/list","count":293,"tools":[{"name":"list_leads","surface":"data","description":"List leads with optional filters and cursor pagination. Returns up to 50 leads by default, max 500. Use for: dashboard refreshes, lead-list rendering, qualification queues. For full-text search across many entities use the `search` tool instead.","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","other"]},"assignedTo":{"type":"string","minLength":1,"maxLength":64},"minScore":{"type":"integer","minimum":0,"maximum":100},"maxScore":{"type":"integer","minimum":0,"maximum":100},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"name":"create_lead","surface":"data","description":"Create a new lead. Identity rule: must provide either (firstName + lastName) OR a company name, AND at least one contact channel (email or phone). Defaults: source='other', status='new', score=0. 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":{"type":"string","maxLength":100,"nullable":true},"lastName":{"type":"string","maxLength":100,"nullable":true},"email":{"type":"string","format":"email","maxLength":254,"nullable":true},"phone":{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$","nullable":true},"company":{"type":"string","maxLength":200,"nullable":true},"source":{"type":"string","enum":["website","referral","campaign","event","outbound","partner","CaptivaHQ","other"],"nullable":true},"status":{"type":"string","enum":["new","contacted","qualifying","qualified","mql","sql","converted","disqualified"],"nullable":true},"score":{"type":"integer","minimum":0,"maximum":100,"nullable":true},"assignedTo":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"consentEmail":{"type":"boolean"},"consentSms":{"type":"boolean"},"consentCall":{"type":"boolean"},"consentSource":{"type":"string","maxLength":120,"nullable":true},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}},"salutation":{"type":"string","maxLength":40,"nullable":true},"mobile":{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$","nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"rating":{"type":"string","enum":["hot","warm","cold"],"nullable":true},"title":{"type":"string","maxLength":150,"nullable":true},"website":{"type":"string","maxLength":300,"nullable":true},"industry":{"type":"string","maxLength":120,"nullable":true},"annualRevenue":{"type":"number","minimum":0,"maximum":9999999999999,"nullable":true},"employeeCount":{"type":"integer","minimum":0,"maximum":10000000,"nullable":true},"addressLine1":{"type":"string","maxLength":200,"nullable":true},"addressLine2":{"type":"string","maxLength":200,"nullable":true},"city":{"type":"string","maxLength":120,"nullable":true},"state":{"type":"string","maxLength":120,"nullable":true},"postalCode":{"type":"string","maxLength":40,"nullable":true},"country":{"type":"string","maxLength":120,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"campaignId":{"type":"string","maxLength":64,"nullable":true},"estimatedValue":{"type":"number","minimum":0,"maximum":9999999999999,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3},"expectedCloseDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"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":false}},{"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":{"type":"string","maxLength":100,"nullable":true},"lastName":{"type":"string","maxLength":100,"nullable":true},"email":{"type":"string","format":"email","maxLength":254,"nullable":true},"phone":{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$","nullable":true},"company":{"type":"string","maxLength":200,"nullable":true},"source":{"type":"string","enum":["website","referral","campaign","event","outbound","partner","CaptivaHQ","other"],"nullable":true},"status":{"type":"string","enum":["new","contacted","qualifying","qualified","mql","sql","converted","disqualified"],"nullable":true},"score":{"type":"integer","minimum":0,"maximum":100,"nullable":true},"assignedTo":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"consentEmail":{"type":"boolean"},"consentSms":{"type":"boolean"},"consentCall":{"type":"boolean"},"consentSource":{"type":"string","maxLength":120,"nullable":true},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}},"salutation":{"type":"string","maxLength":40,"nullable":true},"mobile":{"type":"string","maxLength":40,"pattern":"^[+0-9 .()\\-x]*$","nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"rating":{"type":"string","enum":["hot","warm","cold"],"nullable":true},"title":{"type":"string","maxLength":150,"nullable":true},"website":{"type":"string","maxLength":300,"nullable":true},"industry":{"type":"string","maxLength":120,"nullable":true},"annualRevenue":{"type":"number","minimum":0,"maximum":9999999999999,"nullable":true},"employeeCount":{"type":"integer","minimum":0,"maximum":10000000,"nullable":true},"addressLine1":{"type":"string","maxLength":200,"nullable":true},"addressLine2":{"type":"string","maxLength":200,"nullable":true},"city":{"type":"string","maxLength":120,"nullable":true},"state":{"type":"string","maxLength":120,"nullable":true},"postalCode":{"type":"string","maxLength":40,"nullable":true},"country":{"type":"string","maxLength":120,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"campaignId":{"type":"string","maxLength":64,"nullable":true},"estimatedValue":{"type":"number","minimum":0,"maximum":9999999999999,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3},"expectedCloseDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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 (customer/partner/vendor/competitor/reseller), tier (strategic/enterprise/mid_market/smb/startup), lifecycleStage (lead/prospect/qualified/customer/evangelist/churned), owner, and active flag.","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"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"idempotent":true,"annotations":{"title":"Get Account","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"name":"create_account","surface":"data","description":"Create a new account (company). Required fields: name, tier, ownerUserId. 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":{"type":"string","maxLength":200,"nullable":true},"domain":{"type":"string","maxLength":255,"nullable":true},"website":{"type":"string","format":"uri","maxLength":500,"nullable":true},"phone":{"type":"string","maxLength":40,"nullable":true},"email":{"type":"string","format":"email","maxLength":254,"nullable":true},"fax":{"type":"string","maxLength":40,"nullable":true},"accountNumber":{"type":"string","maxLength":60,"nullable":true},"logoUrl":{"type":"string","maxLength":2048,"nullable":true},"logoShape":{"type":"string","enum":["square","circular","rectangular"]},"logoZoom":{"type":"number","minimum":0.5,"maximum":3,"nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"accountType":{"type":"string","enum":["prospect","customer","partner","vendor","competitor","reseller"]},"industry":{"type":"string","maxLength":120,"nullable":true},"subIndustry":{"type":"string","maxLength":120,"nullable":true},"ownershipType":{"type":"string","maxLength":60,"nullable":true},"rating":{"type":"string","enum":["hot","warm","cold"],"nullable":true},"lifecycleStage":{"type":"string","enum":["lead","prospect","qualified","customer","evangelist","churned"]},"acquisitionChannel":{"type":"string","maxLength":80,"nullable":true},"status":{"type":"string","enum":["active","inactive","do_not_contact","on_hold"]},"isActive":{"type":"boolean"},"isAtRisk":{"type":"boolean"},"isRetentionFocus":{"type":"boolean"},"tier":{"type":"string","enum":["strategic","enterprise","mid_market","smb","startup"]},"employeeCount":{"type":"integer","minimum":0,"nullable":true},"annualRevenue":{"type":"number","minimum":0,"nullable":true},"foundedYear":{"type":"integer","minimum":1700,"maximum":2200,"nullable":true},"ownerUserId":{"type":"string","format":"uuid"},"parentAccountId":{"type":"string","nullable":true},"region":{"type":"string","maxLength":120,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"linkedinUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"twitterUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"facebookUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"billingAddressLine1":{"type":"string","maxLength":200,"nullable":true},"billingAddressLine2":{"type":"string","maxLength":200,"nullable":true},"billingCity":{"type":"string","maxLength":120,"nullable":true},"billingState":{"type":"string","maxLength":120,"nullable":true},"billingPostalCode":{"type":"string","maxLength":40,"nullable":true},"billingCountry":{"type":"string","maxLength":120,"nullable":true},"shippingSameAsBilling":{"type":"boolean"},"shippingAddressLine1":{"type":"string","maxLength":200,"nullable":true},"shippingAddressLine2":{"type":"string","maxLength":200,"nullable":true},"shippingCity":{"type":"string","maxLength":120,"nullable":true},"shippingState":{"type":"string","maxLength":120,"nullable":true},"shippingPostalCode":{"type":"string","maxLength":40,"nullable":true},"shippingCountry":{"type":"string","maxLength":120,"nullable":true},"arr":{"type":"number","minimum":0,"maximum":9999999999.99,"nullable":true},"nextRenewalAt":{"type":"string","maxLength":40,"nullable":true},"npsScore":{"type":"integer","minimum":-100,"maximum":100,"nullable":true},"customerSince":{"type":"string","maxLength":40,"nullable":true},"taxId":{"type":"string","maxLength":60,"nullable":true},"vatNumber":{"type":"string","maxLength":60,"nullable":true},"healthScore":{"type":"number","minimum":0,"maximum":100,"nullable":true},"tickerSymbol":{"type":"string","maxLength":20,"nullable":true},"sicCode":{"type":"string","maxLength":20,"nullable":true},"naicsCode":{"type":"string","maxLength":20,"nullable":true},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}}},"required":["name","tier","ownerUserId"],"additionalProperties":false},"examples":[{"description":"Create a mid-market customer","input":{"name":"Acme Inc.","tier":"mid_market","ownerUserId":"01HZ..."},"output":{"id":"01HZ..."}}],"related":["update_account","list_accounts"],"annotations":{"title":"Create Account","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"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":{"type":"string","maxLength":200,"nullable":true},"domain":{"type":"string","maxLength":255,"nullable":true},"website":{"type":"string","format":"uri","maxLength":500,"nullable":true},"phone":{"type":"string","maxLength":40,"nullable":true},"email":{"type":"string","format":"email","maxLength":254,"nullable":true},"fax":{"type":"string","maxLength":40,"nullable":true},"accountNumber":{"type":"string","maxLength":60,"nullable":true},"logoUrl":{"type":"string","maxLength":2048,"nullable":true},"logoShape":{"type":"string","enum":["square","circular","rectangular"]},"logoZoom":{"type":"number","minimum":0.5,"maximum":3,"nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"accountType":{"type":"string","enum":["prospect","customer","partner","vendor","competitor","reseller"]},"industry":{"type":"string","maxLength":120,"nullable":true},"subIndustry":{"type":"string","maxLength":120,"nullable":true},"ownershipType":{"type":"string","maxLength":60,"nullable":true},"rating":{"type":"string","enum":["hot","warm","cold"],"nullable":true},"lifecycleStage":{"type":"string","enum":["lead","prospect","qualified","customer","evangelist","churned"]},"acquisitionChannel":{"type":"string","maxLength":80,"nullable":true},"status":{"type":"string","enum":["active","inactive","do_not_contact","on_hold"]},"isActive":{"type":"boolean"},"isAtRisk":{"type":"boolean"},"isRetentionFocus":{"type":"boolean"},"tier":{"type":"string","enum":["strategic","enterprise","mid_market","smb","startup"]},"employeeCount":{"type":"integer","minimum":0,"nullable":true},"annualRevenue":{"type":"number","minimum":0,"nullable":true},"foundedYear":{"type":"integer","minimum":1700,"maximum":2200,"nullable":true},"ownerUserId":{"type":"string","format":"uuid"},"parentAccountId":{"type":"string","nullable":true},"region":{"type":"string","maxLength":120,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"linkedinUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"twitterUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"facebookUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"billingAddressLine1":{"type":"string","maxLength":200,"nullable":true},"billingAddressLine2":{"type":"string","maxLength":200,"nullable":true},"billingCity":{"type":"string","maxLength":120,"nullable":true},"billingState":{"type":"string","maxLength":120,"nullable":true},"billingPostalCode":{"type":"string","maxLength":40,"nullable":true},"billingCountry":{"type":"string","maxLength":120,"nullable":true},"shippingSameAsBilling":{"type":"boolean"},"shippingAddressLine1":{"type":"string","maxLength":200,"nullable":true},"shippingAddressLine2":{"type":"string","maxLength":200,"nullable":true},"shippingCity":{"type":"string","maxLength":120,"nullable":true},"shippingState":{"type":"string","maxLength":120,"nullable":true},"shippingPostalCode":{"type":"string","maxLength":40,"nullable":true},"shippingCountry":{"type":"string","maxLength":120,"nullable":true},"arr":{"type":"number","minimum":0,"maximum":9999999999.99,"nullable":true},"nextRenewalAt":{"type":"string","maxLength":40,"nullable":true},"npsScore":{"type":"integer","minimum":-100,"maximum":100,"nullable":true},"customerSince":{"type":"string","maxLength":40,"nullable":true},"taxId":{"type":"string","maxLength":60,"nullable":true},"vatNumber":{"type":"string","maxLength":60,"nullable":true},"healthScore":{"type":"number","minimum":0,"maximum":100,"nullable":true},"tickerSymbol":{"type":"string","maxLength":20,"nullable":true},"sicCode":{"type":"string","maxLength":20,"nullable":true},"naicsCode":{"type":"string","maxLength":20,"nullable":true},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"idempotent":true,"annotations":{"title":"Get Contact","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"name":"create_contact","surface":"data","description":"Create a new contact under an account. Required: accountId, firstName, lastName, email. 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":{"type":"string","minLength":1},"ownerUserId":{"type":"string","format":"uuid","nullable":true},"salutation":{"type":"string","maxLength":20,"nullable":true},"firstName":{"type":"string","minLength":1,"maxLength":100},"middleName":{"type":"string","maxLength":100,"nullable":true},"lastName":{"type":"string","minLength":1,"maxLength":100},"suffix":{"type":"string","maxLength":20,"nullable":true},"preferredName":{"type":"string","maxLength":100,"nullable":true},"email":{"type":"string","format":"email","maxLength":254},"secondaryEmail":{"type":"string","format":"email","maxLength":254,"nullable":true},"phone":{"type":"string","maxLength":40,"nullable":true},"mobilePhone":{"type":"string","maxLength":40,"nullable":true},"homePhone":{"type":"string","maxLength":40,"nullable":true},"fax":{"type":"string","maxLength":40,"nullable":true},"title":{"type":"string","maxLength":120,"nullable":true},"department":{"type":"string","maxLength":80,"nullable":true},"reportsToId":{"type":"string","nullable":true},"role":{"type":"string","enum":["decision_maker","influencer","champion","economic_buyer","technical_buyer","end_user","gatekeeper"],"nullable":true},"preferredContactMethod":{"type":"string","enum":["email","phone","sms","linkedin"],"nullable":true},"preferredLanguage":{"type":"string","maxLength":10,"nullable":true},"timeZone":{"type":"string","maxLength":50,"nullable":true},"linkedinUrl":{"type":"string","format":"uri","maxLength":2048,"nullable":true},"twitterUrl":{"type":"string","format":"uri","maxLength":2048,"nullable":true},"pictureUrl":{"type":"string","format":"uri","maxLength":2048,"nullable":true},"pictureShape":{"type":"string","enum":["square","circular","rectangular"]},"pictureZoom":{"type":"number","minimum":0.5,"maximum":3,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"mailingAddressLine1":{"type":"string","maxLength":200,"nullable":true},"mailingAddressLine2":{"type":"string","maxLength":200,"nullable":true},"mailingCity":{"type":"string","maxLength":120,"nullable":true},"mailingState":{"type":"string","maxLength":120,"nullable":true},"mailingPostalCode":{"type":"string","maxLength":40,"nullable":true},"mailingCountry":{"type":"string","maxLength":120,"nullable":true},"birthday":{"type":"string","maxLength":20,"nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"leadSource":{"type":"string","maxLength":80,"nullable":true},"lifecycleStage":{"type":"string","maxLength":40,"nullable":true},"buyerPersona":{"type":"string","maxLength":80,"nullable":true},"isPrimary":{"type":"boolean"},"isChampion":{"type":"boolean"},"portalAccess":{"type":"boolean"},"emailOptOut":{"type":"boolean"},"doNotCall":{"type":"boolean"},"smsOptOut":{"type":"boolean"},"marketingOptIn":{"type":"boolean"},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}},"bio":{"type":"string","maxLength":2000,"nullable":true},"seniority":{"type":"string","maxLength":80,"nullable":true},"function":{"type":"string","maxLength":80,"nullable":true},"location":{"type":"string","maxLength":200,"nullable":true},"decisionMakerScore":{"type":"integer","minimum":0,"maximum":100,"nullable":true},"expertise":{"type":"array","items":{"type":"string","maxLength":80},"maxItems":50,"nullable":true}},"required":["accountId","firstName","lastName","email"],"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":false}},{"name":"update_contact","surface":"data","description":"Partial update of a contact. Only provided fields are changed; omitted fields are untouched. Can update any field: role, lifecycle, buying flags, GDPR consent, tags, customFields, address fields, etc.","entity":"contact","action":"update","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"ownerUserId":{"type":"string","format":"uuid","nullable":true},"salutation":{"type":"string","maxLength":20,"nullable":true},"firstName":{"type":"string","minLength":1,"maxLength":100},"middleName":{"type":"string","maxLength":100,"nullable":true},"lastName":{"type":"string","minLength":1,"maxLength":100},"suffix":{"type":"string","maxLength":20,"nullable":true},"preferredName":{"type":"string","maxLength":100,"nullable":true},"email":{"type":"string","format":"email","maxLength":254},"secondaryEmail":{"type":"string","format":"email","maxLength":254,"nullable":true},"phone":{"type":"string","maxLength":40,"nullable":true},"mobilePhone":{"type":"string","maxLength":40,"nullable":true},"homePhone":{"type":"string","maxLength":40,"nullable":true},"fax":{"type":"string","maxLength":40,"nullable":true},"title":{"type":"string","maxLength":120,"nullable":true},"department":{"type":"string","maxLength":80,"nullable":true},"reportsToId":{"type":"string","nullable":true},"role":{"type":"string","enum":["decision_maker","influencer","champion","economic_buyer","technical_buyer","end_user","gatekeeper"],"nullable":true},"preferredContactMethod":{"type":"string","enum":["email","phone","sms","linkedin"],"nullable":true},"preferredLanguage":{"type":"string","maxLength":10,"nullable":true},"timeZone":{"type":"string","maxLength":50,"nullable":true},"linkedinUrl":{"type":"string","format":"uri","maxLength":2048,"nullable":true},"twitterUrl":{"type":"string","format":"uri","maxLength":2048,"nullable":true},"pictureUrl":{"type":"string","format":"uri","maxLength":2048,"nullable":true},"pictureShape":{"type":"string","enum":["square","circular","rectangular"]},"pictureZoom":{"type":"number","minimum":0.5,"maximum":3,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"mailingAddressLine1":{"type":"string","maxLength":200,"nullable":true},"mailingAddressLine2":{"type":"string","maxLength":200,"nullable":true},"mailingCity":{"type":"string","maxLength":120,"nullable":true},"mailingState":{"type":"string","maxLength":120,"nullable":true},"mailingPostalCode":{"type":"string","maxLength":40,"nullable":true},"mailingCountry":{"type":"string","maxLength":120,"nullable":true},"birthday":{"type":"string","maxLength":20,"nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"leadSource":{"type":"string","maxLength":80,"nullable":true},"lifecycleStage":{"type":"string","maxLength":40,"nullable":true},"buyerPersona":{"type":"string","maxLength":80,"nullable":true},"isPrimary":{"type":"boolean"},"isChampion":{"type":"boolean"},"portalAccess":{"type":"boolean"},"emailOptOut":{"type":"boolean"},"doNotCall":{"type":"boolean"},"smsOptOut":{"type":"boolean"},"marketingOptIn":{"type":"boolean"},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}},"bio":{"type":"string","maxLength":2000,"nullable":true},"seniority":{"type":"string","maxLength":80,"nullable":true},"function":{"type":"string","maxLength":80,"nullable":true},"location":{"type":"string","maxLength":200,"nullable":true},"decisionMakerScore":{"type":"integer","minimum":0,"maximum":100,"nullable":true},"expertise":{"type":"array","items":{"type":"string","maxLength":80},"maxItems":50,"nullable":true},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","maxLength":60,"nullable":true},"isPrimary":{"type":"boolean"},"primaryContactId":{"type":"string","nullable":true},"addressLine1":{"type":"string","maxLength":200,"nullable":true},"addressLine2":{"type":"string","maxLength":200,"nullable":true},"city":{"type":"string","maxLength":120,"nullable":true},"state":{"type":"string","maxLength":120,"nullable":true},"postalCode":{"type":"string","maxLength":40,"nullable":true},"country":{"type":"string","maxLength":120,"nullable":true},"lat":{"type":"number","minimum":-90,"maximum":90,"nullable":true},"lng":{"type":"number","minimum":-180,"maximum":180,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}}},"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":{"type":"string","maxLength":60,"nullable":true},"isPrimary":{"type":"boolean"},"primaryContactId":{"type":"string","nullable":true},"addressLine1":{"type":"string","maxLength":200,"nullable":true},"addressLine2":{"type":"string","maxLength":200,"nullable":true},"city":{"type":"string","maxLength":120,"nullable":true},"state":{"type":"string","maxLength":120,"nullable":true},"postalCode":{"type":"string","maxLength":40,"nullable":true},"country":{"type":"string","maxLength":120,"nullable":true},"lat":{"type":"number","minimum":-90,"maximum":90,"nullable":true},"lng":{"type":"number","minimum":-180,"maximum":180,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"name":"list_deals","surface":"data","description":"List deals (deals in the sales pipeline). Filter by account_id, stage, forecast_category (omitted/pipeline/best_case/commit/closed), owner, amount range, and close-date range.","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}$"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"examples":[{"description":"Open deals at a specific account","input":{"accountId":"01HZ..."},"output":{"items":[]}},{"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}},{"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"],"idempotent":true,"annotations":{"title":"Get Deal","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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=0.","entity":"deal","action":"create","inputSchema":{"type":"object","properties":{"accountId":{"type":"string","minLength":1},"accountIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"participantContactIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100},"primaryContactId":{"type":"string","nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"dealType":{"type":"string","enum":["new_business","existing_business","renewal","upgrade","downgrade","expansion"]},"leadSource":{"type":"string","maxLength":80,"nullable":true},"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":{"type":"string","maxLength":500,"nullable":true},"amount":{"type":"number","minimum":0,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3},"priority":{"type":"string","enum":["low","normal","high","urgent"],"nullable":true},"estimatedHours":{"type":"number","minimum":0,"maximum":9999999999.99},"recordTypeId":{"type":"string","maxLength":64,"nullable":true},"ownerUserId":{"type":"string","format":"uuid","nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"campaignId":{"type":"string","maxLength":64,"nullable":true},"campaignName":{"type":"string","maxLength":200,"nullable":true},"partnerId":{"type":"string","maxLength":64,"nullable":true},"partnerName":{"type":"string","maxLength":200,"nullable":true},"region":{"type":"string","maxLength":120,"nullable":true},"discountPercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"taxPercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"contractLengthMonths":{"type":"integer","minimum":0,"maximum":600,"nullable":true},"billingFrequency":{"type":"string","maxLength":40,"nullable":true},"revenueModel":{"type":"string","enum":["one_time","recurring"],"nullable":true},"contractStartDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"contractEndDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"isRenewal":{"type":"boolean"},"budgetConfirmed":{"type":"boolean"},"authorityIdentified":{"type":"boolean"},"needIdentified":{"type":"boolean"},"timelineConfirmed":{"type":"boolean"},"decisionCriteria":{"type":"string","maxLength":2000,"nullable":true},"decisionProcess":{"type":"string","maxLength":2000,"nullable":true},"championContactId":{"type":"string","nullable":true},"economicBuyerContactId":{"type":"string","nullable":true},"vendorIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"ownerIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":20},"commissionRateOverride":{"type":"number","minimum":0,"maximum":100,"nullable":true},"commissionFixedAmount":{"type":"number","minimum":0,"maximum":9999999999.99,"nullable":true},"competitors":{"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":true},"maxItems":50},"commissionSplits":{"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":true},"maxItems":50},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}},"referenceNo":{"type":"string","minLength":1,"maxLength":120}},"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":false}},{"name":"update_deal","surface":"data","description":"Partial update. Use this for non-stage changes (amount, owner, next step, close date). 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":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},"participantContactIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100},"primaryContactId":{"type":"string","nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000,"nullable":true},"dealType":{"type":"string","enum":["new_business","existing_business","renewal","upgrade","downgrade","expansion"]},"leadSource":{"type":"string","maxLength":80,"nullable":true},"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":{"type":"string","maxLength":500,"nullable":true},"amount":{"type":"number","minimum":0,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3},"priority":{"type":"string","enum":["low","normal","high","urgent"],"nullable":true},"estimatedHours":{"type":"number","minimum":0,"maximum":9999999999.99},"recordTypeId":{"type":"string","maxLength":64,"nullable":true},"ownerUserId":{"type":"string","format":"uuid","nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"campaignId":{"type":"string","maxLength":64,"nullable":true},"campaignName":{"type":"string","maxLength":200,"nullable":true},"partnerId":{"type":"string","maxLength":64,"nullable":true},"partnerName":{"type":"string","maxLength":200,"nullable":true},"region":{"type":"string","maxLength":120,"nullable":true},"discountPercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"taxPercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"contractLengthMonths":{"type":"integer","minimum":0,"maximum":600,"nullable":true},"billingFrequency":{"type":"string","maxLength":40,"nullable":true},"revenueModel":{"type":"string","enum":["one_time","recurring"],"nullable":true},"contractStartDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"contractEndDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"isRenewal":{"type":"boolean"},"budgetConfirmed":{"type":"boolean"},"authorityIdentified":{"type":"boolean"},"needIdentified":{"type":"boolean"},"timelineConfirmed":{"type":"boolean"},"decisionCriteria":{"type":"string","maxLength":2000,"nullable":true},"decisionProcess":{"type":"string","maxLength":2000,"nullable":true},"championContactId":{"type":"string","nullable":true},"economicBuyerContactId":{"type":"string","nullable":true},"vendorIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":100},"ownerIds":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":20},"commissionRateOverride":{"type":"number","minimum":0,"maximum":100,"nullable":true},"commissionFixedAmount":{"type":"number","minimum":0,"maximum":9999999999.99,"nullable":true},"competitors":{"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":true},"maxItems":50},"commissionSplits":{"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":true},"maxItems":50},"customFields":{"type":"object","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},{"type":"array","items":{"anyOf":[{"type":"string","maxLength":10000},{"type":"number"},{"type":"boolean"},{"enum":["null"],"nullable":true}]},"maxItems":500}]}},"referenceNo":{"type":"string","minLength":1,"maxLength":120},"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..."}}],"related":["transition_deal","get_deal"],"idempotent":true,"annotations":{"title":"Update Deal","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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}},{"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}},{"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}},{"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}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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. 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":{"type":"string","maxLength":64,"nullable":true},"leadId":{"type":"string","maxLength":64,"nullable":true},"accountId":{"type":"string","maxLength":64,"nullable":true},"dealId":{"type":"string","maxLength":64,"nullable":true},"date":{"type":"string","format":"date-time"},"summary":{"type":"string","minLength":1,"maxLength":20000},"subject":{"type":"string","maxLength":300,"nullable":true},"source":{"type":"string","maxLength":80,"nullable":true},"metadata":{"type":"object","additionalProperties":{}},"nextAction":{"type":"string","maxLength":2000,"nullable":true},"durationMinutes":{"type":"integer","minimum":0,"maximum":86400,"nullable":true},"outcome":{"type":"string","maxLength":2000,"nullable":true},"participants":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"email":{"type":"string","format":"email","maxLength":320},"name":{"type":"string","maxLength":200},"role":{"type":"string","maxLength":80}},"additionalProperties":true},"maxItems":200},"sentiment":{"type":"string","enum":["positive","neutral","negative"],"nullable":true},"aiSummary":{"type":"string","maxLength":5000,"nullable":true}},"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":false}},{"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":{"type":"string","maxLength":64,"nullable":true},"leadId":{"type":"string","maxLength":64,"nullable":true},"accountId":{"type":"string","maxLength":64,"nullable":true},"dealId":{"type":"string","maxLength":64,"nullable":true},"date":{"type":"string","format":"date-time"},"summary":{"type":"string","minLength":1,"maxLength":20000},"subject":{"type":"string","maxLength":300,"nullable":true},"source":{"type":"string","maxLength":80,"nullable":true},"metadata":{"type":"object","additionalProperties":{}},"nextAction":{"type":"string","maxLength":2000,"nullable":true},"durationMinutes":{"type":"integer","minimum":0,"maximum":86400,"nullable":true},"outcome":{"type":"string","maxLength":2000,"nullable":true},"participants":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","maxLength":64},"email":{"type":"string","format":"email","maxLength":320},"name":{"type":"string","maxLength":200},"role":{"type":"string","maxLength":80}},"additionalProperties":true},"maxItems":200},"sentiment":{"type":"string","enum":["positive","neutral","negative"],"nullable":true},"aiSummary":{"type":"string","maxLength":5000,"nullable":true}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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}},{"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":{"type":"string","maxLength":500,"nullable":true},"color":{"type":"string","maxLength":32,"nullable":true},"recordScope":{"type":"string","enum":["all","team","own"],"default":"own"},"permissions":{"type":"array","items":{"type":"string","minLength":3,"maxLength":80},"maxItems":2000,"default":[]},"enabledModules":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":100,"default":[]},"preset":{"type":"string","maxLength":64,"nullable":true},"financialAccess":{"type":"object","properties":{"default":{"type":"boolean"},"modules":{"type":"object","additionalProperties":{"type":"boolean"},"default":{}}},"required":["default"],"additionalProperties":false,"nullable":true},"recordScopes":{"type":"object","additionalProperties":{"type":"string","enum":["all","team","own"]},"default":{}},"hiddenModules":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":100,"default":[]}},"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":false}},{"name":"list_products","surface":"data","description":"List catalog products (services, SKUs, billable line items) with optional filters and cursor pagination. The `q` filter is FUZZY — pg_trgm word_similarity ≥ 0.3 plus ILIKE substring matched against `name` + `sku`. Spelling drift and partial inputs both resolve: `q=\"accessiq\"` returns \"AccessIQ Base Access - 5 users\". Use this to confirm a product exists before quoting it in a lead-finding or deal-quoting flow, or to pull a category's full price list for a customer recommendation. Returns up to 50 products by default, max 500, best-fuzzy-match first when `q` is set.","entity":"product","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"category":{"type":"string"},"productType":{"type":"string","enum":["one_time","recurring","usage_based","tiered"]},"kind":{"type":"string","enum":["product","service","subscription"]},"pricingModel":{"type":"string","enum":["one_time","variable","subscription","time_materials","hybrid"]},"active":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"examples":[{"description":"Fuzzy-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 the full active-services subset","input":{"productType":"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}},{"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}},{"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":{"type":"string","maxLength":120,"nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"category":{"type":"string","maxLength":120,"nullable":true},"productType":{"type":"string","enum":["one_time","recurring","usage_based","tiered"]},"kind":{"type":"string","enum":["product","service","subscription"],"nullable":true},"pricingModel":{"type":"string","enum":["one_time","variable","subscription","time_materials","hybrid"],"nullable":true},"unitPrice":{"type":"number","minimum":0,"nullable":true},"costPrice":{"type":"number","minimum":0,"nullable":true},"unitLabel":{"type":"string","maxLength":40,"nullable":true},"role":{"type":"string","maxLength":120,"nullable":true},"taxRatePercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3},"billingInterval":{"type":"string","enum":["monthly","quarterly","annual"],"nullable":true},"subscriptionTermMonths":{"type":"integer","exclusiveMinimum":true,"minimum":0,"nullable":true},"estimatedHours":{"type":"number","minimum":0,"nullable":true},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"percent":{"type":"number","minimum":0,"maximum":100},"trigger":{"type":"string","maxLength":60,"nullable":true},"due_days_after":{"type":"integer","minimum":0,"maximum":3650},"dueDays":{"type":"integer"}},"additionalProperties":true},"nullable":true},"fulfillmentOnWon":{"type":"array","items":{"type":"string","enum":["create_project","create_invoice","create_subscription","create_work_order","create_manufacturing_job","create_support_ticket","create_contract"]},"nullable":true},"wonActionTarget":{"type":"string","enum":["none","project","support_ticket","manufacturing_job","work_order","subscription"],"nullable":true},"prices":{"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":true},"nullable":true},"autoFx":{"type":"boolean"},"trackInventory":{"type":"boolean"},"quantityOnHand":{"type":"number","nullable":true},"lowStockThreshold":{"type":"number","nullable":true},"skuUnit":{"type":"string","maxLength":40,"nullable":true},"imageUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"validFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"validTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"ownerId":{"type":"string","maxLength":64,"nullable":true},"active":{"type":"boolean"},"metadata":{"type":"object","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":false}},{"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":{"type":"string","maxLength":120,"nullable":true},"description":{"type":"string","maxLength":5000,"nullable":true},"category":{"type":"string","maxLength":120,"nullable":true},"productType":{"type":"string","enum":["one_time","recurring","usage_based","tiered"]},"kind":{"type":"string","enum":["product","service","subscription"],"nullable":true},"pricingModel":{"type":"string","enum":["one_time","variable","subscription","time_materials","hybrid"],"nullable":true},"unitPrice":{"type":"number","minimum":0,"nullable":true},"costPrice":{"type":"number","minimum":0,"nullable":true},"unitLabel":{"type":"string","maxLength":40,"nullable":true},"role":{"type":"string","maxLength":120,"nullable":true},"taxRatePercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"currency":{"type":"string","minLength":3,"maxLength":3},"billingInterval":{"type":"string","enum":["monthly","quarterly","annual"],"nullable":true},"subscriptionTermMonths":{"type":"integer","exclusiveMinimum":true,"minimum":0,"nullable":true},"estimatedHours":{"type":"number","minimum":0,"nullable":true},"paymentSchedule":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"percent":{"type":"number","minimum":0,"maximum":100},"trigger":{"type":"string","maxLength":60,"nullable":true},"due_days_after":{"type":"integer","minimum":0,"maximum":3650},"dueDays":{"type":"integer"}},"additionalProperties":true},"nullable":true},"fulfillmentOnWon":{"type":"array","items":{"type":"string","enum":["create_project","create_invoice","create_subscription","create_work_order","create_manufacturing_job","create_support_ticket","create_contract"]},"nullable":true},"wonActionTarget":{"type":"string","enum":["none","project","support_ticket","manufacturing_job","work_order","subscription"],"nullable":true},"prices":{"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":true},"nullable":true},"autoFx":{"type":"boolean"},"trackInventory":{"type":"boolean"},"quantityOnHand":{"type":"number","nullable":true},"lowStockThreshold":{"type":"number","nullable":true},"skuUnit":{"type":"string","maxLength":40,"nullable":true},"imageUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"validFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"validTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"ownerId":{"type":"string","maxLength":64,"nullable":true},"active":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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), 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"},"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}},{"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":{"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","enum":["1"]},"mineCreated":{"type":"string","enum":["1"]},"lifecycle":{"type":"string","enum":["open","closed"]},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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. 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":{"type":"string","maxLength":5000,"nullable":true},"status":{"type":"string","enum":["open","in_progress","done","cancelled","blocked"]},"priority":{"type":"string","enum":["low","normal","medium","high","urgent"]},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T.*)?$","nullable":true},"assignedTo":{"type":"string","nullable":true},"assignees":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50,"nullable":true},"relatedToType":{"type":"string","enum":["account","contact","deal","lead","ticket","task","project","work_order","ict_provider"],"nullable":true},"relatedToId":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50}},"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":false}},{"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":{"type":"string","maxLength":5000,"nullable":true},"status":{"type":"string","enum":["open","in_progress","done","cancelled","blocked"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}(T.*)?$","nullable":true},"assignedTo":{"type":"string","nullable":true},"assigneeContactId":{"type":"string","nullable":true},"relatedToType":{"type":"string","enum":["account","contact","deal","lead","ticket","task","project","work_order","ict_provider"],"nullable":true},"relatedToId":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string","maxLength":1000},"secondaryCursor":{"type":"string","maxLength":1000},"selection":{"type":"string","enum":["all","created","assigned","created_or_assigned"],"default":"created_or_assigned"}},"additionalProperties":false},"outputSchema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ownerId":{"type":"string"},"config":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"sharing":{"type":"object","properties":{"mode":{"type":"string","enum":["private","everyone","custom"],"default":"everyone"},"users":{"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},"maxItems":100,"default":[]},"groups":{"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},"maxItems":100,"default":[]}},"additionalProperties":false,"default":{"mode":"everyone","users":[],"groups":[]}},"taskVisibility":{"type":"string","enum":["all","assigned","created_or_assigned"],"default":"created_or_assigned"},"memberIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"default":[]},"groups":{"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},"minItems":1,"maxItems":40},"columns":{"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},"minItems":1,"maxItems":30}},"required":["name","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"],"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}},{"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":{"type":"object","properties":{"mode":{"type":"string","enum":["private","everyone","custom"],"default":"everyone"},"users":{"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},"maxItems":100,"default":[]},"groups":{"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},"maxItems":100,"default":[]}},"additionalProperties":false,"default":{"mode":"everyone","users":[],"groups":[]}},"taskVisibility":{"type":"string","enum":["all","assigned","created_or_assigned"],"default":"created_or_assigned"},"memberIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"default":[]},"groups":{"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},"minItems":1,"maxItems":40},"columns":{"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},"minItems":1,"maxItems":30}},"required":["name","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}},{"name":"list_task_board_items","surface":"data","description":"Read a page of authorized tasks in a board. 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. Preserve their source IDs and original statuses; never pass secondary references to canonical move tools.","entity":"task","action":"list","inputSchema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string","maxLength":1000},"secondaryCursor":{"type":"string","maxLength":1000},"selection":{"type":"string","enum":["all","created","assigned","created_or_assigned"],"default":"created_or_assigned"},"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":{"type":"object","properties":{"mode":{"type":"string","enum":["private","everyone","custom"],"default":"everyone"},"users":{"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},"maxItems":100,"default":[]},"groups":{"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},"maxItems":100,"default":[]}},"additionalProperties":false,"default":{"mode":"everyone","users":[],"groups":[]}},"taskVisibility":{"type":"string","enum":["all","assigned","created_or_assigned"],"default":"created_or_assigned"},"memberIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"default":[]},"groups":{"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},"minItems":1,"maxItems":40},"columns":{"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},"minItems":1,"maxItems":30}},"required":["name","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":{"type":"array","items":{}},"pagination":{},"secondary":{"type":"object","properties":{"items":{"type":"array","items":{}},"pagination":{}},"required":["items"],"additionalProperties":false}},"required":["board","items","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}},{"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":{"type":"object","properties":{"mode":{"type":"string","enum":["private","everyone","custom"],"default":"everyone"},"users":{"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},"maxItems":100,"default":[]},"groups":{"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},"maxItems":100,"default":[]}},"additionalProperties":false,"default":{"mode":"everyone","users":[],"groups":[]}},"taskVisibility":{"type":"string","enum":["all","assigned","created_or_assigned"],"default":"created_or_assigned"},"memberIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"default":[]},"groups":{"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},"minItems":1,"maxItems":40},"columns":{"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},"minItems":1,"maxItems":30}},"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":{"type":"object","properties":{"mode":{"type":"string","enum":["private","everyone","custom"],"default":"everyone"},"users":{"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},"maxItems":100,"default":[]},"groups":{"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},"maxItems":100,"default":[]}},"additionalProperties":false,"default":{"mode":"everyone","users":[],"groups":[]}},"taskVisibility":{"type":"string","enum":["all","assigned","created_or_assigned"],"default":"created_or_assigned"},"memberIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"default":[]},"groups":{"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},"minItems":1,"maxItems":40},"columns":{"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},"minItems":1,"maxItems":30}},"required":["name","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":false}},{"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":{"type":"object","properties":{"mode":{"type":"string","enum":["private","everyone","custom"],"default":"everyone"},"users":{"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},"maxItems":100,"default":[]},"groups":{"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},"maxItems":100,"default":[]}},"additionalProperties":false,"default":{"mode":"everyone","users":[],"groups":[]}},"taskVisibility":{"type":"string","enum":["all","assigned","created_or_assigned"],"default":"created_or_assigned"},"memberIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"default":[]},"groups":{"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},"minItems":1,"maxItems":40},"columns":{"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},"minItems":1,"maxItems":30}},"required":["name","groups","columns"],"additionalProperties":false},"version":{"type":"integer","minimum":0},"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":{"type":"object","properties":{"mode":{"type":"string","enum":["private","everyone","custom"],"default":"everyone"},"users":{"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},"maxItems":100,"default":[]},"groups":{"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},"maxItems":100,"default":[]}},"additionalProperties":false,"default":{"mode":"everyone","users":[],"groups":[]}},"taskVisibility":{"type":"string","enum":["all","assigned","created_or_assigned"],"default":"created_or_assigned"},"memberIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50,"default":[]},"groups":{"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},"minItems":1,"maxItems":40},"columns":{"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},"minItems":1,"maxItems":30}},"required":["name","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":false,"idempotentHint":false,"openWorldHint":false}},{"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":{"type":"string","minLength":1,"maxLength":100,"nullable":true,"default":null},"version":{"type":"integer","minimum":0},"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":false,"idempotentHint":false,"openWorldHint":false}},{"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,"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":false,"idempotentHint":false,"openWorldHint":false}},{"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,"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":false}},{"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"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"idempotent":true,"annotations":{"title":"Get Project","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"string","minLength":1,"nullable":true},"accountId":{"type":"string","minLength":1,"nullable":true},"locationId":{"type":"string","minLength":1,"nullable":true},"contractId":{"type":"string","nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000,"nullable":true},"ownerId":{"type":"string","minLength":1,"nullable":true},"assignedTo":{"type":"string","minLength":1,"nullable":true},"phase":{"type":"string","maxLength":100,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"templateId":{"type":"string","minLength":1,"nullable":true},"dealId":{"type":"string","minLength":1,"nullable":true},"commercialTermsSnapshotId":{"type":"string","minLength":1,"nullable":true},"primaryContactId":{"type":"string","minLength":1,"nullable":true},"contactIds":{"type":"array","items":{"type":"string","minLength":1}},"quoteId":{"type":"string","minLength":1,"nullable":true},"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":{"type":"string","maxLength":64,"nullable":true},"healthScore":{"type":"string","enum":["green","yellow","red"]},"timelineHealthOverride":{"type":"string","enum":["green","yellow","red"],"nullable":true},"budgetHealthOverride":{"type":"string","enum":["green","yellow","red"],"nullable":true},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"billingConfig":{"type":"object","additionalProperties":{}},"customFields":{"type":"object","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":false}},{"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":{"type":"string","minLength":1,"nullable":true},"accountId":{"type":"string","minLength":1,"nullable":true},"locationId":{"type":"string","minLength":1,"nullable":true},"contractId":{"type":"string","nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000,"nullable":true},"ownerId":{"type":"string","minLength":1,"nullable":true},"assignedTo":{"type":"string","minLength":1,"nullable":true},"phase":{"type":"string","maxLength":100,"nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"templateId":{"type":"string","minLength":1,"nullable":true},"dealId":{"type":"string","minLength":1,"nullable":true},"commercialTermsSnapshotId":{"type":"string","minLength":1,"nullable":true},"primaryContactId":{"type":"string","minLength":1,"nullable":true},"contactIds":{"type":"array","items":{"type":"string","minLength":1}},"quoteId":{"type":"string","minLength":1,"nullable":true},"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":{"type":"string","maxLength":64,"nullable":true},"healthScore":{"type":"string","enum":["green","yellow","red"]},"timelineHealthOverride":{"type":"string","enum":["green","yellow","red"],"nullable":true},"budgetHealthOverride":{"type":"string","enum":["green","yellow","red"],"nullable":true},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"billingConfig":{"type":"object","additionalProperties":{}},"customFields":{"type":"object","additionalProperties":{}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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}},{"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}},{"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":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000,"nullable":true},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"deliverables":{"type":"array","items":{"type":"string","maxLength":500}},"billingTrigger":{"type":"boolean"},"billingAmount":{"type":"number","minimum":0,"nullable":true},"approvalRequired":{"type":"boolean"},"status":{"type":"string","enum":["pending","in_progress","completed","cancelled"]},"orderIndex":{"type":"integer","minimum":0}},"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":false}},{"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":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000,"nullable":true},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"deliverables":{"type":"array","items":{"type":"string","maxLength":500}},"billingTrigger":{"type":"boolean"},"billingAmount":{"type":"number","minimum":0,"nullable":true},"approvalRequired":{"type":"boolean"},"status":{"type":"string","enum":["pending","in_progress","completed","cancelled"]},"orderIndex":{"type":"integer","minimum":0},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"phaseId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"parentTaskId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":10000,"nullable":true},"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":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"estimatedHours":{"type":"number","minimum":0,"nullable":true},"actualHours":{"type":"number","minimum":0,"nullable":true},"dependencyIds":{"type":"array","items":{"type":"string"}},"isClientFacing":{"type":"boolean"},"isInternal":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"customFields":{"type":"object","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":false}},{"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":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"phaseId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"parentTaskId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":10000,"nullable":true},"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":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"estimatedHours":{"type":"number","minimum":0,"nullable":true},"actualHours":{"type":"number","minimum":0,"nullable":true},"dependencyIds":{"type":"array","items":{"type":"string"}},"isClientFacing":{"type":"boolean"},"isInternal":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","maxLength":100}},"customFields":{"type":"object","additionalProperties":{}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","maxLength":64,"nullable":true},"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":{"type":"string","maxLength":2000,"nullable":true},"approvalStatus":{"type":"string","enum":["pending","approved","rejected"]},"invoiceId":{"type":"string","maxLength":64,"nullable":true}},"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":false}},{"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":{"type":"string","maxLength":64,"nullable":true},"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":{"type":"string","maxLength":2000,"nullable":true},"approvalStatus":{"type":"string","enum":["pending","approved","rejected"]},"invoiceId":{"type":"string","maxLength":64,"nullable":true},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"contactIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"locationId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"ownerId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"assignedTo":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"number":{"type":"string","minLength":1,"maxLength":50},"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000,"nullable":true},"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"},"requestedBy":{"type":"string","minLength":1,"nullable":true},"customFields":{"type":"object","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":false}},{"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":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"contactIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"locationId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"ownerId":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"assignedTo":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"number":{"type":"string","minLength":1,"maxLength":50},"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":5000,"nullable":true},"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"},"requestedBy":{"type":"string","minLength":1,"nullable":true},"customFields":{"type":"object","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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","maxLength":2000,"nullable":true},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"defaultPhase":{"type":"string","maxLength":100,"nullable":true},"estimatedHours":{"type":"number","minimum":0,"nullable":true},"phases":{"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"},"offsetDays":{"type":"integer","minimum":0,"maximum":3650},"durationDays":{"type":"integer","minimum":1,"maximum":3650}},"required":["name"],"additionalProperties":false}]},"maxItems":100},"taskTemplates":{"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":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50},"isClientFacing":{"type":"boolean"}},"required":["title"],"additionalProperties":false},"maxItems":200},"defaultRoles":{"type":"array","items":{"type":"object","properties":{"roleKey":{"type":"string","minLength":1,"maxLength":80},"count":{"type":"integer","minimum":1,"maximum":50}},"required":["roleKey"],"additionalProperties":false},"maxItems":50},"pipelineId":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"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":false}},{"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":{"type":"string","maxLength":2000,"nullable":true},"billingModel":{"type":"string","enum":["fixed_price","time_and_materials","milestone","retainer","subscription","cost_plus","value_based","hybrid_fixed_tm","capped_tm"]},"defaultPhase":{"type":"string","maxLength":100,"nullable":true},"estimatedHours":{"type":"number","minimum":0,"nullable":true},"phases":{"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"},"offsetDays":{"type":"integer","minimum":0,"maximum":3650},"durationDays":{"type":"integer","minimum":1,"maximum":3650}},"required":["name"],"additionalProperties":false}]},"maxItems":100},"taskTemplates":{"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":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":50},"isClientFacing":{"type":"boolean"}},"required":["title"],"additionalProperties":false},"maxItems":200},"defaultRoles":{"type":"array","items":{"type":"object","properties":{"roleKey":{"type":"string","minLength":1,"maxLength":80},"count":{"type":"integer","minimum":1,"maximum":50}},"required":["roleKey"],"additionalProperties":false},"maxItems":50},"pipelineId":{"type":"string","minLength":1,"maxLength":200,"nullable":true},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":false}},{"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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"},"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","enum":["true"]},{"type":"string","enum":["false"]},{"type":"boolean"}]},"unassigned":{"anyOf":[{"type":"string","enum":["true"]},{"type":"string","enum":["false"]},{"type":"boolean"}]},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"idempotent":true,"annotations":{"title":"Get Ticket","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"string","minLength":1,"nullable":true},"workOrderId":{"type":"string","minLength":1,"nullable":true},"commercialTermsSnapshotId":{"type":"string","minLength":1,"nullable":true},"locationId":{"type":"string","minLength":1,"nullable":true},"assetId":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"ownerId":{"type":"string","minLength":1,"nullable":true},"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":{"type":"string","enum":["question","problem","feature_request","incident","task"],"nullable":true},"category":{"type":"string","maxLength":120,"nullable":true},"channel":{"type":"string","enum":["web","email","phone","chat","api"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":50},"assigneeId":{"type":"string","nullable":true},"queueId":{"type":"string","nullable":true},"slaId":{"type":"string","nullable":true},"resolution":{"type":"string","maxLength":5000,"nullable":true},"requesterId":{"type":"string","nullable":true},"ticketNumber":{"type":"string","nullable":true}},"required":["subject","description"],"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":false}},{"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":{"type":"string","minLength":1,"nullable":true},"workOrderId":{"type":"string","minLength":1,"nullable":true},"commercialTermsSnapshotId":{"type":"string","minLength":1,"nullable":true},"locationId":{"type":"string","minLength":1,"nullable":true},"assetId":{"type":"string","minLength":1,"nullable":true},"productId":{"type":"string","minLength":1,"nullable":true},"ownerId":{"type":"string","minLength":1,"nullable":true},"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":{"type":"string","enum":["question","problem","feature_request","incident","task"],"nullable":true},"category":{"type":"string","maxLength":120,"nullable":true},"channel":{"type":"string","enum":["web","email","phone","chat","api"]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":50},"assigneeId":{"type":"string","nullable":true},"queueId":{"type":"string","nullable":true},"slaId":{"type":"string","nullable":true},"resolution":{"type":"string","maxLength":5000,"nullable":true},"requesterId":{"type":"string","nullable":true},"ticketNumber":{"type":"string","nullable":true},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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","nullable":true},"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":false}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","maxLength":40,"nullable":true},"description":{"type":"string","maxLength":2000,"nullable":true},"kind":{"type":"string","maxLength":40},"notifySettings":{"type":"object","properties":{"notifyAssigneesOnChange":{"type":"boolean"},"dailySummary":{"type":"boolean"},"defaultView":{"type":"string","enum":["calendar","resource_timeline"]},"manualResources":{"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},"maxItems":100},"resourceTimelineOrder":{"type":"array","items":{"type":"string","minLength":1,"maxLength":72},"maxItems":1100},"appointmentColumns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50}},"additionalProperties":false},"customFields":{"type":"object","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":false}},{"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":{"type":"string","maxLength":40,"nullable":true},"description":{"type":"string","maxLength":2000,"nullable":true},"kind":{"type":"string","maxLength":40},"notifySettings":{"type":"object","properties":{"notifyAssigneesOnChange":{"type":"boolean"},"dailySummary":{"type":"boolean"},"defaultView":{"type":"string","enum":["calendar","resource_timeline"]},"manualResources":{"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},"maxItems":100},"resourceTimelineOrder":{"type":"array","items":{"type":"string","minLength":1,"maxLength":72},"maxItems":1100},"appointmentColumns":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":50}},"additionalProperties":false},"customFields":{"type":"object","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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":1000},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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}},{"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?'.","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"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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"],"idempotent":true,"annotations":{"title":"List Calendar Events","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"name":"get_calendar_event","surface":"data","description":"Get a single calendar event by ID with full detail (times, location, notes, linked entity, assignees).","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"],"idempotent":true,"annotations":{"title":"Get Calendar Event","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"string","maxLength":500,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"linkedEntityType":{"type":"string","maxLength":64,"nullable":true},"linkedEntityId":{"type":"string","maxLength":64,"nullable":true},"accountId":{"type":"string","maxLength":64,"nullable":true},"locationId":{"type":"string","maxLength":64,"nullable":true},"contactId":{"type":"string","maxLength":64,"nullable":true},"assigneeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":1000},"customFields":{"type":"object","additionalProperties":{}},"status":{"type":"string","maxLength":64,"nullable":true},"inviteeEmails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":50}},"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":false}},{"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":{"type":"string","maxLength":500,"nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"linkedEntityType":{"type":"string","maxLength":64,"nullable":true},"linkedEntityId":{"type":"string","maxLength":64,"nullable":true},"accountId":{"type":"string","maxLength":64,"nullable":true},"locationId":{"type":"string","maxLength":64,"nullable":true},"contactId":{"type":"string","maxLength":64,"nullable":true},"assigneeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":1000},"customFields":{"type":"object","additionalProperties":{}},"status":{"type":"string","maxLength":64,"nullable":true},"inviteeEmails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":50},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"name":"get_my_agenda","surface":"data","description":"Return the current user's calendar appointments across ALL calendars in a date range — answers 'do I have any appointments today?', 'what's on my calendar this week?'. Defaults to the calling user and today if no range given. Pass userId to look at another user's agenda, and from/to (ISO 8601 datetimes) to widen the window.","entity":"calendar_event","action":"list","inputSchema":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"userId":{"type":"string","minLength":1,"maxLength":64}},"additionalProperties":false},"examples":[{"description":"Do I have anything on today?","input":{},"output":[]},{"description":"What's on my calendar this week?","input":{"from":"2026-06-01T00:00:00Z","to":"2026-06-08T00:00:00Z"},"output":[{"id":"01HZ...","calendarId":"01HC...","calendarName":"Field Service","title":"Site visit","startsAt":"2026-06-03T09:00:00.000Z","endsAt":"2026-06-03T11:00:00.000Z"}]}],"related":["list_calendar_events","get_calendar_availability"],"idempotent":true,"annotations":{"title":"Get My Agenda","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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":{"type":"string","maxLength":500,"nullable":true}},"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":false}},{"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":false}},{"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}},{"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":{"type":"integer","minimum":28,"maximum":365,"default":90}},"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":false}},{"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}},{"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":false}},{"name":"list_invoices","surface":"data","description":"List invoices. Filter by accountId, projectId, status (draft/sent/viewed/paid/overdue/void/disputed), or due-date range.","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}$"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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","nullable":true},"contractId":{"type":"string","nullable":true},"sourceDealId":{"type":"string","maxLength":64,"nullable":true},"commercialTermsSnapshotId":{"type":"string","maxLength":64,"nullable":true},"purchaseOrderNumber":{"type":"string","maxLength":200,"nullable":true},"number":{"type":"string","minLength":1,"maxLength":60},"lineItems":{"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},"maxItems":500},"subtotal":{"type":"number","minimum":0},"tax":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"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":false}},{"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","nullable":true},"contractId":{"type":"string","nullable":true},"sourceDealId":{"type":"string","maxLength":64,"nullable":true},"commercialTermsSnapshotId":{"type":"string","maxLength":64,"nullable":true},"purchaseOrderNumber":{"type":"string","maxLength":200,"nullable":true},"number":{"type":"string","minLength":1,"maxLength":60},"lineItems":{"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},"maxItems":500},"subtotal":{"type":"number","minimum":0},"tax":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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}},{"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":false}},{"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":false}},{"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.","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}$"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","maxLength":64,"nullable":true},"dealId":{"type":"string","maxLength":64,"nullable":true},"workOrderId":{"type":"string","maxLength":64,"nullable":true},"projectId":{"type":"string","maxLength":64,"nullable":true},"ownerId":{"type":"string","maxLength":64,"nullable":true},"number":{"type":"string","minLength":1,"maxLength":60},"title":{"type":"string","maxLength":300,"nullable":true},"lineItems":{"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}},"required":["name","quantity","unitPrice"],"additionalProperties":true},"maxItems":500},"termMonths":{"type":"integer","minimum":0,"maximum":1200,"nullable":true},"pricingModel":{"type":"string","enum":["one_time","time_materials","subscription"],"nullable":true},"billingFrequency":{"type":"string","enum":["monthly","quarterly","semi_annual","annual"],"nullable":true},"discountPercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"taxRatePercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"paymentArrangement":{"type":"string","enum":["upfront_100","completion_100","split_50_50","monthly_subscription","custom"],"nullable":true},"paymentArrangementCustom":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"percent":{"type":"number","minimum":0,"maximum":100},"dueDays":{"type":"integer"},"trigger":{"type":"string","maxLength":60}},"additionalProperties":true},"nullable":true},"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":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":10000,"nullable":true},"terms":{"type":"string","maxLength":20000,"nullable":true},"rejectionReason":{"type":"string","maxLength":2000,"nullable":true},"pdfUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"sentAt":{"type":"string","nullable":true},"acceptedAt":{"type":"string","nullable":true},"rejectedAt":{"type":"string","nullable":true},"convertedInvoiceId":{"type":"string","nullable":true},"customFields":{"type":"object","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":false}},{"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":{"type":"string","maxLength":64,"nullable":true},"dealId":{"type":"string","maxLength":64,"nullable":true},"workOrderId":{"type":"string","maxLength":64,"nullable":true},"projectId":{"type":"string","maxLength":64,"nullable":true},"ownerId":{"type":"string","maxLength":64,"nullable":true},"number":{"type":"string","minLength":1,"maxLength":60},"title":{"type":"string","maxLength":300,"nullable":true},"lineItems":{"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}},"required":["name","quantity","unitPrice"],"additionalProperties":true},"maxItems":500},"termMonths":{"type":"integer","minimum":0,"maximum":1200,"nullable":true},"pricingModel":{"type":"string","enum":["one_time","time_materials","subscription"],"nullable":true},"billingFrequency":{"type":"string","enum":["monthly","quarterly","semi_annual","annual"],"nullable":true},"discountPercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"taxRatePercent":{"type":"number","minimum":0,"maximum":100,"nullable":true},"paymentArrangement":{"type":"string","enum":["upfront_100","completion_100","split_50_50","monthly_subscription","custom"],"nullable":true},"paymentArrangementCustom":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":120},"percent":{"type":"number","minimum":0,"maximum":100},"dueDays":{"type":"integer"},"trigger":{"type":"string","maxLength":60}},"additionalProperties":true},"nullable":true},"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":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":10000,"nullable":true},"terms":{"type":"string","maxLength":20000,"nullable":true},"rejectionReason":{"type":"string","maxLength":2000,"nullable":true},"pdfUrl":{"type":"string","format":"uri","maxLength":500,"nullable":true},"sentAt":{"type":"string","nullable":true},"acceptedAt":{"type":"string","nullable":true},"rejectedAt":{"type":"string","nullable":true},"convertedInvoiceId":{"type":"string","nullable":true},"customFields":{"type":"object","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":false,"idempotentHint":true,"openWorldHint":false}},{"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}},{"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":false}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","maxLength":64,"nullable":true},"contractId":{"type":"string","maxLength":64,"nullable":true},"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":{"type":"number","minimum":0,"maximum":9999999999.99,"nullable":true},"introMonths":{"type":"integer","minimum":0,"maximum":600,"nullable":true},"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":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"autoRenew":{"type":"boolean"},"cancelAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"cancelReason":{"type":"string","maxLength":2000,"nullable":true},"pauseStartsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"pauseEndsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"trialEndsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"mrr":{"type":"number","minimum":0,"maximum":9999999999.99},"customFields":{"type":"object","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":false}},{"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":{"type":"string","maxLength":64,"nullable":true},"contractId":{"type":"string","maxLength":64,"nullable":true},"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":{"type":"number","minimum":0,"maximum":9999999999.99,"nullable":true},"introMonths":{"type":"integer","minimum":0,"maximum":600,"nullable":true},"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":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"autoRenew":{"type":"boolean"},"cancelAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"cancelReason":{"type":"string","maxLength":2000,"nullable":true},"pauseStartsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"pauseEndsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"trialEndsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"mrr":{"type":"number","minimum":0,"maximum":9999999999.99},"customFields":{"type":"object","additionalProperties":{}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","maxLength":2000,"nullable":true},"ownerType":{"type":"string","enum":["user","group","region"]},"ownerUserId":{"type":"string","minLength":1,"nullable":true},"ownerGroupId":{"type":"string","minLength":1,"nullable":true},"ownerRegionId":{"type":"string","minLength":1,"nullable":true},"metric":{"type":"string","enum":["revenue","deals_closed","opps_created","custom"]},"customMetricKey":{"type":"string","maxLength":80,"nullable":true},"amount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3,"nullable":true},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurring":{"type":"string","enum":["monthly","quarterly","annual"],"nullable":true},"status":{"type":"string","enum":["active","achieved","missed","archived"]},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50}},"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":false}},{"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":{"type":"string","maxLength":2000,"nullable":true},"ownerType":{"type":"string","enum":["user","group","region"]},"ownerUserId":{"type":"string","minLength":1,"nullable":true},"ownerGroupId":{"type":"string","minLength":1,"nullable":true},"ownerRegionId":{"type":"string","minLength":1,"nullable":true},"metric":{"type":"string","enum":["revenue","deals_closed","opps_created","custom"]},"customMetricKey":{"type":"string","maxLength":80,"nullable":true},"amount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3,"nullable":true},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"recurring":{"type":"string","enum":["monthly","quarterly","annual"],"nullable":true},"status":{"type":"string","enum":["active","achieved","missed","archived"]},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50}},"required":["id"],"additionalProperties":false},"related":["list_targets","get_target","delete_target"],"idempotent":true,"annotations":{"title":"Update Target","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":false}},{"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":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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","nullable":true},"invoiceId":{"type":"string","nullable":true},"paymentId":{"type":"string","nullable":true},"chargeType":{"type":"string","enum":["debit","credit"],"default":"debit"},"description":{"type":"string","minLength":1,"maxLength":500},"referenceCode":{"type":"string","maxLength":80,"nullable":true},"amount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"taxAmount":{"type":"number","minimum":0,"nullable":true},"taxRate":{"type":"number","minimum":0,"maximum":1,"nullable":true},"status":{"type":"string","enum":["draft","applied","paid","rolled_in","cancelled"]},"statusReason":{"type":"string","maxLength":500,"nullable":true},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50}},"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":false}},{"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","nullable":true},"invoiceId":{"type":"string","nullable":true},"paymentId":{"type":"string","nullable":true},"chargeType":{"type":"string","enum":["debit","credit"],"default":"debit"},"description":{"type":"string","minLength":1,"maxLength":500},"referenceCode":{"type":"string","maxLength":80,"nullable":true},"amount":{"type":"number","minimum":0,"maximum":9999999999.99},"currency":{"type":"string","minLength":3,"maxLength":3},"taxAmount":{"type":"number","minimum":0,"nullable":true},"taxRate":{"type":"number","minimum":0,"maximum":1,"nullable":true},"status":{"type":"string","enum":["draft","applied","paid","rolled_in","cancelled"]},"statusReason":{"type":"string","maxLength":500,"nullable":true},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50}},"required":["id"],"additionalProperties":false},"related":["list_charges","get_charge","delete_charge"],"idempotent":true,"annotations":{"title":"Update Charge","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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).","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","enum":["true"]},{"type":"string","enum":["false"]},{"type":"boolean"}]},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"related":["get_expense_report","create_expense_report"],"idempotent":true,"annotations":{"title":"List Expense Reports","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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}},{"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":{"type":"string","maxLength":2000,"nullable":true},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"costCenterId":{"type":"string","maxLength":64,"nullable":true},"status":{"type":"string","enum":["draft","submitted","pending_l2_approval","pending_l3_approval","approved","rejected","pending_payment","paid","reimbursed"]},"rejectionReason":{"type":"string","maxLength":2000,"nullable":true},"approverUserId":{"type":"string","nullable":true},"approver2UserId":{"type":"string","nullable":true},"approver3UserId":{"type":"string","nullable":true},"totalAmount":{"type":"number","minimum":0},"totalCurrency":{"type":"string","minLength":3,"maxLength":3},"projectId":{"type":"string","nullable":true},"workOrderId":{"type":"string","nullable":true},"customerId":{"type":"string","nullable":true},"contractId":{"type":"string","nullable":true},"billable":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50}},"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":false}},{"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":{"type":"string","maxLength":2000,"nullable":true},"periodStart":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"periodEnd":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"costCenterId":{"type":"string","maxLength":64,"nullable":true},"status":{"type":"string","enum":["draft","submitted","pending_l2_approval","pending_l3_approval","approved","rejected","pending_payment","paid","reimbursed"]},"rejectionReason":{"type":"string","maxLength":2000,"nullable":true},"approverUserId":{"type":"string","nullable":true},"approver2UserId":{"type":"string","nullable":true},"approver3UserId":{"type":"string","nullable":true},"totalAmount":{"type":"number","minimum":0},"totalCurrency":{"type":"string","minLength":3,"maxLength":3},"projectId":{"type":"string","nullable":true},"workOrderId":{"type":"string","nullable":true},"customerId":{"type":"string","nullable":true},"contractId":{"type":"string","nullable":true},"billable":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","maxLength":60},"maxItems":50}},"required":["id"],"additionalProperties":false},"related":["list_expense_reports","get_expense_report"],"idempotent":true,"annotations":{"title":"Update Expense Report","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":100000}},"required":["role","content"],"additionalProperties":false},"minItems":1,"maxItems":50},"model":{"type":"string","enum":["fast","smart","auto"],"default":"auto"},"purpose":{"type":"string","maxLength":60,"default":"chat"},"temperature":{"type":"number","minimum":0,"maximum":2},"maxTokens":{"type":"integer","minimum":1,"maximum":8000},"responseFormat":{"type":"string","enum":["text","json"],"default":"text"}},"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":false}},{"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":{"type":"string","enum":["brief","detailed","bullets"],"default":"brief"},"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":false}},{"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":false}},{"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":{"type":"object","additionalProperties":{"type":"string"},"description":"Filter by field values, e.g. {account_id: 'acc_01HZ...'}"},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string","description":"Opaque cursor from a previous page's pagination.nextCursor"}},"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}},{"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","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":false}},{"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","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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":false}},{"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}},{"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":{"type":"string","description":"Optional framework ID; omit for all frameworks"}},"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}},{"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}},{"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}},{"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":{"type":"integer","minimum":1,"maximum":25,"default":10,"description":"Number of actions to return (default 10, max 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}},{"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":{"type":"string","description":"Optional framework ID to scope the analysis"}},"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}},{"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}},{"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}},{"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}},{"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}},{"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":{"type":"string","maxLength":64,"description":"Scope to one framework"},"q":{"type":"string","maxLength":200,"description":"Free-text search over code/title/requirement text"},"category":{"type":"string","maxLength":120},"status":{"type":"string","enum":["applicable","not_applicable","excluded"],"description":"Scoping status filter"},"fulfillmentStatus":{"type":"string","enum":["open","in_progress","ready_for_review","approved"],"description":"Fulfillment kanban state filter"},"cursor":{"type":"string","description":"Opaque pagination cursor from the previous page"},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Max items to return (default 50, max 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}},{"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":{"type":"string","maxLength":64,"nullable":true},"code":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":300},"requirementText":{"type":"string","minLength":1,"maxLength":20000},"guidance":{"type":"string","maxLength":20000,"nullable":true},"category":{"type":"string","maxLength":120,"nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"]},"status":{"type":"string","enum":["applicable","not_applicable","excluded"]},"notApplicableReason":{"type":"string","maxLength":2000,"nullable":true},"suggestedEvidence":{"type":"string","maxLength":20000,"nullable":true},"assignedTo":{"type":"string","maxLength":64,"nullable":true},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"customFields":{"type":"object","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":false}},{"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":{"type":"string","maxLength":64,"nullable":true},"code":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":300},"requirementText":{"type":"string","minLength":1,"maxLength":20000},"guidance":{"type":"string","maxLength":20000,"nullable":true},"category":{"type":"string","maxLength":120,"nullable":true},"priority":{"type":"string","enum":["critical","high","medium","low"]},"status":{"type":"string","enum":["applicable","not_applicable","excluded"]},"notApplicableReason":{"type":"string","maxLength":2000,"nullable":true},"suggestedEvidence":{"type":"string","maxLength":20000,"nullable":true},"assignedTo":{"type":"string","maxLength":64,"nullable":true},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"customFields":{"type":"object","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":false,"idempotentHint":true,"openWorldHint":false}},{"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}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":{"type":"string","maxLength":2000,"description":"Review note — REQUIRED for request_changes"}},"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":{"type":"string","maxLength":64,"nullable":true},"targetDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"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":false}},{"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":false}},{"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":{"type":"string","maxLength":10000,"nullable":true},"authority":{"type":"string","maxLength":200,"nullable":true},"effectiveDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"nextReviewDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"lifecyclePhase":{"type":"string","enum":["not_started","in_progress","in_review","audit","certified","on_hold","cancelled"]},"certifiedUntil":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"ownerUserId":{"type":"string","maxLength":64,"nullable":true},"targetDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"customFields":{"type":"object","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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false,"idempotentHint":true,"openWorldHint":false}},{"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}},{"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"name":"get_vendor","surface":"data","description":"Get one vendor by id — contact details, payment terms, rating, status, certifications.","entity":"vendor","action":"read","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"related":["list_vendors","update_vendor"],"idempotent":true,"annotations":{"title":"Get Vendor","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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},"contactEmail":{"type":"string","format":"email","maxLength":320,"nullable":true},"contactPhone":{"type":"string","maxLength":40,"nullable":true},"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":true},"paymentTerms":{"type":"string","maxLength":40},"currency":{"type":"string","minLength":3,"maxLength":3},"taxId":{"type":"string","maxLength":64,"nullable":true},"rating":{"type":"number","minimum":1,"maximum":5,"nullable":true},"status":{"type":"string","enum":["active","pending","suspended","blacklisted"]},"certifications":{"type":"array","items":{"type":"string","maxLength":80},"maxItems":50},"accountId":{"type":"string","maxLength":64,"nullable":true},"website":{"type":"string","format":"uri","maxLength":500,"nullable":true},"bankDetails":{"type":"object","properties":{"bankName":{"type":"string","maxLength":200},"accountName":{"type":"string","maxLength":200},"accountNumber":{"type":"string","maxLength":80},"iban":{"type":"string","maxLength":40},"swift":{"type":"string","maxLength":20},"routingNumber":{"type":"string","maxLength":20}},"additionalProperties":true}},"required":["name"],"additionalProperties":false},"related":["list_vendors","update_vendor"],"idempotent":false,"annotations":{"title":"Create Vendor","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"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},"contactEmail":{"type":"string","format":"email","maxLength":320,"nullable":true},"contactPhone":{"type":"string","maxLength":40,"nullable":true},"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":true},"paymentTerms":{"type":"string","maxLength":40},"currency":{"type":"string","minLength":3,"maxLength":3},"taxId":{"type":"string","maxLength":64,"nullable":true},"rating":{"type":"number","minimum":1,"maximum":5,"nullable":true},"status":{"type":"string","enum":["active","pending","suspended","blacklisted"]},"certifications":{"type":"array","items":{"type":"string","maxLength":80},"maxItems":50},"accountId":{"type":"string","maxLength":64,"nullable":true},"website":{"type":"string","format":"uri","maxLength":500,"nullable":true},"bankDetails":{"type":"object","properties":{"bankName":{"type":"string","maxLength":200},"accountName":{"type":"string","maxLength":200},"accountNumber":{"type":"string","maxLength":80},"iban":{"type":"string","maxLength":40},"swift":{"type":"string","maxLength":20},"routingNumber":{"type":"string","maxLength":20}},"additionalProperties":true}},"additionalProperties":false}},"required":["id","patch"],"additionalProperties":false},"related":["get_vendor"],"idempotent":true,"annotations":{"title":"Update Vendor","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"additionalProperties":false},"related":["list_purchase_orders","send_purchase_order"],"idempotent":true,"annotations":{"title":"Get Purchase Order","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"string","maxLength":64,"nullable":true},"costCenterId":{"type":"string","maxLength":64,"nullable":true},"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","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":true},"expectedDeliveryDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"customFields":{"type":"object","additionalProperties":{}},"lines":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","maxLength":64,"nullable":true},"description":{"type":"string","minLength":1,"maxLength":500},"quantityOrdered":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":9999999},"unitPrice":{"type":"number","minimum":0,"maximum":9999999999.99,"default":0},"deliveryDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["description","quantityOrdered"],"additionalProperties":false},"maxItems":200}},"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":false}},{"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":{"type":"string","maxLength":64,"nullable":true},"costCenterId":{"type":"string","maxLength":64,"nullable":true},"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","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":true},"expectedDeliveryDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"customFields":{"type":"object","additionalProperties":{}},"lines":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","maxLength":64,"nullable":true},"description":{"type":"string","minLength":1,"maxLength":500},"quantityOrdered":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":9999999},"unitPrice":{"type":"number","minimum":0,"maximum":9999999999.99,"default":0},"deliveryDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true}},"required":["description","quantityOrdered"],"additionalProperties":false},"maxItems":200}},"additionalProperties":false}},"required":["id","patch"],"additionalProperties":false},"related":["get_purchase_order"],"idempotent":true,"annotations":{"title":"Update Purchase Order","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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"],"additionalProperties":false},"related":["approve_purchase_order","cancel_purchase_order"],"idempotent":true,"annotations":{"title":"Send Purchase Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":true}},{"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"],"additionalProperties":false},"related":["send_purchase_order"],"idempotent":true,"annotations":{"title":"Approve Purchase Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false}},{"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"],"additionalProperties":false},"related":["get_purchase_order"],"idempotent":true,"annotations":{"title":"Cancel Purchase Order","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"additionalProperties":false},"related":["list_inventory_items"],"idempotent":true,"annotations":{"title":"Get Inventory Item","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"related":["list_inventory_items"],"idempotent":true,"annotations":{"title":"List Warehouses","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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"],"additionalProperties":false},"related":["set_product_components","check_deal_inventory","get_product"],"idempotent":true,"annotations":{"title":"Get Product Components","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"array","items":{"type":"object","properties":{"componentProductId":{"type":"string","minLength":1},"quantityPerUnit":{"type":"number","exclusiveMinimum":true,"minimum":0},"notes":{"type":"string","maxLength":2000,"nullable":true},"sortOrder":{"type":"integer","minimum":0,"nullable":true}},"required":["componentProductId","quantityPerUnit"],"additionalProperties":false},"maxItems":200}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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"],"additionalProperties":false},"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}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"additionalProperties":false},"related":["list_surveys","send_survey","list_survey_responses"],"idempotent":true,"annotations":{"title":"Get Survey","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"string","maxLength":2000,"nullable":true},"surveyType":{"type":"string","enum":["csat","nps","ces","custom"],"default":"csat"},"questions":{"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":{"type":"boolean","default":true},"options":{"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},"maxItems":50},"min":{"type":"integer"},"max":{"type":"integer"},"minLabel":{"type":"string","maxLength":120},"maxLabel":{"type":"string","maxLength":120},"allowComment":{"type":"boolean"}},"required":["id","label","type"],"additionalProperties":false},"minItems":1,"maxItems":50},"thankYouMessage":{"type":"string","maxLength":2000,"nullable":true},"settings":{"type":"object","properties":{"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","format":"uri","maxLength":2000},"redirectUrl":{"type":"string","format":"uri","maxLength":2000}},"additionalProperties":false},"triggerOn":{"type":"string","maxLength":60,"nullable":true},"isActive":{"type":"boolean","default":true},"customFields":{"type":"object","additionalProperties":{}},"accountId":{"type":"string","maxLength":64,"nullable":true},"projectId":{"type":"string","maxLength":64,"nullable":true}},"required":["name","questions"],"additionalProperties":false},"related":["list_surveys","send_survey"],"idempotent":false,"annotations":{"title":"Create Survey","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"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":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":254},"name":{"type":"string","maxLength":200},"accountId":{"type":"string","maxLength":64},"contactId":{"type":"string","maxLength":64}},"required":["email"],"additionalProperties":false},"minItems":1,"maxItems":200},"expiresInDays":{"type":"integer","minimum":1,"maximum":365,"default":30},"subject":{"type":"string","maxLength":200},"message":{"type":"string","maxLength":2000},"dealId":{"type":"string","maxLength":64,"nullable":true},"projectId":{"type":"string","maxLength":64,"nullable":true},"ticketId":{"type":"string","maxLength":64,"nullable":true},"sourceEntityType":{"type":"string","enum":["account","contact","deal","project","ticket","employee"]},"sourceEntityId":{"type":"string","minLength":1,"maxLength":64}},"additionalProperties":false}},"required":["id","send"],"additionalProperties":false},"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}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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":{"type":"array","items":{"type":"string","minLength":1},"maxItems":20},"hub":{"type":"string","minLength":1,"maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":25,"default":10}},"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}},{"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":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":20,"default":[]},"sourceType":{"type":"string","enum":["manual","upload","transcript"],"default":"manual"},"sourceRef":{"type":"string","maxLength":500},"objectKey":{"type":"string","maxLength":500},"mimeType":{"type":"string","maxLength":120},"byteSize":{"type":"integer","minimum":0},"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":false}},{"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}},{"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":false,"idempotentHint":false,"openWorldHint":false}},{"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","maxLength":200},"carrierId":{"type":"string","maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"additionalProperties":false},"related":["list_shipments","update_shipment"],"idempotent":true,"annotations":{"title":"Get Shipment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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 (SHP-YYYY-NNNNNN) 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":{"type":"string","maxLength":60,"nullable":true},"accountId":{"type":"string","maxLength":80,"minLength":1},"workOrderId":{"type":"string","maxLength":80,"nullable":true},"carrierId":{"type":"string","maxLength":80,"nullable":true},"carrierService":{"type":"string","maxLength":120,"nullable":true},"trackingNumber":{"type":"string","maxLength":200,"nullable":true},"trackingUrl":{"type":"string","maxLength":1000,"nullable":true},"status":{"type":"string","maxLength":40,"nullable":true},"shipFromWarehouseId":{"type":"string","maxLength":80,"nullable":true},"locationId":{"type":"string","maxLength":80,"nullable":true},"shipToLine1":{"type":"string","maxLength":300,"nullable":true},"shipToLine2":{"type":"string","maxLength":300,"nullable":true},"shipToCity":{"type":"string","maxLength":200,"nullable":true},"shipToState":{"type":"string","maxLength":200,"nullable":true},"shipToPostalCode":{"type":"string","maxLength":40,"nullable":true},"shipToCountry":{"type":"string","maxLength":100,"nullable":true},"weightGrams":{"type":"number","minimum":0,"nullable":true},"lengthMm":{"type":"number","minimum":0,"nullable":true},"widthMm":{"type":"number","minimum":0,"nullable":true},"heightMm":{"type":"number","minimum":0,"nullable":true},"cost":{"type":"number","minimum":0,"nullable":true},"currency":{"type":"string","maxLength":3,"nullable":true},"shippedAt":{"type":"string","format":"date-time","nullable":true},"deliveredAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"portalVisible":{"type":"boolean","nullable":true},"customFields":{"type":"object","additionalProperties":{},"nullable":true}},"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":"SHP-2026-000001","status":"in_transit"}}],"related":["list_shipments","update_shipment","get_work_order"],"idempotent":false,"annotations":{"title":"Create Shipment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"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":{"type":"string","maxLength":60,"nullable":true},"accountId":{"type":"string","maxLength":80},"workOrderId":{"type":"string","maxLength":80,"nullable":true},"carrierId":{"type":"string","maxLength":80,"nullable":true},"carrierService":{"type":"string","maxLength":120,"nullable":true},"trackingNumber":{"type":"string","maxLength":200,"nullable":true},"trackingUrl":{"type":"string","maxLength":1000,"nullable":true},"status":{"type":"string","maxLength":40,"nullable":true},"shipFromWarehouseId":{"type":"string","maxLength":80,"nullable":true},"locationId":{"type":"string","maxLength":80,"nullable":true},"shipToLine1":{"type":"string","maxLength":300,"nullable":true},"shipToLine2":{"type":"string","maxLength":300,"nullable":true},"shipToCity":{"type":"string","maxLength":200,"nullable":true},"shipToState":{"type":"string","maxLength":200,"nullable":true},"shipToPostalCode":{"type":"string","maxLength":40,"nullable":true},"shipToCountry":{"type":"string","maxLength":100,"nullable":true},"weightGrams":{"type":"number","minimum":0,"nullable":true},"lengthMm":{"type":"number","minimum":0,"nullable":true},"widthMm":{"type":"number","minimum":0,"nullable":true},"heightMm":{"type":"number","minimum":0,"nullable":true},"cost":{"type":"number","minimum":0,"nullable":true},"currency":{"type":"string","maxLength":3,"nullable":true},"shippedAt":{"type":"string","format":"date-time","nullable":true},"deliveredAt":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","nullable":true},"portalVisible":{"type":"boolean","nullable":true},"customFields":{"type":"object","additionalProperties":{},"nullable":true}},"additionalProperties":false}},"required":["id","patch"],"additionalProperties":false},"related":["get_shipment","list_shipments"],"idempotent":true,"annotations":{"title":"Update Shipment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"additionalProperties":false},"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}},{"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","maxLength":200,"minLength":1},"description":{"type":"string","nullable":true},"filterKind":{"type":"string","enum":["manual","dynamic_leads","dynamic_contacts","dynamic_subscribers"]},"filterRules":{"type":"object","additionalProperties":{},"nullable":true},"memberCount":{"type":"number","nullable":true},"lastBuiltAt":{"type":"string","format":"date-time","nullable":true}},"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":false}},{"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"],"additionalProperties":false},"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":false}},{"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":{"type":"array","items":{"type":"string"},"maxItems":1000},"leadIds":{"type":"array","items":{"type":"string"},"maxItems":1000},"contactIds":{"type":"array","items":{"type":"string"},"maxItems":1000}},"required":["id"],"additionalProperties":false},"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":false,"idempotentHint":false,"openWorldHint":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"additionalProperties":false},"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}},{"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","maxLength":200,"minLength":1},"subject":{"type":"string","maxLength":300,"minLength":1},"isActive":{"type":"boolean"},"category":{"type":"string","maxLength":80,"nullable":true},"fromName":{"type":"string","maxLength":100,"nullable":true},"fromEmail":{"type":"string","maxLength":200,"nullable":true},"replyTo":{"type":"string","maxLength":200,"nullable":true},"preheader":{"type":"string","maxLength":200,"nullable":true},"htmlBody":{"type":"string","minLength":1},"textBody":{"type":"string","nullable":true}},"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":false}},{"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":{"type":"string","maxLength":80,"nullable":true},"fromName":{"type":"string","maxLength":100,"nullable":true},"fromEmail":{"type":"string","maxLength":200,"nullable":true},"replyTo":{"type":"string","maxLength":200,"nullable":true},"preheader":{"type":"string","maxLength":200,"nullable":true},"htmlBody":{"type":"string"},"textBody":{"type":"string","nullable":true},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"additionalProperties":false},"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}},{"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","maxLength":200,"minLength":1},"description":{"type":"string","maxLength":2000,"nullable":true},"segmentId":{"type":"string","maxLength":80,"nullable":true},"recipientMode":{"type":"string","enum":["segment","adhoc","mixed","criteria"]},"recipientRefs":{"type":"array","items":{},"nullable":true},"audienceFilter":{"type":"object","additionalProperties":{},"nullable":true},"templateId":{"type":"string","maxLength":80,"nullable":true},"subject":{"type":"string","maxLength":300,"nullable":true},"preheader":{"type":"string","maxLength":200,"nullable":true},"fromName":{"type":"string","maxLength":100,"nullable":true},"fromEmail":{"type":"string","maxLength":200,"nullable":true},"replyTo":{"type":"string","maxLength":200,"nullable":true},"htmlBody":{"type":"string","nullable":true},"textBody":{"type":"string","nullable":true},"utm":{"type":"object","additionalProperties":{},"nullable":true},"ab":{"type":"object","additionalProperties":{},"nullable":true}},"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":false}},{"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":{"type":"string","maxLength":2000,"nullable":true},"segmentId":{"type":"string","maxLength":80,"nullable":true},"recipientMode":{"type":"string","enum":["segment","adhoc","mixed","criteria"]},"recipientRefs":{"type":"array","items":{},"nullable":true},"audienceFilter":{"type":"object","additionalProperties":{},"nullable":true},"templateId":{"type":"string","maxLength":80,"nullable":true},"subject":{"type":"string","maxLength":300,"nullable":true},"preheader":{"type":"string","maxLength":200,"nullable":true},"fromName":{"type":"string","maxLength":100,"nullable":true},"fromEmail":{"type":"string","maxLength":200,"nullable":true},"replyTo":{"type":"string","maxLength":200,"nullable":true},"htmlBody":{"type":"string","nullable":true},"textBody":{"type":"string","nullable":true},"utm":{"type":"object","additionalProperties":{},"nullable":true},"ab":{"type":"object","additionalProperties":{},"nullable":true},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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"],"additionalProperties":false},"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}},{"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"],"additionalProperties":false},"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}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"additionalProperties":false},"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":false}},{"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":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"maxItems":100}},"required":["id","urls"],"additionalProperties":false},"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}},{"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"name":"get_competitor","surface":"data","description":"Get the full 360° intelligence on one competitor — company profile (size, industry, market share, strengths & weaknesses, positioning), web & tech signals (site speed, SEO, detected tech stack, domain authority), social & key-people presence, and the latest updates (news, launches, pricing/site changes). Use this to answer 'tell me about competitor X', 'how big are they', 'what's their market share', 'what are their strengths and weaknesses', or 'what's the latest on them'. Get the id from list_competitors first.","entity":"competitor","action":"insights","inputSchema":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"examples":[{"description":"Full 360 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":false}},{"name":"create_competitor","surface":"data","description":"Add a competitor by website URL and start tracking them. We auto-enrich the full profile (company details, web & tech signals, social presence, and latest updates) in the background right after creating the record, so the profile populates on its own — no need to fill anything in. Use this for 'add competitor X', 'start tracking acme.com', or 'track our rival at <url>'. Provide the url (required); the name is optional and is derived from the URL host if omitted.","entity":"competitor","action":"create","inputSchema":{"type":"object","properties":{"url":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["url"],"additionalProperties":false},"examples":[{"description":"Track a competitor by URL","input":{"url":"https://acme.com"},"output":{"id":"01J0...","name":"Acme"}},{"description":"Track with an explicit name","input":{"url":"https://acme.com","name":"Acme 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}},{"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"],"additionalProperties":false},"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}},{"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, 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":{"type":"integer","minimum":1,"maximum":500,"description":"Page size. Default 50, max 500."},"cursor":{"type":"string","description":"pagination.nextCursor from the previous page."}},"required":["entityType","entityId"],"additionalProperties":false},"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}},{"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, 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":{"type":"string","minLength":1,"maxLength":64,"description":"Edge label, e.g. \"related\" (default), \"procured_via\", \"used_in_project\"."},"note":{"type":"string","maxLength":2000,"description":"Free-text annotation shown on the link."}},"required":["fromType","fromId","toType","toId"],"additionalProperties":false},"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":false}},{"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, 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"],"additionalProperties":false},"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":false}},{"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":{"type":"integer","minimum":1,"maximum":100,"description":"Max records per branch (contacts, deals, tickets, …). Default 25, max 100."}},"required":["centerType","centerId"],"additionalProperties":false},"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}},{"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":true},"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}},{"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":false}},{"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}},{"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","maxLength":200,"minLength":1},"type":{"type":"string","maxLength":80,"minLength":1},"jurisdiction":{"type":"string","maxLength":8,"minLength":1},"approvalWorkflow":{"type":"string","maxLength":200,"nullable":true},"document":{"type":"object","additionalProperties":{}},"logoMode":{"type":"string","enum":["company","custom","none"]},"customLogoStorageKey":{"type":"string","nullable":true},"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":false}},{"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":{"type":"string","maxLength":200,"nullable":true},"document":{"type":"object","additionalProperties":{}},"logoMode":{"type":"string","enum":["company","custom","none"]},"customLogoStorageKey":{"type":"string","nullable":true},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"string","enum":["use","edit"],"default":"use"}},"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":false}},{"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}},{"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}},{"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":{"type":"array","items":{"type":"string","minLength":1},"maxItems":50}},"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":false,"idempotentHint":true,"openWorldHint":false}},{"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}},{"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}},{"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.","entity":"mailbox","action":"list","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"examples":[{"description":"Discover connected mail accounts","input":{},"output":{"items":[]}},{"description":"Check which provider Atlas should use","input":{},"output":{"items":[{"provider":"google","email":"owner@example.com"}]}}],"related":["list_mail_folders","list_mail_messages","search_mail"],"idempotent":true,"annotations":{"title":"List Mailboxes","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"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":{"type":"boolean","default":false}},"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}},{"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":{"type":"string","minLength":1,"maxLength":4096,"default":"inbox"},"cursor":{"type":"string","maxLength":4096,"default":""},"limit":{"type":"integer","minimum":1,"maximum":50,"default":50},"refresh":{"type":"boolean","default":false}},"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}},{"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 sender, unread state, and date range. 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},"unread":{"type":"boolean"},"since":{"type":"string","maxLength":64},"until":{"type":"string","maxLength":64},"limit":{"type":"integer","minimum":1,"maximum":50,"default":25}},"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":[]}}],"related":["list_mailboxes","list_mail_folders","get_mail_message"],"idempotent":true,"annotations":{"title":"Search Mail","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"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}},{"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":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},{"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":{"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},"minItems":1,"maxItems":20},"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}},{"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":{"type":"string","minLength":1,"maxLength":64,"nullable":true},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":20}},"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}},{"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":{"type":"array","items":{"type":"string","format":"email"},"minItems":1,"maxItems":100},"cc":{"type":"array","items":{"type":"string","format":"email"},"maxItems":100},"bcc":{"type":"array","items":{"type":"string","format":"email"},"maxItems":100},"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}},{"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":false,"idempotentHint":true,"openWorldHint":true}},{"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":false,"idempotentHint":false,"openWorldHint":true}},{"name":"list_employees","surface":"data","description":"List HR/workforce employee records. Employees may exist without a CaptivaHQ login; accessStatus and userId show the optional access link.","entity":"employee","action":"list","inputSchema":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"departmentId":{"type":"string"},"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},{"type":"array","items":{"type":"string","maxLength":128},"maxItems":200}]},"linked":{"type":"string","enum":["true","false"]},"directory":{"type":"string","enum":["1"]},"limit":{"type":"integer","minimum":1,"maximum":500},"cursor":{"type":"string"}},"additionalProperties":true},"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}},{"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}},{"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":{"type":"string","maxLength":160,"nullable":true},"managerId":{"type":"string","nullable":true},"departmentId":{"type":"string","nullable":true},"costCenterId":{"type":"string","nullable":true},"regionId":{"type":"string","nullable":true},"locale":{"type":"string","maxLength":20,"nullable":true},"country":{"type":"string","maxLength":2,"nullable":true},"timezone":{"type":"string","maxLength":80,"nullable":true},"email":{"type":"string","format":"email","nullable":true},"personalEmail":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","maxLength":50,"nullable":true},"employmentType":{"type":"string","enum":["full_time","part_time","contractor","temporary","intern","other"]},"status":{"type":"string","enum":["active","on_leave","inactive","terminated"]},"startDate":{"type":"string","format":"date","nullable":true},"endDate":{"type":"string","format":"date","nullable":true},"customFields":{"type":"object","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":false}},{"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":{"type":"string","maxLength":160,"nullable":true},"managerId":{"type":"string","nullable":true},"departmentId":{"type":"string","nullable":true},"costCenterId":{"type":"string","nullable":true},"regionId":{"type":"string","nullable":true},"locale":{"type":"string","maxLength":20,"nullable":true},"country":{"type":"string","maxLength":2,"nullable":true},"timezone":{"type":"string","maxLength":80,"nullable":true},"email":{"type":"string","format":"email","nullable":true},"personalEmail":{"type":"string","format":"email","nullable":true},"phone":{"type":"string","maxLength":50,"nullable":true},"employmentType":{"type":"string","enum":["full_time","part_time","contractor","temporary","intern","other"]},"status":{"type":"string","enum":["active","on_leave","inactive","terminated"]},"startDate":{"type":"string","format":"date","nullable":true},"endDate":{"type":"string","format":"date","nullable":true},"customFields":{"type":"object","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":false,"idempotentHint":true,"openWorldHint":false}},{"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":true},"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}},{"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":false}},{"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","enum":["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}},{"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":{"type":"string","minLength":3,"maxLength":3,"default":"USD"},"payFrequency":{"type":"string","enum":["hourly","weekly","biweekly","semimonthly","monthly","annual","one_time"]},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date","nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true},"customFields":{"type":"object","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":false}},{"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 (the technician's USER id — what assigned_technician_id stores), 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},"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":{"type":"integer","minimum":1,"maximum":500,"default":50},"cursor":{"type":"string"},"sort":{"type":"string"}},"additionalProperties":true},"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}},{"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"],"idempotent":true,"annotations":{"title":"Get Work Order","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},{"name":"create_work_order","surface":"data","description":"Create a new work order. Required: orderNumber, accountId, priority. Optional: contactId, workOrderTypeId, locationId, status, description, scheduling (scheduledDate, scheduledTimeStart/End), assignedTechnicianId, location coordinates, costs (laborCost/partsCost/totalCost), amount/currency, tags, customFields.","entity":"work_order","action":"create","inputSchema":{"type":"object","properties":{"orderNumber":{"type":"string","minLength":1,"maxLength":60},"accountId":{"type":"string","minLength":1,"maxLength":64},"contactId":{"type":"string","maxLength":64,"nullable":true},"projectId":{"type":"string","maxLength":64,"nullable":true},"commercialTermsSnapshotId":{"type":"string","maxLength":64,"nullable":true},"workOrderTypeId":{"type":"string","maxLength":64,"nullable":true},"status":{"type":"string","minLength":1,"maxLength":80},"priority":{"type":"string","enum":["emergency","high","normal","low"]},"description":{"type":"string","maxLength":5000,"nullable":true},"locationAddress":{"type":"string","maxLength":500,"nullable":true},"locationLat":{"type":"number","minimum":-90,"maximum":90,"nullable":true},"locationLng":{"type":"number","minimum":-180,"maximum":180,"nullable":true},"scheduledDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"scheduledTimeStart":{"type":"string","format":"date-time","nullable":true},"scheduledTimeEnd":{"type":"string","format":"date-time","nullable":true},"assignedTechnicianId":{"type":"string","maxLength":64,"nullable":true},"estimatedDurationMinutes":{"type":"integer","minimum":0,"maximum":100000,"nullable":true},"actualDurationMinutes":{"type":"integer","minimum":0,"maximum":100000,"nullable":true},"arrivalTime":{"type":"string","format":"date-time","nullable":true},"completionTime":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"partsUsed":{"type":"array","items":{"type":"object","additionalProperties":{}},"maxItems":200},"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":{"type":"string","maxLength":64,"nullable":true},"locationId":{"type":"string","minLength":1,"maxLength":64},"pipelineId":{"type":"string","maxLength":64,"nullable":true},"primaryQuoteId":{"type":"string","maxLength":64,"nullable":true},"ownerUserId":{"type":"string","maxLength":64,"nullable":true},"amount":{"type":"number","minimum":0,"maximum":9999999999.99,"nullable":true},"currency":{"type":"string","maxLength":3},"recordTypeId":{"type":"string","maxLength":64,"nullable":true},"sourceWarehouseId":{"type":"string","maxLength":64,"nullable":true},"shipToLine1":{"type":"string","maxLength":500,"nullable":true},"shipToLine2":{"type":"string","maxLength":500,"nullable":true},"shipToCity":{"type":"string","maxLength":120,"nullable":true},"shipToState":{"type":"string","maxLength":120,"nullable":true},"shipToPostalCode":{"type":"string","maxLength":30,"nullable":true},"shipToCountry":{"type":"string","maxLength":120,"nullable":true},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":50},"customFields":{"type":"object","additionalProperties":{}}},"required":["orderNumber","accountId","priority","locationId"],"additionalProperties":false},"examples":[{"description":"Create an emergency work order","input":{"orderNumber":"WO-1042","accountId":"01HZ...","priority":"emergency","description":"HVAC unit down"},"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":false}},{"name":"update_work_order","surface":"data","description":"Partial update of a work order. Only provided fields are changed; omitted fields are untouched. 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},"accountId":{"type":"string","minLength":1,"maxLength":64},"contactId":{"type":"string","maxLength":64,"nullable":true},"projectId":{"type":"string","maxLength":64,"nullable":true},"commercialTermsSnapshotId":{"type":"string","maxLength":64,"nullable":true},"workOrderTypeId":{"type":"string","maxLength":64,"nullable":true},"status":{"type":"string","minLength":1,"maxLength":80},"priority":{"type":"string","enum":["emergency","high","normal","low"]},"description":{"type":"string","maxLength":5000,"nullable":true},"locationAddress":{"type":"string","maxLength":500,"nullable":true},"locationLat":{"type":"number","minimum":-90,"maximum":90,"nullable":true},"locationLng":{"type":"number","minimum":-180,"maximum":180,"nullable":true},"scheduledDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true},"scheduledTimeStart":{"type":"string","format":"date-time","nullable":true},"scheduledTimeEnd":{"type":"string","format":"date-time","nullable":true},"assignedTechnicianId":{"type":"string","maxLength":64,"nullable":true},"estimatedDurationMinutes":{"type":"integer","minimum":0,"maximum":100000,"nullable":true},"actualDurationMinutes":{"type":"integer","minimum":0,"maximum":100000,"nullable":true},"arrivalTime":{"type":"string","format":"date-time","nullable":true},"completionTime":{"type":"string","format":"date-time","nullable":true},"notes":{"type":"string","maxLength":5000,"nullable":true},"partsUsed":{"type":"array","items":{"type":"object","additionalProperties":{}},"maxItems":200},"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":{"type":"string","maxLength":64,"nullable":true},"locationId":{"type":"string","minLength":1,"maxLength":64},"pipelineId":{"type":"string","maxLength":64,"nullable":true},"primaryQuoteId":{"type":"string","maxLength":64,"nullable":true},"ownerUserId":{"type":"string","maxLength":64,"nullable":true},"amount":{"type":"number","minimum":0,"maximum":9999999999.99,"nullable":true},"currency":{"type":"string","maxLength":3},"recordTypeId":{"type":"string","maxLength":64,"nullable":true},"sourceWarehouseId":{"type":"string","maxLength":64,"nullable":true},"shipToLine1":{"type":"string","maxLength":500,"nullable":true},"shipToLine2":{"type":"string","maxLength":500,"nullable":true},"shipToCity":{"type":"string","maxLength":120,"nullable":true},"shipToState":{"type":"string","maxLength":120,"nullable":true},"shipToPostalCode":{"type":"string","maxLength":30,"nullable":true},"shipToCountry":{"type":"string","maxLength":120,"nullable":true},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"maxItems":50},"customFields":{"type":"object","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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":false,"idempotentHint":true,"openWorldHint":false}},{"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":false}},{"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":{"type":"string","enum":["time","distance","fuel"],"default":"time"},"vehicle":{"type":"string","enum":["car","van","truck"],"default":"car"},"pinnedWorkOrderIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":60,"default":[]},"returnToStart":{"type":"boolean","default":true},"dayStart":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","default":"08:00"},"fuelPricePerLitre":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":100},"persist":{"type":"boolean","default":true}},"required":["date","technicianId"],"additionalProperties":false},"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":false}},{"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. FAILS with 422 when any appointment in the window has no client, no site, or an address that cannot be placed on a map; the error's details.missing names each one and what to fix. That is deliberate — a partial route looks finished. 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":{"type":"string","enum":["day","week","month"],"default":"day"},"objective":{"type":"string","enum":["time","distance","fuel"],"default":"time"},"vehicle":{"type":"string","enum":["car","van","truck"],"default":"car"},"dayStart":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","default":"08:00"},"returnToStart":{"type":"boolean","default":true},"fuelPricePerLitre":{"type":"number","exclusiveMinimum":true,"minimum":0,"maximum":100},"preferences":{"type":"object","properties":{"avoidTolls":{"type":"boolean"},"avoidHighways":{"type":"boolean"},"respectAppointmentTimes":{"type":"boolean"},"clusterByArea":{"type":"boolean"},"minimiseOvertime":{"type":"boolean"},"balanceWorkload":{"type":"boolean"}},"additionalProperties":false,"default":{}},"instructions":{"type":"string","maxLength":2000},"adjustment":{"type":"string","maxLength":2000},"currentOrder":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":25}},"persist":{"type":"boolean","default":true}},"required":["calendarId","assigneeUserId","anchorDate"],"additionalProperties":false},"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"],"idempotent":false,"annotations":{"title":"Build Calendar Route","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}}],"x-links":{"openapi":"/api/v1/public/docs","publicManifest":"/api/v1/public/mcp/manifest"}}