MCP API Reference
Complete developer reference for the DispatchNode MCP server. Covers authentication, the JSON-RPC protocol, all available tools with full I/O schemas, error codes, and SDK examples.
Overview
The DispatchNode MCP server implements the Model Context Protocol (MCP) via the Streamable HTTP transport. It exposes a single endpoint that accepts JSON-RPC 2.0 requests and returns JSON-RPC 2.0 responses.
The server supports two access tiers — customer and operator — so AI agents can book jobs without needing an API key, while business owners get full administrative access.
| Tier | Auth | Tools | Who |
|---|---|---|---|
| Customer | X-Org-Slug header (no key) | 9 tools incl. book/cancel/reschedule/status + spawn_job_agent | AI agents acting on behalf of a customer |
| Operator | Authorization: Bearer dnk_... | All 47 tools | Business owner's CRM / automation |
Authentication
Customer Tier (No API Key)
For AI agents acting on behalf of customers (e.g., a wedding planner's Claude assistant booking portapotties). Pass the org slug from the <link> tag's data-org-slug attribute.
POST /api/mcp HTTP/1.1
Host: www.dispatchnode.com
Content-Type: application/json
X-Org-Slug: eventrestroomrentalsAvailable tools: book_job, check_availability, get_pricing, calculate_dispatch_tco, cancel_job, reschedule_job, get_job_status, get_business_info, spawn_job_agent. Rate limited to 30 req/min and 10 bookings/hour per IP.
Operator Tier (API Key)
For the business owner's own CRM or automation integrations. Full access to all 47 tools.
POST /api/mcp HTTP/1.1
Host: www.dispatchnode.com
Content-Type: application/json
Authorization: Bearer dnk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0JSON-RPC Protocol
All communication uses JSON-RPC 2.0 over HTTP POST. Every request must include:
| Field | Type | Description |
|---|---|---|
| jsonrpc | "2.0" | Must be exactly "2.0" |
| id | string | number | Request identifier — echoed in the response |
| method | string | One of: initialize, tools/list, tools/call |
| params | object | Method parameters (optional for initialize and tools/list) |
Available methods:
initializeEstablish a session. Returns server info, capabilities, and protocol version.notifications/initializedClient acknowledgment after initialize. No meaningful response.tools/listReturns all available tools with their JSON Schema input definitions.tools/callExecute a tool. Requires params.name and params.arguments.Session Lifecycle
A typical MCP session follows this sequence:
{ "jsonrpc": "2.0", "id": 1, "method": "initialize" }{ "protocolVersion": "2025-03-26", "serverInfo": { "name": "dispatchnode", "version": "1.0.0" }, "capabilities": { "tools": {} } }{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "book_job", "arguments": { ... } } }Tools Reference
47 toolsAll 47 registered tools are documented below (9 customer-tier via X-Org-Slug, 38 operator-only via Bearer dnk_…). Each tool returns a JSON-RPC result with a content array containing a text item with the JSON-stringified response.
book_job
TOOLBook a new service job for a customer. Creates a job record with scheduling, service type, and contact information.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerName | string | required | Customer's full name |
| customerPhone | string | required | Customer phone in E.164 format (+1XXXXXXXXXX) |
| customerEmail | string | optional | Customer email address (optional) |
| serviceAddress | string | required | Service location address |
| scheduledStart | string | required | ISO 8601 datetime for job start |
| scheduledEnd | string | optional | ISO 8601 datetime for job end (optional) |
| serviceType | string | optional | Service type slug (e.g. 'grease-trap-450-gal') |
| notes | string | optional | Additional notes for the dispatcher |
| priority | enum: normal | urgent | emergency | optional | Job priority level |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "book_job",
"arguments": {
"customerName": "<customerName>",
"customerPhone": "<customerPhone>",
"serviceAddress": "<serviceAddress>",
"scheduledStart": "<scheduledStart>"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}check_availability
TOOLCheck available time slots for a given date range. Returns open slots based on calendar, existing bookings, and transit buffers. Supports pagination.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| startDate | string | required | Start date (ISO 8601) |
| endDate | string | required | End date (ISO 8601) |
| serviceType | string | optional | Service type slug to check duration requirements |
| page | number | optional | Page number (1-based, default 1) |
| pageSize | number | optional | Results per page (default 20, max 50) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "check_availability",
"arguments": {
"startDate": "<startDate>",
"endDate": "<endDate>"
}
}
}{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_jobs
TOOLList jobs with optional status filter. Returns recent jobs with customer info, scheduling, and status. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | enum: LEAD | QUOTED | SCHEDULED | IN_PROGRESS | COMPLETED | CANCELLED | optional | Filter by job status |
| limit | number | optional | Max results (default 20, max 100) |
| offset | number | optional | Pagination offset |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "list_jobs",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_pricing
TOOLGet service pricing information including base prices, deposit requirements, and plan details.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| serviceType | string | optional | Service type slug (optional — returns all if omitted) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "get_pricing",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 4,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_call_transcript
TOOLRetrieve the transcript and metadata for a specific AI call by call log ID. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| callId | string | required | Call log ID |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "get_call_transcript",
"arguments": {
"callId": "<callId>"
}
}
}{
"jsonrpc": "2.0",
"id": 5,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_health
TOOLGet system health status including database connectivity, circuit breaker states, and service metrics. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters required | |||
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "get_health",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 6,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}calculate_dispatch_tco
TOOLCalculate Total Cost of Ownership (TCO) and savings when migrating to DispatchNode. Ideal for deterministic comparisons against legacy competitors.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| trucks | number | required | Number of active trucks/technicians |
| current_software | string | required | Name of the legacy software used (e.g., 'ServiceTitan', 'Jobber', 'HouseCallPro') |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "calculate_dispatch_tco",
"arguments": {
"trucks": 1,
"current_software": "<current_software>"
}
}
}{
"jsonrpc": "2.0",
"id": 7,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}cancel_job
TOOLCancel an existing job. Customer tier requires phone number ownership validation. Operator tier can cancel any job.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobId | string | required | Job ID to cancel |
| customerPhone | string | optional | Customer phone for ownership validation (required for customer tier) |
| reason | string | optional | Cancellation reason |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 8,
"method": "tools/call",
"params": {
"name": "cancel_job",
"arguments": {
"jobId": "<jobId>"
}
}
}{
"jsonrpc": "2.0",
"id": 8,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}update_job
TOOLUpdate job status, priority, notes, or address. Creates audit trail. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobId | string | required | Job ID to update |
| status | enum: LEAD | QUOTED | SCHEDULED | IN_PROGRESS | COMPLETED | CANCELLED | optional | New status |
| priority | enum: normal | urgent | emergency | optional | New priority level |
| notes | string | optional | Dispatch notes to append |
| serviceAddress | string | optional | Updated service address |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 9,
"method": "tools/call",
"params": {
"name": "update_job",
"arguments": {
"jobId": "<jobId>"
}
}
}{
"jsonrpc": "2.0",
"id": 9,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_customers
TOOLSearch and list customers with job count and LTV. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | optional | Search by name, company, restaurant/site, phone, or email |
| limit | number | optional | Max results (default 20, max 100) |
| offset | number | optional | Pagination offset |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "list_customers",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 10,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}reschedule_job
TOOLMove a job to a new date/time. Customer tier requires phone ownership validation.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobId | string | required | Job ID to reschedule |
| newStart | string | required | New start datetime (ISO 8601) |
| newEnd | string | optional | New end datetime (ISO 8601, optional) |
| customerPhone | string | optional | Customer phone for ownership validation (customer tier) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 11,
"method": "tools/call",
"params": {
"name": "reschedule_job",
"arguments": {
"jobId": "<jobId>",
"newStart": "<newStart>"
}
}
}{
"jsonrpc": "2.0",
"id": 11,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_job_status
TOOLCheck job status and ETA by customer phone number. Returns the most recent active job.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerPhone | string | required | Customer phone in E.164 format |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "get_job_status",
"arguments": {
"customerPhone": "<customerPhone>"
}
}
}{
"jsonrpc": "2.0",
"id": 12,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}assign_job
TOOLAssign or reassign a technician/resource to a job. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobId | string | required | Job ID |
| resourceId | string | required | Resource/technician ID to assign |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 13,
"method": "tools/call",
"params": {
"name": "assign_job",
"arguments": {
"jobId": "<jobId>",
"resourceId": "<resourceId>"
}
}
}{
"jsonrpc": "2.0",
"id": 13,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_customer
TOOLGet full customer profile including contacts[], properties[] (sites), job history, LTV, and outstanding invoices. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | string | required | Customer ID |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 14,
"method": "tools/call",
"params": {
"name": "get_customer",
"arguments": {
"customerId": "<customerId>"
}
}
}{
"jsonrpc": "2.0",
"id": 14,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_invoices
TOOLList invoices with optional status and date filters. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | enum: DRAFT | SENT | PAID | OVERDUE | optional | Filter by invoice status |
| customerId | string | optional | Filter by customer ID |
| limit | number | optional | Max results (default 20, max 100) |
| offset | number | optional | Pagination offset |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 15,
"method": "tools/call",
"params": {
"name": "list_invoices",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 15,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}create_invoice
TOOLCreate a new invoice for a job with line items. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| jobId | string | required | Job ID to invoice |
| lineItems | array | required | Array of {description, amountCents} |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 16,
"method": "tools/call",
"params": {
"name": "create_invoice",
"arguments": {
"jobId": "<jobId>",
"lineItems": []
}
}
}{
"jsonrpc": "2.0",
"id": 16,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_resources
TOOLList technicians/resources with today's job count. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | enum: PERSON | TRUCK | ROOM | optional | Filter by resource type |
| activeOnly | boolean | optional | Only show active resources (default true) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 17,
"method": "tools/call",
"params": {
"name": "list_resources",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 17,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_resource_schedule
TOOLGet a technician's job schedule for a date range. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| resourceId | string | required | Resource ID |
| startDate | string | required | Start date (ISO 8601) |
| endDate | string | required | End date (ISO 8601) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 18,
"method": "tools/call",
"params": {
"name": "get_resource_schedule",
"arguments": {
"resourceId": "<resourceId>",
"startDate": "<startDate>",
"endDate": "<endDate>"
}
}
}{
"jsonrpc": "2.0",
"id": 18,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_dashboard_stats
TOOLGet business performance summary for the current billing period. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters required | |||
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 19,
"method": "tools/call",
"params": {
"name": "get_dashboard_stats",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 19,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_usage_summary
TOOLGet AI minutes usage, allowance, and overage status. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters required | |||
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 20,
"method": "tools/call",
"params": {
"name": "get_usage_summary",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 20,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_business_info
TOOLGet business hours, location, contact info, and service area. Customer tier gets public info; operator tier gets full config.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters required | |||
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 21,
"method": "tools/call",
"params": {
"name": "get_business_info",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 21,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}update_customer
TOOLUpdate customer name, email, or company name. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | string | required | Customer ID |
| name | string | optional | New name |
| string | optional | New email | |
| companyName | string | optional | New company name |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 22,
"method": "tools/call",
"params": {
"name": "update_customer",
"arguments": {
"customerId": "<customerId>"
}
}
}{
"jsonrpc": "2.0",
"id": 22,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}send_invoice
TOOLEmail an invoice to the customer with payment link. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| invoiceId | string | required | Invoice ID to send |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 23,
"method": "tools/call",
"params": {
"name": "send_invoice",
"arguments": {
"invoiceId": "<invoiceId>"
}
}
}{
"jsonrpc": "2.0",
"id": 23,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_service_types
TOOLList all service types with full admin detail. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| includeInactive | boolean | optional | Include inactive services (default false) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 24,
"method": "tools/call",
"params": {
"name": "list_service_types",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 24,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}update_service_type
TOOLUpdate service pricing, duration, or status. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| serviceSlug | string | required | Service type slug |
| priceBaseCents | number | optional | New base price in cents |
| durationMins | number | optional | New duration in minutes |
| depositCents | number | optional | New deposit amount in cents |
| isActive | boolean | optional | Enable/disable this service |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 25,
"method": "tools/call",
"params": {
"name": "update_service_type",
"arguments": {
"serviceSlug": "<serviceSlug>"
}
}
}{
"jsonrpc": "2.0",
"id": 25,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_locations
TOOLList branch locations with address, phone, and widget status. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters required | |||
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 26,
"method": "tools/call",
"params": {
"name": "list_locations",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 26,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_fleet_availability
TOOLCheck the availability of fleet units by date and unit type. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| startDate | string | required | Start date (ISO 8601) |
| endDate | string | required | End date (ISO 8601) |
| unitType | string | optional | Fleet unit type (e.g. 'Standard Unit') |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 27,
"method": "tools/call",
"params": {
"name": "get_fleet_availability",
"arguments": {
"startDate": "<startDate>",
"endDate": "<endDate>"
}
}
}{
"jsonrpc": "2.0",
"id": 27,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}calculate_route_impact
TOOLEvaluate if a new job fits into an existing driver's route. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| resourceId | string | required | Driver Resource ID |
| jobLat | number | required | New job latitude |
| jobLng | number | required | New job longitude |
| durationMins | number | required | Estimated service duration in minutes |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 28,
"method": "tools/call",
"params": {
"name": "calculate_route_impact",
"arguments": {
"resourceId": "<resourceId>",
"jobLat": 1,
"jobLng": 1,
"durationMins": 1
}
}
}{
"jsonrpc": "2.0",
"id": 28,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}spawn_job_agent
TOOLSpawn an autonomous JobAgent to manage a job's full lifecycle — negotiation, quoting, scheduling, notifications, and invoicing. Use this when the customer confirms they want to book.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerPhone | string | required | Customer phone in E.164 format |
| customerName | string | optional | Customer's full name |
| customerEmail | string | optional | Customer email (optional) |
| serviceAddress | string | required | Delivery/service address |
| requestedDate | string | required | Requested date (YYYY-MM-DD) |
| units | number | optional | Number of units requested (default 1) |
| serviceType | string | optional | Service type (e.g. 'unit-dropoff', 'weekly-service') |
| unitType | string | optional | Unit type (e.g. 'standard', 'ada', 'handwash') |
| source | enum: VOICE | WIDGET | SMS | MANUAL | optional | How the request originated |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: customer |
{
"jsonrpc": "2.0",
"id": 29,
"method": "tools/call",
"params": {
"name": "spawn_job_agent",
"arguments": {
"customerPhone": "<customerPhone>",
"serviceAddress": "<serviceAddress>",
"requestedDate": "<requestedDate>"
}
}
}{
"jsonrpc": "2.0",
"id": 29,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_contacts
TOOLList CRM contacts for a customer. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | string | required | Customer ID |
| includeArchived | boolean | optional | Include archived contacts (default false) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 30,
"method": "tools/call",
"params": {
"name": "list_contacts",
"arguments": {
"customerId": "<customerId>"
}
}
}{
"jsonrpc": "2.0",
"id": 30,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_contact
TOOLGet a single customer contact by ID. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| contactId | string | required | Contact ID |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 31,
"method": "tools/call",
"params": {
"name": "get_contact",
"arguments": {
"contactId": "<contactId>"
}
}
}{
"jsonrpc": "2.0",
"id": 31,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}create_contact
TOOLCreate a contact on a customer. Optionally set as primary (syncs denormalized Customer fields). (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | string | required | Customer ID |
| firstName | string | required | Contact first name |
| lastName | string | optional | Contact last name |
| role | string | optional | Role (e.g. Decision Maker, Site Manager) |
| phone | string | optional | Primary phone (E.164) |
| string | optional | Primary email | |
| isPrimary | boolean | optional | Mark as primary contact |
| notes | string | optional | Notes |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 32,
"method": "tools/call",
"params": {
"name": "create_contact",
"arguments": {
"customerId": "<customerId>",
"firstName": "<firstName>"
}
}
}{
"jsonrpc": "2.0",
"id": 32,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}update_contact
TOOLUpdate a customer contact. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| contactId | string | required | Contact ID |
| firstName | string | optional | |
| lastName | string | optional | |
| role | string | optional | |
| phone | string | optional | |
| string | optional | ||
| isPrimary | boolean | optional | |
| notes | string | optional |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 33,
"method": "tools/call",
"params": {
"name": "update_contact",
"arguments": {
"contactId": "<contactId>"
}
}
}{
"jsonrpc": "2.0",
"id": 33,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_properties
TOOLList customer sites/properties. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | string | required | Customer ID |
| includeArchived | boolean | optional | Include archived sites (default false) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 34,
"method": "tools/call",
"params": {
"name": "list_properties",
"arguments": {
"customerId": "<customerId>"
}
}
}{
"jsonrpc": "2.0",
"id": 34,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_property
TOOLGet a customer site/property by ID. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| propertyId | string | required | Property ID |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 35,
"method": "tools/call",
"params": {
"name": "get_property",
"arguments": {
"propertyId": "<propertyId>"
}
}
}{
"jsonrpc": "2.0",
"id": 35,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}create_property
TOOLCreate a customer site/property. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | string | required | Customer ID |
| name | string | required | Site name (e.g. Main Office) |
| address | string | required | Full street address |
| externalId | string | optional | Store / location number |
| notes | string | optional | |
| addressLat | number | optional | |
| addressLng | number | optional |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 36,
"method": "tools/call",
"params": {
"name": "create_property",
"arguments": {
"customerId": "<customerId>",
"name": "<name>",
"address": "<address>"
}
}
}{
"jsonrpc": "2.0",
"id": 36,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}update_property
TOOLUpdate a customer site/property. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| propertyId | string | required | Property ID |
| name | string | optional | |
| address | string | optional | |
| externalId | string | optional | |
| notes | string | optional | |
| addressLat | number | optional | |
| addressLng | number | optional |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 37,
"method": "tools/call",
"params": {
"name": "update_property",
"arguments": {
"propertyId": "<propertyId>"
}
}
}{
"jsonrpc": "2.0",
"id": 37,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_quotes
TOOLList quotes with optional status/customer filters. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | enum: DRAFT | SENT | VIEWED | APPROVED | REJECTED | EXPIRED | optional | Filter by status |
| customerId | string | optional | Filter by customer |
| limit | number | optional | |
| offset | number | optional |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 38,
"method": "tools/call",
"params": {
"name": "list_quotes",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 38,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_quote
TOOLGet a quote with line items and customer. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| quoteId | string | required | Quote ID |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 39,
"method": "tools/call",
"params": {
"name": "get_quote",
"arguments": {
"quoteId": "<quoteId>"
}
}
}{
"jsonrpc": "2.0",
"id": 39,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}create_quote
TOOLCreate a DRAFT quote with line items. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customerId | string | required | Customer ID |
| lineItems | array | required | Array of {description, qty, unitPriceCents, totalCents?} |
| taxCents | number | optional | |
| jobId | string | optional | |
| notes | string | optional | |
| clientNotes | string | optional | |
| validUntil | string | optional | ISO 8601 expiry |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 40,
"method": "tools/call",
"params": {
"name": "create_quote",
"arguments": {
"customerId": "<customerId>",
"lineItems": []
}
}
}{
"jsonrpc": "2.0",
"id": 40,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_leads
TOOLList pipeline leads (LeadSource). (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | optional | Filter: NEW, CONTACTED, QUALIFIED, CONVERTED/won, LOST |
| search | string | optional | Search name/phone/email/company |
| limit | number | optional | |
| offset | number | optional |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 41,
"method": "tools/call",
"params": {
"name": "list_leads",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 41,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_lead
TOOLGet a single lead by ID. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| leadId | string | required | Lead ID |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 42,
"method": "tools/call",
"params": {
"name": "get_lead",
"arguments": {
"leadId": "<leadId>"
}
}
}{
"jsonrpc": "2.0",
"id": 42,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}convert_lead
TOOLConvert a lead to a customer (creates customer if needed, marks CONVERTED). (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| leadId | string | required | Lead ID |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 43,
"method": "tools/call",
"params": {
"name": "convert_lead",
"arguments": {
"leadId": "<leadId>"
}
}
}{
"jsonrpc": "2.0",
"id": 43,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_agreements
TOOLList maintenance agreements. Requires agreements module. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | optional | Filter by agreement status |
| customerId | string | optional | |
| limit | number | optional | |
| offset | number | optional |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 44,
"method": "tools/call",
"params": {
"name": "list_agreements",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 44,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_agreement
TOOLGet a maintenance agreement with coverage lines. Requires agreements module. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| agreementId | string | required | Agreement ID |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 45,
"method": "tools/call",
"params": {
"name": "get_agreement",
"arguments": {
"agreementId": "<agreementId>"
}
}
}{
"jsonrpc": "2.0",
"id": 45,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}list_compliance_forms
TOOLList compliance form templates (no PDF generation). Requires compliance module. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activeOnly | boolean | optional | Only active forms (default true) |
| limit | number | optional | |
| offset | number | optional |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 46,
"method": "tools/call",
"params": {
"name": "list_compliance_forms",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 46,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}get_compliance_form
TOOLGet a compliance form schema by formId or templateId. Requires compliance module. (Requires operator API key)
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| formId | string | optional | ComplianceForm ID |
| templateId | string | optional | Stable template key (e.g. nfpa-96-cert) |
Response Fields
| Field | Type | Description |
|---|---|---|
| result | object | Tool-specific JSON payload (stringified in content[0].text) |
| tier | string | Access tier: operator |
{
"jsonrpc": "2.0",
"id": 47,
"method": "tools/call",
"params": {
"name": "get_compliance_form",
"arguments": {}
}
}{
"jsonrpc": "2.0",
"id": 47,
"result": {
"content": [
{
"type": "text",
"text": "{ /* tool result */ }"
}
]
}
}Error Codes
| Code | Name | HTTP | Description |
|---|---|---|---|
| -32700 | Parse Error | 400 | Invalid JSON was received. Check your request body formatting. |
| -32600 | Invalid Request | 400 | The JSON is valid but not a valid JSON-RPC 2.0 request. Must include jsonrpc: '2.0' and a method field. |
| -32601 | Method Not Found | 200 | The requested method does not exist. Valid methods: initialize, tools/list, tools/call. |
| -32602 | Invalid Params | 200 | Unknown tool name passed to tools/call, or missing required parameters for a tool. |
| -32603 | Internal Error | 200 | Server-side error during tool execution (e.g. database timeout, validation failure). |
| -32001 | Authentication Error | 401 | Missing or invalid auth. Send Authorization: Bearer dnk_... (operator) or X-Org-Slug: <slug> (customer). |
| -32000 | Rate Limited | 429 | Customer tier rate limit exceeded. 30 requests/min or 10 bookings/hour per IP. |
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32001,
"message": "Invalid or revoked API key"
}
}SDK Examples
The MCP endpoint works with any HTTP client. Here are examples in popular languages:
# Customer tier: use X-Org-Slug (found in <link> tag on client site)
curl -X POST https://www.dispatchnode.com/api/mcp \
-H "Content-Type: application/json" \
-H "X-Org-Slug: eventrestroomrentals" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "check_availability",
"arguments": {
"startDate": "2026-04-15",
"endDate": "2026-04-16"
}
}
}'# Operator tier: use Bearer token for all tools
curl -X POST https://www.dispatchnode.com/api/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer dnk_your_api_key_here" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'import requests
BASE_URL = "https://www.dispatchnode.com/api/mcp"
API_KEY = "dnk_your_api_key_here"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {API_KEY}"
}
# List available tools
response = requests.post(BASE_URL, json={
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}, headers=headers)
tools = response.json()["result"]["tools"]
print(f"Available tools: {[t['name'] for t in tools]}")
# Book a job
response = requests.post(BASE_URL, json={
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "book_job",
"arguments": {
"customerName": "Jane Doe",
"customerPhone": "+15559876543",
"serviceAddress": "456 Oak Ave, Houston, TX",
"scheduledStart": "2026-04-16T14:00:00Z"
}
}
}, headers=headers)
import json
result = json.loads(response.json()["result"]["content"][0]["text"])
print(f"Job booked: {result['jobId']}")const BASE_URL = "https://www.dispatchnode.com/api/mcp";
const API_KEY = "dnk_your_api_key_here";
async function mcpCall(method: string, params?: object) {
const res = await fetch(BASE_URL, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`,
},
body: JSON.stringify({
jsonrpc: "2.0",
id: Date.now(),
method,
params,
}),
});
return res.json();
}
// List tools
const { result } = await mcpCall("tools/list");
console.log("Tools:", result.tools.map((t: { name: string }) => t.name));
// Check availability
const avail = await mcpCall("tools/call", {
name: "check_availability",
arguments: {
startDate: "2026-04-15",
endDate: "2026-04-16",
},
});
const data = JSON.parse(avail.result.content[0].text);
console.log(`${data.existingBookings} existing bookings`);{
"mcpServers": {
"dispatchnode": {
"url": "https://www.dispatchnode.com/api/mcp",
"transport": "streamable-http",
"headers": {
"Authorization": "Bearer dnk_your_api_key_here"
}
}
}
}Discovery
MCP clients can discover the DispatchNode server through two mechanisms:
1. Well-Known Endpoint
Standard RFC 8414 / RFC 9728 discovery at the well-known URL:
2. Widget-Injected Link Tag
When the DispatchNode widget is embedded on a client site, it automatically injects a <link> tag into the host page for white-label discovery:
Rate Limits & Best Practices
| Limit | Value |
|---|---|
| Customer: requests/min | 30 per IP |
| Customer: bookings/hour | 10 per IP |
| Operator: requests/min | Unlimited |
| Request body size | 1 MB |
| Max results (list_jobs) | 100 per page |
| Timeout | 30 seconds |
Best Practices
© 2026 DispatchNode