Connect your AI to AI CRM Nepal
Give your assistant permission to work with leads, complete customer context, tasks, projects and reports using the Model Context Protocol.
Open MCP Feature · Download machine-readable tool reference · REST API documentation
1. Approve access
An owner or administrator opens MCP Feature → Permissions, selects allowed actions, enables MCP and saves. In Team access, explicitly enable each member and select their actions. Members connect their own AI accounts; owner tokens do not need to be shared. Assigned-only and other ordinary CRM restrictions still apply.
2. Connect a client
Server URL: https://www.aicrmnepal.com/api/mcp. Transport: Streamable HTTP. OAuth uses dynamic client registration, exact callback URLs and PKCE S256. A personal Bearer token can be created in MCP Feature for clients that support token authentication. Tokens are shown once, expire after at most 90 days and can be revoked.
- ChatGPT web: add a custom app with this server URL, choose OAuth and sign in. Availability depends on plan and workspace policy.
- Claude web / desktop: Settings → Connectors → Add custom connector. Use the URL and authorize your CRM account.
- Claude Code:
claude mcp add --transport http ai-crm-nepal https://www.aicrmnepal.com/api/mcp, then authenticate using/mcp. - Codex: add an HTTP MCP server using the URL. Use OAuth login or configure
bearer_token_env_var = "AI_CRM_MCP_TOKEN". - n8n MCP Client / MCP Client Tool: use Streamable HTTP and a Bearer Auth credential. Attach MCP Client Tool to an AI Agent for agent-driven actions. The client’s tool filter only narrows available tools; CRM enforces permission independently.
- Gemini CLI: configure an MCP server with
httpUrland a Bearer Authorization header. Consumer Gemini web is not a universal custom MCP client.
Setup recipes do not prove acceptance in every client account or plan. The client can require additional confirmations. No universal one-click installer is claimed.
3. Read and write correctly
Use crm_identity and crm_schema to discover your effective permissions and tools. Lead reference supports CRM ID, Supabase UUID, accounting ID or phone; supplied references must identify the same record. Use include_notes: true for permitted note context and follow every continuation cursor to read all pages.
Pages default to 50 and are limited to 100. Cursors are bound to the acting connection and filters and expire after one hour. Writes require a stable idempotency_key: reuse the same key and identical payload for a retry, and a new key for a new intended change. Use expected_version where supported to prevent overwriting concurrent edits. Write success can contain metadata only; perform a separately authorized read for record content.
Common workflows for AI agents
Start with crm_identity. Ask crm_schema for {"detail":"summary"} to choose a tool, then request its exact tool_name or a category such as leads, tasks, projects, team, mcp or options. MCP initialization also provides agent instructions. Tool discovery includes synthetic examples; never execute sample IDs as real work.
- Find a lead and all notes:
crm_leads_getaccepts an ID or phone. Usecrm_lead_contextwithinclude_notes: trueand notes.read permission; follow next_cursor until notes_complete is true. - Add a pipeline stage: read
crm_options, retain all existing pipelineStages entries, append the new custom entry, then callcrm_options_updatewith that full collection and a new idempotency key. Other omitted collections stay unchanged. Requires options.read to inspect and options.update to write. - Restore a deleted lead: inspect
crm_leads_deleted, identify the intended snapshot, then callcrm_leads_restorewith its decimal deleted_snapshot_id and a stable idempotency key. Requires deleted-read and restore permissions respectively. Restore recovers the saved lead, not its cascaded old activity timeline. - Add a member: use
crm_team_listfor existing membership;crm_team_invitecreates a pending sales/support invitation with explicit ordinary access_keys. It does not send email or move an existing account. The invitee signs in with that email; read the new member_id after joining. - Change CRM permissions: read the member and access_version using
crm_team_list, then send the complete desired access_keys and expected_access_version tocrm_team_access_update. New modules require the corresponding module read capability on the calling connection. This does not change role, activation or MCP grant. - Grant MCP access: read
crm_mcp_member_permissions, then givecrm_mcp_member_permissions_updatethe member_id, enabled flag, complete capabilities and expected_policy_version. Choose only returned grantable_capabilities. Disabling revokes all that member’s connections; re-enabling requires reconnecting. Their own client still requires their consent.
Owner/admin must explicitly enable team.read, team.invite, team.update, mcp.permissions.read or mcp.permissions.manage as needed in MCP Feature and approve them in the agent connection. Deployment never adds rights to existing policies or tokens. Agents cannot change themselves, owners/administrators or the workspace MCP master/ceiling. Pending invitees cannot receive MCP grants before joining.
Connection lifetime
Clients registered for refresh_token receive a consent-disclosed connection lasting up to 30 days and rotating refresh tokens, including clients that omit the OIDC offline_access scope. Access tokens last at most 15 minutes and must be refreshed by the client. Clients registering authorization_code only receive a short session. Existing access-only sessions require one reconnect after this improvement. Expiry and revocation are never bypassed.
Errors and revocation
Unauthorized connections must reconnect. Forbidden means the current role or grant denies the action. Conflicts require reading current state before retrying. Invalid cursors require a fresh search. Respect HTTP 429 Retry-After; retry temporary server failures with bounded backoff and unchanged write idempotency keys. Read tool-result isError and structured error code even when HTTP transport succeeds. Disabling workspace MCP or a member revokes the affected connections; enabling again does not revive revoked credentials.
Available tools and parameters
51 implemented tools below are generated from the running catalog. JSON Schema required lists compulsory fields; other properties are optional. Nested requirements, enums, defaults and limits are included. Team invitation, ordinary module access and member MCP delegation are available with separate administrator permissions. Team removal, role/activation changes and automation-management tools remain under development.
crm_identity · Read
Read the current CRM workspace/member and granted MCP capabilities. All operations are scoped to this identity.
Permission: identity.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
Example request
{}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}crm_schema · Read
Discover permitted tools and exact parameters with synthetic examples. Use category (e.g. leads, tasks, team, mcp, options) for one area, or tool_name for one exact tool. detail:summary returns a compact catalog; detail:full (default) includes required/optional parameter maps, enums, limits, descriptions and example. No-match returns an empty list; never assumes access. Read crm_options separately for actual workspace values.
Permission: identity.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
tool_name— Optional withinrequest. Exact tool name from the catalog.category— Optional withinrequest. Capability area, e.g. leads, tasks, projects, team, mcp, options.detail— Required withinrequest. summary for tool choice; full for exact input schemas and examples.
Example request
{
"category": "team",
"detail": "full"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"tool_name": {
"description": "Exact tool name from the catalog.",
"type": "string",
"maxLength": 100
},
"category": {
"description": "Capability area, e.g. leads, tasks, projects, team, mcp, options.",
"type": "string",
"maxLength": 50
},
"detail": {
"default": "full",
"description": "summary for tool choice; full for exact input schemas and examples.",
"type": "string",
"enum": [
"summary",
"full"
]
}
},
"required": [
"detail"
],
"additionalProperties": false
}crm_leads_list · Read
Search authorized leads/customers. Stable cursor pages default to 50, maximum 100. Inline note bodies are omitted; use crm_lead_context for history.
Permission: leads.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
filters— Optional withinrequest. Optional filters; inspect nested enums and date formats.filters.search— Optional withinfilters. Search text applied within the current workspace and visibility permissions.filters.source— Optional withinfilters. Lead acquisition/source label.filters.pipeline_option_id— Optional withinfilters. Configured option ID from crm_options.filters.pipeline_stage— Optional withinfilters. Configured stage value; read crm_options first.filters.interested_option_id— Optional withinfilters. Interest option ID from crm_options.filters.city_option_id— Optional withinfilters. City option ID from crm_options.filters.assignee_id— Optional withinfilters. Filter by a workspace assignee ID from current options; ordinary visibility still applies.filters.follow_up— Optional withinfilters. Filter follow-up status using the documented enum, such as overdue or today.filters.budget— Optional withinfilters. Named budget filter; choose an enum value in input_schema, not a currency amount.filters.start_date— Optional withinfilters. Inclusive Nepal calendar date YYYY-MM-DD.filters.end_date— Optional withinfilters. Inclusive Nepal calendar date YYYY-MM-DD; reporting range at most 366 days.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"filters": {
"search": "Example"
},
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"filters": {
"type": "object",
"properties": {
"search": {
"type": "string",
"maxLength": 200
},
"source": {
"type": "string",
"maxLength": 100
},
"pipeline_option_id": {
"type": "string",
"maxLength": 200
},
"pipeline_stage": {
"type": "string",
"enum": [
"fresh_enquiry",
"contacted",
"quotation_send",
"converted",
"lost"
]
},
"interested_option_id": {
"type": "string",
"maxLength": 200
},
"city_option_id": {
"type": "string",
"maxLength": 200
},
"assignee_id": {
"type": "string",
"maxLength": 200
},
"follow_up": {
"type": "string",
"enum": [
"all",
"overdue",
"today",
"upcoming",
"none"
]
},
"budget": {
"type": "string",
"enum": [
"all",
"none",
"under_25k",
"25k_50k",
"50k_100k",
"100k_plus"
]
},
"start_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"end_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
},
"additionalProperties": false
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
}crm_leads_get · Read
Get one authorized lead using any stable ID or mobile number. Supplied identifiers must agree. Notes and earnings require their separate read permissions.
Permission: leads.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
}
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
}
},
"required": [
"reference"
],
"additionalProperties": false
}crm_lead_context · Read
Read a lead and every accessible note via stable continuation. Set include_notes:true and follow next_cursor until notes_complete:true; notes are never silently capped at 200. Opt in to form_submissions and WhatsApp enquiries separately with include_form_submissions/include_whatsapp_enquiries; each has independent cursor/limit and requires notes.read.
Permission: leads.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.include_notes— Required withinrequest. Include permitted notes; follow continuations until notes_complete is true.include_form_submissions— Required withinrequest. Opt in to private form inquiry answers. Requires leads.read and notes.read. Separate pagination from notes; defaults false.form_submissions_cursor— Optional withinrequest. Opaque next_cursor from form_submissions; bound to this actor, workspace and lead. Never reuse note cursors.form_submissions_limit— Required withinrequest. Form inquiries per page, default20/max50. Follow form_submissions.next_cursor until has_more:false.include_whatsapp_enquiries— Required withinrequest. Opt in to private WordPress WhatsApp website enquiries. Requires leads.read and notes.read; independent whatsapp_enquiries_cursor/limit, default false.whatsapp_enquiries_cursor— Optional withinrequest. Opaque cursor from whatsapp_enquiries.next_cursor; do not reuse note/form cursors.whatsapp_enquiries_limit— Required withinrequest. WhatsApp enquiry page size, default 20, maximum 50.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"include_notes": true
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"include_notes": {
"default": false,
"type": "boolean"
},
"include_form_submissions": {
"default": false,
"type": "boolean"
},
"form_submissions_cursor": {
"type": "string",
"maxLength": 4000
},
"form_submissions_limit": {
"default": 20,
"type": "integer",
"minimum": 1,
"maximum": 50
},
"include_whatsapp_enquiries": {
"default": false,
"type": "boolean"
},
"whatsapp_enquiries_cursor": {
"type": "string",
"maxLength": 4000
},
"whatsapp_enquiries_limit": {
"default": 20,
"type": "integer",
"minimum": 1,
"maximum": 50
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"reference",
"include_notes",
"include_form_submissions",
"form_submissions_limit",
"include_whatsapp_enquiries",
"whatsapp_enquiries_limit"
],
"additionalProperties": false
}crm_lead_activities · Read
Read calls, messages, follow-ups and notes for an authorized lead, with stable continuation and sensitive earnings filtering.
Permission: notes.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"reference"
],
"additionalProperties": false
}crm_leads_create · Write
Create a lead with database-generated CRM, UUID and internal ACC identities. Optional source/stage/date/budget use safe defaults. Restricted members default to self-assignment. Additional assignment, notes, stage, follow-up or earnings fields require their own permissions.
Permission: leads.create
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.name— Required withinchanges. Lead or project name; follow the tool's length limits.changes.phone— Required withinchanges. Lead contact phone; normalized by the CRM.changes.email— Optional withinchanges. Email address; lead forms allow empty string to clear it, team invitations require a valid sign-in email.changes.business_name— Optional withinchanges. Lead's company or business name.changes.pan_vat_number— Optional withinchanges. Lead's business PAN/VAT identifier.changes.lead_date— Optional withinchanges. Lead creation/business date YYYY-MM-DD.changes.source— Optional withinchanges. Lead acquisition/source label.changes.expected_budget— Optional withinchanges. Non-negative expected lead budget in NPR.changes.earned_amount— Optional withinchanges. New non-negative earned TOTAL, not an increment. Financial permission is separately required.changes.pipeline_stage— Optional withinchanges. Configured stage value; read crm_options first.changes.pipeline_option_id— Optional withinchanges. Configured option ID from crm_options.changes.interested_option_id— Optional withinchanges. Interest option ID from crm_options.changes.city_option_id— Optional withinchanges. City option ID from crm_options.changes.assignee_ids— Optional withinchanges. Active member IDs from assignment options.changes.notes— Optional withinchanges. Inline lead note text; writing requires notes.create separately.changes.next_follow_up_at— Optional withinchanges. ISO date/time with offset, or Nepal local YYYY-MM-DDTHH:mm. Empty string clears it.idempotency_key— Required withinrequest. Generate one stable key per intended write and reuse it unchanged on retries.
Example request
{
"changes": {
"name": "Example lead",
"phone": "+12025550123"
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"changes": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 500
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 320,
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
{
"type": "string",
"const": ""
}
]
},
"business_name": {
"type": "string",
"maxLength": 500
},
"pan_vat_number": {
"type": "string",
"maxLength": 100
},
"lead_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"source": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"expected_budget": {
"type": "number",
"minimum": 0,
"maximum": 999999999999.99
},
"earned_amount": {
"type": "number",
"minimum": 0
},
"pipeline_stage": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"pipeline_option_id": {
"type": "string",
"maxLength": 200
},
"interested_option_id": {
"type": "string",
"maxLength": 200
},
"city_option_id": {
"type": "string",
"maxLength": 200
},
"assignee_ids": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 200
}
},
"notes": {
"type": "string",
"maxLength": 100000
},
"next_follow_up_at": {
"type": "string",
"maxLength": 40,
"description": "ISO date/time with offset, or Nepal local YYYY-MM-DDTHH:mm. Empty string clears it."
}
},
"required": [
"name",
"phone"
],
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Generate one stable key per intended write and reuse it unchanged on retries."
}
},
"required": [
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_leads_update · Write
Update explicit editable fields only. Stable identities/workspace cannot change. Financial, notes, assignment, stage and follow-up changes require their corresponding capabilities. Retry with identical payload and key.
Permission: leads.update
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.name— Optional withinchanges. Lead or project name; follow the tool's length limits.changes.phone— Optional withinchanges. Lead contact phone; normalized by the CRM.changes.email— Optional withinchanges. Email address; lead forms allow empty string to clear it, team invitations require a valid sign-in email.changes.business_name— Optional withinchanges. Lead's company or business name.changes.pan_vat_number— Optional withinchanges. Lead's business PAN/VAT identifier.changes.lead_date— Optional withinchanges. Lead creation/business date YYYY-MM-DD.changes.source— Optional withinchanges. Lead acquisition/source label.changes.expected_budget— Optional withinchanges. Non-negative expected lead budget in NPR.changes.earned_amount— Optional withinchanges. New non-negative earned TOTAL, not an increment. Financial permission is separately required.changes.pipeline_stage— Optional withinchanges. Configured stage value; read crm_options first.changes.pipeline_option_id— Optional withinchanges. Configured option ID from crm_options.changes.interested_option_id— Optional withinchanges. Interest option ID from crm_options.changes.city_option_id— Optional withinchanges. City option ID from crm_options.changes.assignee_ids— Optional withinchanges. Active member IDs from assignment options.changes.notes— Optional withinchanges. Inline lead note text; writing requires notes.create separately.changes.next_follow_up_at— Optional withinchanges. ISO date/time with offset, or Nepal local YYYY-MM-DDTHH:mm. Empty string clears it.idempotency_key— Required withinrequest. Generate one stable key per intended write and reuse it unchanged on retries.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"idempotency_key": "example-intended-change-001",
"changes": {
"business_name": "Example company"
}
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"changes": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 500
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 320,
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
{
"type": "string",
"const": ""
}
]
},
"business_name": {
"type": "string",
"maxLength": 500
},
"pan_vat_number": {
"type": "string",
"maxLength": 100
},
"lead_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"source": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"expected_budget": {
"type": "number",
"minimum": 0,
"maximum": 999999999999.99
},
"earned_amount": {
"type": "number",
"minimum": 0
},
"pipeline_stage": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"pipeline_option_id": {
"type": "string",
"maxLength": 200
},
"interested_option_id": {
"type": "string",
"maxLength": 200
},
"city_option_id": {
"type": "string",
"maxLength": 200
},
"assignee_ids": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 200
}
},
"notes": {
"type": "string",
"maxLength": 100000
},
"next_follow_up_at": {
"type": "string",
"maxLength": 40,
"description": "ISO date/time with offset, or Nepal local YYYY-MM-DDTHH:mm. Empty string clears it."
}
},
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Generate one stable key per intended write and reuse it unchanged on retries."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"reference",
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_leads_delete · Write · Admin
Delete an authorized lead. Owner/admin and explicit delete permission required. Existing audit snapshots support the separately granted restore operation.
Permission: leads.delete · Destructive action
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.idempotency_key— Required withinrequest. Generate one stable key per intended write and reuse it unchanged on retries.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Generate one stable key per intended write and reuse it unchanged on retries."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"reference",
"idempotency_key"
],
"additionalProperties": false
}crm_leads_assign · Write
Assign an authorized lead to configured workspace assignees. Foreign or inactive profiles are rejected.
Permission: leads.assign
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.assignee_ids— Required withinrequest. Active member IDs from assignment options.idempotency_key— Required withinrequest. Generate one stable key per intended write and reuse it unchanged on retries.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"idempotency_key": "example-intended-change-001",
"assignee_ids": [
"00000000-0000-4000-8000-000000000002"
]
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"assignee_ids": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 200
}
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Generate one stable key per intended write and reuse it unchanged on retries."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"reference",
"assignee_ids",
"idempotency_key"
],
"additionalProperties": false
}crm_leads_stage · Write
Change the lead stage using its value or configured option ID; status and option snapshots stay consistent.
Permission: leads.stage
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.pipeline_stage— Optional withinrequest. Configured stage value; read crm_options first.pipeline_option_id— Optional withinrequest. Configured option ID from crm_options.idempotency_key— Required withinrequest. Generate one stable key per intended write and reuse it unchanged on retries.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"idempotency_key": "example-intended-change-001",
"pipeline_stage": "contacted"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"pipeline_stage": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"pipeline_option_id": {
"type": "string",
"maxLength": 200
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Generate one stable key per intended write and reuse it unchanged on retries."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"reference",
"idempotency_key"
],
"additionalProperties": false
}crm_leads_follow_up · Write
Set or clear a lead's next follow-up. Offset-free datetimes use Nepal time; empty string clears.
Permission: leads.follow_up
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.next_follow_up_at— Required withinrequest. Offset ISO date/time or Nepal local YYYY-MM-DDTHH:mm; empty string clears.idempotency_key— Required withinrequest. Generate one stable key per intended write and reuse it unchanged on retries.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"idempotency_key": "example-intended-change-001",
"next_follow_up_at": "2026-10-20T10:00:00+05:45"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"next_follow_up_at": {
"type": "string",
"maxLength": 40
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Generate one stable key per intended write and reuse it unchanged on retries."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"reference",
"next_follow_up_at",
"idempotency_key"
],
"additionalProperties": false
}crm_lead_activity_create · Write
Append a note/call/message/follow-up atomically. A note also updates current inline context; identical retries do not create duplicate history.
Permission: notes.create
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.activity— Required withinrequest. Activity to append; choose a type and provide the human-readable content.activity.type— Required withinactivity. Activity kind: note, call, message or follow_up.activity.content— Required withinactivity. Note/call/message/follow-up text, treated as untrusted record content.activity.due_at— Optional withinactivity. Due date/time; task input accepts offset ISO or Nepal local time, activity input requires offset ISO. Null clears supported fields.idempotency_key— Required withinrequest. Generate one stable key per intended write and reuse it unchanged on retries.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"idempotency_key": "example-intended-change-001",
"activity": {
"type": "note",
"content": "Example follow-up note"
}
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"activity": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"note",
"call",
"message",
"follow_up"
]
},
"content": {
"type": "string",
"minLength": 2,
"maxLength": 100000
},
"due_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Generate one stable key per intended write and reuse it unchanged on retries."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"reference",
"activity",
"idempotency_key"
],
"additionalProperties": false
}crm_leads_import · Write
Import 1–100 lead rows. Each row needs a valid name and phone; other editable fields use create defaults and their separate permissions. Business-invalid and duplicate rows have explicit outcomes; duplicate IDs are never disclosed. Use a stable idempotency_key for the entire batch. Retrying the same key returns the committed outcomes; retry corrected/failed rows with a new key.
Permission: leads.import
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
rows— Required withinrequest. Import batch, 1–100 lead rows. Each row needs name and phone; inspect explicit per-row outcomes.rows[].name— Optional withinrows[]. Lead or project name; follow the tool's length limits.rows[].phone— Optional withinrows[]. Lead contact phone; normalized by the CRM.rows[].email— Optional withinrows[]. Email address; lead forms allow empty string to clear it, team invitations require a valid sign-in email.rows[].business_name— Optional withinrows[]. Lead's company or business name.rows[].pan_vat_number— Optional withinrows[]. Lead's business PAN/VAT identifier.rows[].lead_date— Optional withinrows[]. Lead creation/business date YYYY-MM-DD.rows[].source— Optional withinrows[]. Lead acquisition/source label.rows[].expected_budget— Optional withinrows[]. Non-negative expected lead budget in NPR.rows[].earned_amount— Optional withinrows[]. New non-negative earned TOTAL, not an increment. Financial permission is separately required.rows[].pipeline_stage— Optional withinrows[]. Configured stage value; read crm_options first.rows[].pipeline_option_id— Optional withinrows[]. Configured option ID from crm_options.rows[].interested_option_id— Optional withinrows[]. Interest option ID from crm_options.rows[].city_option_id— Optional withinrows[]. City option ID from crm_options.rows[].assignee_ids— Optional withinrows[]. Active member IDs from assignment options.rows[].notes— Optional withinrows[]. Inline lead note text; writing requires notes.create separately.rows[].next_follow_up_at— Optional withinrows[]. ISO date/time with offset, or Nepal local YYYY-MM-DDTHH:mm. Empty string clears it.idempotency_key— Required withinrequest. Stable unique key for one intended write; exact same key/payload on retry.
Example request
{
"rows": [
{
"name": "Example lead",
"phone": "+12025550123"
}
],
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"rows": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 500
},
"phone": {
"type": "string",
"maxLength": 50
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 320,
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
{
"type": "string",
"const": ""
}
]
},
"business_name": {
"type": "string",
"maxLength": 500
},
"pan_vat_number": {
"type": "string",
"maxLength": 100
},
"lead_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"source": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"expected_budget": {
"type": "number",
"minimum": 0,
"maximum": 999999999999.99
},
"earned_amount": {
"type": "number",
"minimum": 0
},
"pipeline_stage": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"pipeline_option_id": {
"type": "string",
"maxLength": 200
},
"interested_option_id": {
"type": "string",
"maxLength": 200
},
"city_option_id": {
"type": "string",
"maxLength": 200
},
"assignee_ids": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 200
}
},
"notes": {
"type": "string",
"maxLength": 100000
},
"next_follow_up_at": {
"type": "string",
"maxLength": 40,
"description": "ISO date/time with offset, or Nepal local YYYY-MM-DDTHH:mm. Empty string clears it."
}
},
"additionalProperties": false
}
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"rows",
"idempotency_key"
],
"additionalProperties": false
}crm_leads_export · Read
Export authorized leads as bounded JSON pages, not an unbounded CSV download. Follow next_cursor until has_more:false. Notes and earnings are included only with their separate read permissions. This operation requires export consent; ordinary lead-read consent alone does not enable export.
Permission: leads.export
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
filters— Optional withinrequest. Optional filters; inspect nested enums and date formats.filters.search— Optional withinfilters. Search text applied within the current workspace and visibility permissions.filters.source— Optional withinfilters. Lead acquisition/source label.filters.pipeline_option_id— Optional withinfilters. Configured option ID from crm_options.filters.pipeline_stage— Optional withinfilters. Configured stage value; read crm_options first.filters.interested_option_id— Optional withinfilters. Interest option ID from crm_options.filters.city_option_id— Optional withinfilters. City option ID from crm_options.filters.assignee_id— Optional withinfilters. Filter by a workspace assignee ID from current options; ordinary visibility still applies.filters.follow_up— Optional withinfilters. Filter follow-up status using the documented enum, such as overdue or today.filters.budget— Optional withinfilters. Named budget filter; choose an enum value in input_schema, not a currency amount.filters.start_date— Optional withinfilters. Inclusive Nepal calendar date YYYY-MM-DD.filters.end_date— Optional withinfilters. Inclusive Nepal calendar date YYYY-MM-DD; reporting range at most 366 days.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"filters": {
"type": "object",
"properties": {
"search": {
"type": "string",
"maxLength": 200
},
"source": {
"type": "string",
"maxLength": 100
},
"pipeline_option_id": {
"type": "string",
"maxLength": 200
},
"pipeline_stage": {
"type": "string",
"enum": [
"fresh_enquiry",
"contacted",
"quotation_send",
"converted",
"lost"
]
},
"interested_option_id": {
"type": "string",
"maxLength": 200
},
"city_option_id": {
"type": "string",
"maxLength": 200
},
"assignee_id": {
"type": "string",
"maxLength": 200
},
"follow_up": {
"type": "string",
"enum": [
"all",
"overdue",
"today",
"upcoming",
"none"
]
},
"budget": {
"type": "string",
"enum": [
"all",
"none",
"under_25k",
"25k_50k",
"50k_100k",
"100k_plus"
]
},
"start_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"end_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
},
"additionalProperties": false
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
}crm_leads_deleted · Read · Admin
List workspace deletion history with stable pagination. Owner/admin and explicit deleted-read consent required. Default returns metadata and snapshot IDs; include_snapshot:true adds allowlisted saved lead fields with separate notes/revenue gates. A history entry may already have been restored. Restore recovers the saved lead record, not its cascaded old activity timeline.
Permission: leads.deleted_read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.include_snapshot— Required withinrequest. Include allowlisted saved deleted-lead fields; notes and earnings need their separate read grants.
Example request
{
"limit": 25,
"include_snapshot": false
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"include_snapshot": {
"default": false,
"type": "boolean"
}
},
"required": [
"include_snapshot"
],
"additionalProperties": false
}crm_leads_restore · Write · Admin
Restore a workspace delete snapshot by deleted_snapshot_id or the latest deletion matching a CRM/UUID/ACC/mobile reference. Supply exactly one selector; multiple identifiers in a reference must agree. Preserves original identities and current revenue-trigger semantics. Owner/admin and restore consent required, with a stable retry key. Restores the lead snapshot, not its cascaded old activity history.
Permission: leads.restore
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
deleted_snapshot_id— Optional withinrequest. Numeric deletion-history audit ID, represented as a decimal string.reference— Optional withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.idempotency_key— Required withinrequest. Stable unique key for one intended write; exact same key/payload on retry.
Example request
{
"deleted_snapshot_id": "123",
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"deleted_snapshot_id": {
"type": "string",
"pattern": "^[0-9]{1,19}$",
"description": "Numeric deletion-history audit ID, represented as a decimal string."
},
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"idempotency_key"
],
"additionalProperties": false
}crm_revenue_read · Read
Read current earned total and the dated revenue-adjustment ledger for an authorized lead. Requires financial read consent and ordinary earnings/lead access. Returns financial fields only, with stable default50/max100 pages; negative deltas represent corrections/refunds.
Permission: revenue.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"reference"
],
"additionalProperties": false
}crm_revenue_update · Write
Set a lead's non-negative earned total using any supported ID/mobile reference. Existing revenue trigger records the adjustment delta once. Only financial update consent is required for this dedicated mutation; full lead readback separately requires leads.read. Other lead fields remain unchanged. Use the same key/payload on retry, and optional expected_version to reject concurrent edits.
Permission: revenue.update
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
reference— Required withinrequest. Any one CRM ID, Supabase UUID, ACC ID or phone. Multiple identifiers must agree.reference.crm_id— Optional withinreference. Stable CRM- followed by 12 digits; obtain from lead read/create output.reference.supabase_id— Optional withinreference. Lead's underlying Supabase UUID; obtain from lead read/create output.reference.accounting_id— Optional withinreference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.reference.phone— Optional withinreference. Lead contact phone; normalized by the CRM.earned_amount— Required withinrequest. New non-negative earned TOTAL, not an increment. Financial permission is separately required.idempotency_key— Required withinrequest. Stable unique key for one intended write; exact same key/payload on retry.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"reference": {
"crm_id": "CRM-000000000001"
},
"idempotency_key": "example-intended-change-001",
"earned_amount": 20000
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"earned_amount": {
"type": "number",
"minimum": 0
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"reference",
"earned_amount",
"idempotency_key"
],
"additionalProperties": false
}crm_tasks_list · Read
List workspace tasks with scope and status filters. Default scope mine, default page50/max100; follow next_cursor.
Permission: tasks.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
filters— Optional withinrequest. Optional filters; inspect nested enums and date formats.filters.scope— Optional withinfilters. Task-list scope: mine, created or all; ordinary member access remains enforced.filters.status— Optional withinfilters. Task/project status or status filter; choose this tool's documented enum.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"filters": {
"scope": "mine",
"status": "open"
},
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"filters": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": [
"mine",
"created",
"all"
]
},
"status": {
"type": "string",
"enum": [
"all",
"open",
"in_progress",
"done"
]
}
},
"additionalProperties": false
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
}crm_tasks_get · Read
Read a task in the current workspace by task UUID.
Permission: tasks.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.
Example request
{
"id": "00000000-0000-4000-8000-000000000002"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"id"
],
"additionalProperties": false
}crm_tasks_create · Write
Create an open task assigned to an active workspace member. Optional lead reference accepts CRM/UUID/ACC/mobile and must be accessible. due_at accepts offset ISO or Nepal local time; notification is durably queued.
Permission: tasks.create
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.title— Required withinchanges. Task title.changes.description— Optional withinchanges. Task or project description; omitted means unchanged on update.changes.assigned_to— Required withinchanges. Active workspace member UUID.changes.priority— Optional withinchanges. Task/project priority: low, medium or high.changes.due_at— Optional withinchanges. Due date/time; task input accepts offset ISO or Nepal local time, activity input requires offset ISO. Null clears supported fields.changes.lead_id— Optional withinchanges. Linked lead Supabase UUID; null clears a supported link. Use lead_reference for CRM/ACC/phone lookup instead.changes.lead_reference— Optional withinchanges. Accessible lead by CRM ID, Supabase UUID, ACC ID or phone; do not also supply a conflicting lead_id.changes.lead_reference.crm_id— Optional withinchanges.lead_reference. Stable CRM- followed by 12 digits; obtain from lead read/create output.changes.lead_reference.supabase_id— Optional withinchanges.lead_reference. Lead's underlying Supabase UUID; obtain from lead read/create output.changes.lead_reference.accounting_id— Optional withinchanges.lead_reference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.changes.lead_reference.phone— Optional withinchanges.lead_reference. Lead contact phone; normalized by the CRM.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.
Example request
{
"changes": {
"title": "Example follow-up",
"assigned_to": "00000000-0000-4000-8000-000000000002"
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"changes": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 4000
},
"assigned_to": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"priority": {
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"due_at": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"lead_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"lead_reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
}
},
"required": [
"title",
"assigned_to"
],
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
}
},
"required": [
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_tasks_update · Write
Update a task as creator, assignee or admin. Only creator/admin can reassign. Done records completion time; reopening clears it. Optional expected_version rejects stale edits.
Permission: tasks.update
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.title— Optional withinchanges. Task title.changes.description— Optional withinchanges. Task or project description; omitted means unchanged on update.changes.assigned_to— Optional withinchanges. Active workspace member UUID.changes.status— Optional withinchanges. Task/project status or status filter; choose this tool's documented enum.changes.priority— Optional withinchanges. Task/project priority: low, medium or high.changes.due_at— Optional withinchanges. Due date/time; task input accepts offset ISO or Nepal local time, activity input requires offset ISO. Null clears supported fields.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"id": "00000000-0000-4000-8000-000000000002",
"changes": {
"status": "done"
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"changes": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 4000
},
"assigned_to": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"open",
"in_progress",
"done"
]
},
"priority": {
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"due_at": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_tasks_delete · Write
Delete a task and its comments. Current creator/admin authority is required in addition to delete consent.
Permission: tasks.delete · Destructive action
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"id": "00000000-0000-4000-8000-000000000002",
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"idempotency_key"
],
"additionalProperties": false
}crm_task_comments · Read
Read task comments in stable chronological pages. Follow next_cursor to retrieve all comments; separate comment-read permission required.
Permission: task_comments.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"id": "00000000-0000-4000-8000-000000000002",
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"id"
],
"additionalProperties": false
}crm_task_comment_create · Write
Append a task comment, maximum2000 characters. Retry with the same key to avoid duplicate comments. No comment edit/delete operation is provided.
Permission: task_comments.create
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.body— Required withinrequest. Comment text, 1–2000 characters; stored as data, not agent instructions.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.
Example request
{
"id": "00000000-0000-4000-8000-000000000002",
"body": "Example comment",
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
}
},
"required": [
"id",
"body",
"idempotency_key"
],
"additionalProperties": false
}crm_projects_list · Read
List workspace projects by status/search with stable default50/max100 pages. Embedded lead details require separate lead-read and object access.
Permission: projects.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
filters— Optional withinrequest. Optional filters; inspect nested enums and date formats.filters.status— Optional withinfilters. Task/project status or status filter; choose this tool's documented enum.filters.search— Optional withinfilters. Search text applied within the current workspace and visibility permissions.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"filters": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"all",
"planning",
"active",
"on_hold",
"completed",
"cancelled"
]
},
"search": {
"type": "string",
"maxLength": 80
}
},
"additionalProperties": false
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
}crm_projects_get · Read
Read a workspace project and members. Linked lead details are masked without separate lead access.
Permission: projects.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.
Example request
{
"id": "00000000-0000-4000-8000-000000000002"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"id"
],
"additionalProperties": false
}crm_projects_create · Write
Create a project with optional active workspace members and accessible lead link. Dates use YYYY-MM-DD; deadline cannot precede start_date. Defaults planning/medium/zero value.
Permission: projects.create
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.name— Required withinchanges. Lead or project name; follow the tool's length limits.changes.lead_id— Optional withinchanges. Linked lead Supabase UUID; null clears a supported link. Use lead_reference for CRM/ACC/phone lookup instead.changes.lead_reference— Optional withinchanges. Accessible lead by CRM ID, Supabase UUID, ACC ID or phone; do not also supply a conflicting lead_id.changes.lead_reference.crm_id— Optional withinchanges.lead_reference. Stable CRM- followed by 12 digits; obtain from lead read/create output.changes.lead_reference.supabase_id— Optional withinchanges.lead_reference. Lead's underlying Supabase UUID; obtain from lead read/create output.changes.lead_reference.accounting_id— Optional withinchanges.lead_reference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.changes.lead_reference.phone— Optional withinchanges.lead_reference. Lead contact phone; normalized by the CRM.changes.project_type— Optional withinchanges. Optional project classification text.changes.status— Optional withinchanges. Task/project status or status filter; choose this tool's documented enum.changes.priority— Optional withinchanges. Task/project priority: low, medium or high.changes.start_date— Optional withinchanges. Inclusive Nepal calendar date YYYY-MM-DD.changes.deadline— Optional withinchanges. Project deadline date YYYY-MM-DD; null clears it. Cannot precede start_date.changes.description— Optional withinchanges. Task or project description; omitted means unchanged on update.changes.expected_value— Optional withinchanges. Non-negative expected project value in NPR.changes.team_member_ids— Optional withinchanges. Active workspace member UUIDs attached to a project; update replaces the supplied list.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.
Example request
{
"changes": {
"name": "Example project"
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"changes": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"lead_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"lead_reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"project_type": {
"type": "string",
"maxLength": 120
},
"status": {
"type": "string",
"enum": [
"planning",
"active",
"on_hold",
"completed",
"cancelled"
]
},
"priority": {
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"start_date": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "null"
}
]
},
"deadline": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "null"
}
]
},
"description": {
"type": "string",
"maxLength": 8000
},
"expected_value": {
"type": "number",
"minimum": 0,
"maximum": 999999999999.99
},
"team_member_ids": {
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": [
"name"
],
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
}
},
"required": [
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_projects_update · Write
Patch project fields while retaining omitted values and members. Set lead_id:null to clear a link. Optional expected_version prevents stale overwrites.
Permission: projects.update
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.name— Optional withinchanges. Lead or project name; follow the tool's length limits.changes.lead_id— Optional withinchanges. Linked lead Supabase UUID; null clears a supported link. Use lead_reference for CRM/ACC/phone lookup instead.changes.lead_reference— Optional withinchanges. Accessible lead by CRM ID, Supabase UUID, ACC ID or phone; do not also supply a conflicting lead_id.changes.lead_reference.crm_id— Optional withinchanges.lead_reference. Stable CRM- followed by 12 digits; obtain from lead read/create output.changes.lead_reference.supabase_id— Optional withinchanges.lead_reference. Lead's underlying Supabase UUID; obtain from lead read/create output.changes.lead_reference.accounting_id— Optional withinchanges.lead_reference. Stable internal ACC- followed by 12 digits; separate from any future external accounting customer ID.changes.lead_reference.phone— Optional withinchanges.lead_reference. Lead contact phone; normalized by the CRM.changes.project_type— Optional withinchanges. Optional project classification text.changes.status— Optional withinchanges. Task/project status or status filter; choose this tool's documented enum.changes.priority— Optional withinchanges. Task/project priority: low, medium or high.changes.start_date— Optional withinchanges. Inclusive Nepal calendar date YYYY-MM-DD.changes.deadline— Optional withinchanges. Project deadline date YYYY-MM-DD; null clears it. Cannot precede start_date.changes.description— Optional withinchanges. Task or project description; omitted means unchanged on update.changes.expected_value— Optional withinchanges. Non-negative expected project value in NPR.changes.team_member_ids— Optional withinchanges. Active workspace member UUIDs attached to a project; update replaces the supplied list.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"id": "00000000-0000-4000-8000-000000000002",
"changes": {
"description": "Example project description"
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"changes": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"lead_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"lead_reference": {
"anyOf": [
{
"type": "string",
"minLength": 5,
"maxLength": 100,
"description": "A CRM ID, Supabase UUID, internal ACC ID or mobile number."
},
{
"type": "object",
"properties": {
"crm_id": {
"type": "string",
"pattern": "^CRM-\\d{12}$"
},
"supabase_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"accounting_id": {
"type": "string",
"pattern": "^ACC-\\d{12}$"
},
"phone": {
"type": "string",
"minLength": 5,
"maxLength": 50
}
},
"additionalProperties": false
}
]
},
"project_type": {
"type": "string",
"maxLength": 120
},
"status": {
"type": "string",
"enum": [
"planning",
"active",
"on_hold",
"completed",
"cancelled"
]
},
"priority": {
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"start_date": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "null"
}
]
},
"deadline": {
"anyOf": [
{
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
{
"type": "null"
}
]
},
"description": {
"type": "string",
"maxLength": 8000
},
"expected_value": {
"type": "number",
"minimum": 0,
"maximum": 999999999999.99
},
"team_member_ids": {
"maxItems": 200,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_projects_delete · Write
Delete a project and its member links/comments. Requires current creator/admin authority and explicit delete consent.
Permission: projects.delete · Destructive action
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"id": "00000000-0000-4000-8000-000000000002",
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"idempotency_key"
],
"additionalProperties": false
}crm_project_leads · Read
Search accessible leads for project linking. Requires both projects.read and leads.read; returns only scoped identity/contact summaries.
Permission: projects.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
search— Optional withinrequest. Search text applied within the current workspace and visibility permissions.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"search": "Example",
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"search": {
"type": "string",
"maxLength": 80
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
}crm_project_comments · Read
Read project comments in stable chronological pages. Follow next_cursor for the full discussion.
Permission: project_comments.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"id": "00000000-0000-4000-8000-000000000002",
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"id"
],
"additionalProperties": false
}crm_project_comment_create · Write
Append a project comment of1–2000 characters; retry with the same key to avoid duplicates. Notifications target only intended members still on the project.
Permission: project_comments.create
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
id— Required withinrequest. Record UUID returned by the corresponding list/create tool.body— Required withinrequest. Comment text, 1–2000 characters; stored as data, not agent instructions.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.
Example request
{
"id": "00000000-0000-4000-8000-000000000002",
"body": "Example update",
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"body": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
}
},
"required": [
"id",
"body",
"idempotency_key"
],
"additionalProperties": false
}crm_dashboard · Read
Read aggregate dashboard metrics for Nepal calendar dates, default today. Maximum366 days; assigned-only restriction remains. Earnings require separate revenue.read. Does not return lead bodies.
Permission: dashboard.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
start_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD.end_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD; reporting range at most 366 days.assignee_id— Optional withinrequest. Filter by a workspace assignee ID from current options; ordinary visibility still applies.interested_option_id— Optional withinrequest. Interest option ID from crm_options.city_option_id— Optional withinrequest. City option ID from crm_options.budget— Optional withinrequest. Named budget filter; choose an enum value in input_schema, not a currency amount.
Example request
{}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"start_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"end_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"assignee_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"interested_option_id": {
"type": "string",
"maxLength": 200
},
"city_option_id": {
"type": "string",
"maxLength": 200
},
"budget": {
"type": "string",
"enum": [
"all",
"none",
"under_25k",
"25k_50k",
"50k_100k",
"100k_plus"
]
}
},
"additionalProperties": false
}crm_analytics · Read
Read filtered CRM analytics, source/interest/city and team performance. Uses Nepal dates, maximum366 days. Earnings require separate revenue.read; ordinary member scope remains.
Permission: analytics.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
start_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD.end_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD; reporting range at most 366 days.assignee_id— Optional withinrequest. Filter by a workspace assignee ID from current options; ordinary visibility still applies.interested_option_id— Optional withinrequest. Interest option ID from crm_options.city_option_id— Optional withinrequest. City option ID from crm_options.budget— Optional withinrequest. Named budget filter; choose an enum value in input_schema, not a currency amount.
Example request
{
"start_date": "2026-10-01",
"end_date": "2026-10-16"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"start_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"end_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"assignee_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"interested_option_id": {
"type": "string",
"maxLength": 200
},
"city_option_id": {
"type": "string",
"maxLength": 200
},
"budget": {
"type": "string",
"enum": [
"all",
"none",
"under_25k",
"25k_50k",
"50k_100k",
"100k_plus"
]
}
},
"additionalProperties": false
}crm_team_performance · Read
Read sales and completed-task counts for the selected Nepal date/member filters. Completion date is independent of lead creation date. Earnings require separate revenue.read.
Permission: team_performance.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
start_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD.end_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD; reporting range at most 366 days.assignee_id— Optional withinrequest. Filter by a workspace assignee ID from current options; ordinary visibility still applies.interested_option_id— Optional withinrequest. Interest option ID from crm_options.city_option_id— Optional withinrequest. City option ID from crm_options.budget— Optional withinrequest. Named budget filter; choose an enum value in input_schema, not a currency amount.
Example request
{
"start_date": "2026-10-01",
"end_date": "2026-10-16"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"start_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"end_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"assignee_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"interested_option_id": {
"type": "string",
"maxLength": 200
},
"city_option_id": {
"type": "string",
"maxLength": 200
},
"budget": {
"type": "string",
"enum": [
"all",
"none",
"under_25k",
"25k_50k",
"50k_100k",
"100k_plus"
]
}
},
"additionalProperties": false
}crm_usage · Read
Read bounded daily usage counters; members see their own counters and admins see workspace counters. Default today, maximum366 days; follow next_cursor.
Permission: usage.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
start_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD.end_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD; reporting range at most 366 days.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"start_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"end_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
}crm_plan · Read
Read current workspace plan limits, consumption and expiry/block state. Does not permit plan or billing changes.
Permission: plan.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
Example request
{}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}crm_audit · Read · Admin
Read safe workspace business audit metadata for Nepal dates, default today. Historical payloads, credentials and automation configuration are omitted. Admin and audit consent required; follow next_cursor.
Permission: audit.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
start_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD.end_date— Optional withinrequest. Inclusive Nepal calendar date YYYY-MM-DD; reporting range at most 366 days.cursor— Optional withinrequest. Opaque next_cursor from the preceding page; keep original filters unchanged.limit— Optional withinrequest. Page size: default 50, maximum 100.
Example request
{
"limit": 25
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"start_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"end_date": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"cursor": {
"type": "string",
"maxLength": 4096
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"additionalProperties": false
}crm_workspace_profile · Read
Read workspace business profile. Requires Settings access and explicit profile-read consent.
Permission: workspace.profile.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
Example request
{}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}crm_workspace_profile_update · Write
Patch business profile fields; omitted values remain. Settings access and profile-update consent required. Returns mutation metadata; read profile separately with read consent.
Permission: workspace.profile.update
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.company_name— Optional withinchanges. Workspace business name.changes.company_address— Optional withinchanges. Workspace business postal address.changes.company_pan_vat— Optional withinchanges. Workspace PAN/VAT identifier.changes.company_phone— Optional withinchanges. Workspace contact phone.changes.company_email— Optional withinchanges. Workspace contact email; empty string clears it.changes.company_website— Optional withinchanges. Workspace website URL; empty string clears it.changes.business_info— Optional withinchanges. Workspace business description.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"changes": {
"company_name": "Example company"
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"changes": {
"type": "object",
"properties": {
"company_name": {
"type": "string",
"maxLength": 500
},
"company_address": {
"type": "string",
"maxLength": 2000
},
"company_pan_vat": {
"type": "string",
"maxLength": 100
},
"company_phone": {
"type": "string",
"maxLength": 50
},
"company_email": {
"anyOf": [
{
"type": "string",
"maxLength": 320,
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
{
"type": "string",
"const": ""
}
]
},
"company_website": {
"anyOf": [
{
"type": "string",
"maxLength": 2048,
"format": "uri"
},
{
"type": "string",
"const": ""
}
]
},
"business_info": {
"type": "string",
"maxLength": 16000
}
},
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_workspace_settings · Read · Admin
Read only-assigned-leads workspace setting. Owner-only, matching the existing workspace-settings API.
Permission: workspace.settings.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
Example request
{}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}crm_workspace_settings_update · Write · Admin
Owner-only update of ordinary lead-assignment visibility. Cannot change MCP policy, member grants or connection consent. Returns mutation metadata.
Permission: workspace.settings.update
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.only_assigned_leads— Required withinchanges. Restrict ordinary members to their assigned leads. Workspace setting changes are owner-only.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"changes": {
"only_assigned_leads": true
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"changes": {
"type": "object",
"properties": {
"only_assigned_leads": {
"type": "boolean"
}
},
"required": [
"only_assigned_leads"
],
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_options · Read
Read current statuses, pipeline stages, interests, cities and active-member assignment options. Option IDs and labels match current CRM validators.
Permission: options.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
Example request
{}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}crm_options_update · Write
A member with Settings access and option-update consent updates selected option collections using existing CRM normalization. Omitted collections remain. Active assignees are derived from team membership and cannot be edited here. Existing default entries are retained; custom entries may be added/removed. Returns mutation metadata; read options separately.
Permission: options.update
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
changes— Required withinrequest. Fields to change; omitted fields remain, except selected option collections are replaced.changes.statuses— Optional withinchanges. Complete replacement of CRM status options; preserve entries that should remain.changes.statuses[].id— Optional withinchanges.statuses[]. Option ID from crm_options. Retain IDs on existing entries; new custom entries may omit an ID.changes.statuses[].label— Required withinchanges.statuses[]. User-visible option label.changes.statuses[].value— Optional withinchanges.statuses[]. Stored option value used by lead stage/status validators; preserve existing values when retaining an option.changes.statuses[].isDefault— Optional withinchanges.statuses[]. Marks a built-in option; existing defaults are retained by normalization. Custom entries normally omit this.changes.pipelineStages— Optional withinchanges. Complete replacement of pipeline stages. Read crm_options, keep existing entries, then append/edit intended custom entries.changes.pipelineStages[].id— Optional withinchanges.pipelineStages[]. Option ID from crm_options. Retain IDs on existing entries; new custom entries may omit an ID.changes.pipelineStages[].label— Required withinchanges.pipelineStages[]. User-visible option label.changes.pipelineStages[].value— Optional withinchanges.pipelineStages[]. Stored option value used by lead stage/status validators; preserve existing values when retaining an option.changes.pipelineStages[].isDefault— Optional withinchanges.pipelineStages[]. Marks a built-in option; existing defaults are retained by normalization. Custom entries normally omit this.changes.interestedOptions— Optional withinchanges. Complete replacement of interest options; preserve entries that should remain.changes.interestedOptions[].id— Optional withinchanges.interestedOptions[]. Option ID from crm_options. Retain IDs on existing entries; new custom entries may omit an ID.changes.interestedOptions[].label— Required withinchanges.interestedOptions[]. User-visible option label.changes.interestedOptions[].value— Optional withinchanges.interestedOptions[]. Stored option value used by lead stage/status validators; preserve existing values when retaining an option.changes.interestedOptions[].isDefault— Optional withinchanges.interestedOptions[]. Marks a built-in option; existing defaults are retained by normalization. Custom entries normally omit this.changes.cityOptions— Optional withinchanges. Complete replacement of the selected city-options collection; retain entries that should remain.changes.cityOptions[].id— Optional withinchanges.cityOptions[]. Option ID from crm_options. Retain IDs on existing entries; new custom entries may omit an ID.changes.cityOptions[].label— Required withinchanges.cityOptions[]. User-visible option label.changes.cityOptions[].value— Optional withinchanges.cityOptions[]. Stored option value used by lead stage/status validators; preserve existing values when retaining an option.changes.cityOptions[].isDefault— Optional withinchanges.cityOptions[]. Marks a built-in option; existing defaults are retained by normalization. Custom entries normally omit this.idempotency_key— Required withinrequest. Reuse the same key and payload when retrying this write.expected_version— Optional withinrequest. Current record timestamp from a read; rejects stale writes.
Example request
{
"changes": {
"pipelineStages": [
{
"id": "example-custom-stage",
"label": "Example custom stage",
"value": "example_custom_stage"
}
]
},
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"changes": {
"type": "object",
"properties": {
"statuses": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 200
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"value": {
"type": "string",
"maxLength": 200
},
"isDefault": {
"type": "boolean"
}
},
"required": [
"label"
],
"additionalProperties": false
}
},
"pipelineStages": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 200
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"value": {
"type": "string",
"maxLength": 200
},
"isDefault": {
"type": "boolean"
}
},
"required": [
"label"
],
"additionalProperties": false
}
},
"interestedOptions": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 200
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"value": {
"type": "string",
"maxLength": 200
},
"isDefault": {
"type": "boolean"
}
},
"required": [
"label"
],
"additionalProperties": false
}
},
"cityOptions": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 200
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"value": {
"type": "string",
"maxLength": 200
},
"isDefault": {
"type": "boolean"
}
},
"required": [
"label"
],
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Reuse the same key and payload when retrying this write."
},
"expected_version": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"changes",
"idempotency_key"
],
"additionalProperties": false
}crm_team_list · Read · Admin
List workspace members and pending invitations in combined 50-row pages with next_offset. Returns member_id, ordinary access_keys and access_version for access updates. Use exact email to resolve a member before changing access. Does not include MCP grants; use crm_mcp_member_permissions with separate permission. Invitation records mean sign-in is allowed, not that email was sent.
Permission: team.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
email— Optional withinrequest. Optional exact email within this workspace; never a global account lookup.page_offset— Optional withinrequest. Start at 0; follow returned next_offset. Each page contains at most 50 members.
Example request
{
"email": "member@example.test"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"email": {
"description": "Optional exact email within this workspace; never a global account lookup.",
"type": "string",
"maxLength": 320,
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"page_offset": {
"description": "Start at 0; follow returned next_offset. Each page contains at most 50 members.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
}
},
"additionalProperties": false
}crm_team_invite · Write · Admin
Add a pending sales/support invitation with explicit ordinary module access. Requires team.invite and relevant module read capabilities for requested modules; checks plan seats and blocks existing accounts/invitations. No cross-workspace account transfer, password creation or email delivery. Member must sign in with this email to obtain a member_id; only then separately grant MCP access. Returns pending status, email_delivery:not_sent and next step. Retries with the same key/payload do not add another invitation.
Permission: team.invite
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
email— Required withinrequest. New member's sign-in email.full_name— Required withinrequest. Display name for the pending invitation.role— Required withinrequest. Ordinary CRM role; cannot create owner/admin.access_keys— Required withinrequest. Versioned feature access. Human-only Lead Source/Marketing/Inbox fields are preserved on unrelated edits; new Settings/MCP authority needs additional approved management capabilities. only_assigned_leads restricts lead visibility; it does not grant a module.idempotency_key— Required withinrequest. Unique key for this intended change. Reuse exactly the same key and payload only when retrying it.
Example request
{
"email": "new@example.test",
"full_name": "Example member",
"role": "support",
"access_keys": [
"leads",
"tasks"
],
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"email": {
"type": "string",
"maxLength": 320,
"format": "email",
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"description": "New member's sign-in email."
},
"full_name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Display name for the pending invitation."
},
"role": {
"type": "string",
"enum": [
"sales",
"support"
],
"description": "Ordinary CRM role; cannot create owner/admin."
},
"access_keys": {
"maxItems": 15,
"type": "array",
"items": {
"type": "string",
"enum": [
"dashboard",
"leads",
"customers",
"analytics",
"automation",
"lead_sources",
"campaigns",
"marketing",
"inbox",
"mcp",
"settings",
"tasks",
"projects",
"earnings",
"only_assigned_leads"
]
},
"description": "Versioned feature access. Human-only Lead Source/Marketing/Inbox fields are preserved on unrelated edits; new Settings/MCP authority needs additional approved management capabilities. only_assigned_leads restricts lead visibility; it does not grant a module."
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Unique key for this intended change. Reuse exactly the same key and payload only when retrying it."
}
},
"required": [
"email",
"full_name",
"role",
"access_keys",
"idempotency_key"
],
"additionalProperties": false
}crm_team_access_update · Write · Admin
Replace another ordinary active member's CRM module access. First read crm_team_list for member_id and access_version. New modules require their corresponding read capability on this connection; removing modules is permitted. Removing only_assigned_leads requires leads.read and read authority for every retained module because it also broadens reports. Does not change role, activation, MCP grant or workspace policy. Protected feature fields are preserved unless the connection has their explicit management ceiling; reductions constrain the member's next MCP call. Returns metadata and new access_version. Use a new key after resolving a version conflict.
Permission: team.update · Destructive action
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
member_id— Required withinrequest. Existing active sales/support member UUID from crm_team_list. Cannot target yourself, owner, administrator or another workspace.access_keys— Required withinrequest. Versioned feature access. Human-only Lead Source/Marketing/Inbox fields are preserved on unrelated edits; new Settings/MCP authority needs additional approved management capabilities. only_assigned_leads restricts lead visibility; it does not grant a module.expected_access_version— Required withinrequest. Exact decimal string returned by the corresponding read tool. On conflict, re-read and use a new idempotency key for a revised change.idempotency_key— Required withinrequest. Unique key for this intended change. Reuse exactly the same key and payload only when retrying it.
Example request
{
"member_id": "00000000-0000-4000-8000-000000000002",
"access_keys": [
"leads",
"tasks",
"only_assigned_leads"
],
"expected_access_version": "123",
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"member_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Existing active sales/support member UUID from crm_team_list. Cannot target yourself, owner, administrator or another workspace."
},
"access_keys": {
"maxItems": 15,
"type": "array",
"items": {
"type": "string",
"enum": [
"dashboard",
"leads",
"customers",
"analytics",
"automation",
"lead_sources",
"campaigns",
"marketing",
"inbox",
"mcp",
"settings",
"tasks",
"projects",
"earnings",
"only_assigned_leads"
]
},
"description": "Versioned feature access. Human-only Lead Source/Marketing/Inbox fields are preserved on unrelated edits; new Settings/MCP authority needs additional approved management capabilities. only_assigned_leads restricts lead visibility; it does not grant a module."
},
"expected_access_version": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,18})$",
"description": "Exact decimal string returned by the corresponding read tool. On conflict, re-read and use a new idempotency key for a revised change."
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Unique key for this intended change. Reuse exactly the same key and payload only when retrying it."
}
},
"required": [
"member_id",
"access_keys",
"expected_access_version",
"idempotency_key"
],
"additionalProperties": false
}crm_mcp_member_permissions · Read · Admin
Inspect explicit MCP grants and currently grantable actions for ordinary members. Returns policy_version (decimal string), enabled, capabilities and grantable_capabilities limited by this connection/token, workspace policy and target CRM permissions. Read this immediately before crm_mcp_member_permissions_update. A grant is a ceiling, not a connected AI account; each member still connects their own client.
Permission: mcp.permissions.read
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
member_id— Optional withinrequest. Optional single member UUID; omit to page workspace members.page_offset— Optional withinrequest. Start at 0; follow returned next_offset. Each page contains at most 50 members.
Example request
{
"member_id": "00000000-0000-4000-8000-000000000002"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"member_id": {
"description": "Optional single member UUID; omit to page workspace members.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"page_offset": {
"description": "Start at 0; follow returned next_offset. Each page contains at most 50 members.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
}
},
"additionalProperties": false
}crm_mcp_member_permissions_update · Write · Admin
Set/reduce/revoke another ordinary member's MCP access after an owner/admin explicitly delegates mcp.permissions.manage to this connection. First inspect crm_mcp_member_permissions and use its latest policy_version. Can grant only this token's current effective capabilities that the target's CRM rights also allow. Cannot target self/owner/admin, grant administration recursively, edit workspace master/ceiling or issue someone else's token. Disabling revokes every target connection. New/re-enabled members authorize their own AI clients. Returns only mutation metadata and new policy version.
Permission: mcp.permissions.manage · Destructive action
Required fields are relative to their containing object; nested required fields apply when that optional parent is supplied. Examples are synthetic and must use actual IDs/options/versions from authorized reads.
Parameter guide
member_id— Required withinrequest. Existing active sales/support member UUID from crm_team_list. Cannot target yourself, owner, administrator or another workspace.enabled— Required withinrequest. false immediately revokes all target member connections; re-enabling requires reconnecting.capabilities— Required withinrequest. Complete replacement, not an append. Choose only grantable_capabilities from the read tool; empty is allowed. No administrator/delegation capabilities.expected_policy_version— Required withinrequest. Exact decimal string returned by the corresponding read tool. On conflict, re-read and use a new idempotency key for a revised change.idempotency_key— Required withinrequest. Unique key for this intended change. Reuse exactly the same key and payload only when retrying it.
Example request
{
"member_id": "00000000-0000-4000-8000-000000000002",
"enabled": true,
"capabilities": [
"identity.read",
"leads.read"
],
"expected_policy_version": "3",
"idempotency_key": "example-intended-change-001"
}Full validation schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"member_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Existing active sales/support member UUID from crm_team_list. Cannot target yourself, owner, administrator or another workspace."
},
"enabled": {
"type": "boolean",
"description": "false immediately revokes all target member connections; re-enabling requires reconnecting."
},
"capabilities": {
"maxItems": 51,
"type": "array",
"items": {
"type": "string",
"enum": [
"identity.read",
"leads.read",
"leads.create",
"leads.update",
"leads.delete",
"leads.assign",
"leads.stage",
"leads.follow_up",
"notes.read",
"notes.create",
"revenue.read",
"revenue.update",
"leads.import",
"leads.export",
"leads.deleted_read",
"leads.restore",
"tasks.read",
"tasks.create",
"tasks.update",
"tasks.delete",
"task_comments.read",
"task_comments.create",
"projects.read",
"projects.create",
"projects.update",
"projects.delete",
"project_comments.read",
"project_comments.create",
"dashboard.read",
"analytics.read",
"team_performance.read",
"workspace.profile.read",
"workspace.profile.update",
"workspace.settings.read",
"workspace.settings.update",
"options.read",
"options.update",
"team.read",
"team.invite",
"team.update",
"mcp.permissions.read",
"mcp.permissions.manage",
"team.remove",
"automation.read",
"automation.update",
"deliveries.read",
"followups.dispatch",
"automation.credentials.manage",
"audit.read",
"usage.read",
"plan.read"
]
},
"description": "Complete replacement, not an append. Choose only grantable_capabilities from the read tool; empty is allowed. No administrator/delegation capabilities."
},
"expected_policy_version": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,18})$",
"description": "Exact decimal string returned by the corresponding read tool. On conflict, re-read and use a new idempotency key for a revised change."
},
"idempotency_key": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Unique key for this intended change. Reuse exactly the same key and payload only when retrying it."
}
},
"required": [
"member_id",
"enabled",
"capabilities",
"expected_policy_version",
"idempotency_key"
],
"additionalProperties": false
}