ServiceTrade MCP by usefulapi
Read jobs, appointments, deficiencies, invoices and assets, and add comments in ServiceTrade.
我該用這個嗎
品質與安全性
發現項目(1)
- LOW在 servicetrade_list_service_requests 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"servicetrade": {
"url": "https://servicetrade.usefulapi.io/mcp"
}
}
}遠端端點
https://servicetrade.usefulapi.io/mcpstreamable-http它能做什麼
工具清單
工具(22)
🟢servicetrade_list_jobs(status, type, locationId, customerId, techId, ...)
List jobs (service calls, inspections, installs) with status, type, customer, location, owner, due date and estimated price. Filter by status, type, location, customer, technician, due or completion dates. ServiceTrade API: GET /job.
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"description": "Job status or comma-separated list: new, scheduled, canceled, bidding, completed, pending_invoice, sending_invoice, invoiced, closed.",
"type": "string"
},
"type": {
"description": "Job type or comma-separated list, e.g. inspection, repair, emergency_service_call, installation.",
"type": "string"
},
"locationId": {
"description": "Only jobs at this location id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"customerId": {
"description": "Only jobs for this customer company id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"techId": {
"description": "Only jobs assigned to this technician user id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"name": {
"description": "Filter by job name.",
"type": "string"
},
"number": {
"description": "Filter by job number.",
"type": "string"
},
"dueByBegin": {
"description": "Earliest due date as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"dueByEnd": {
"description": "Latest due date as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"completedOnBegin": {
"description": "Earliest completion date as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"completedOnEnd": {
"description": "Latest completion date as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"createdAfter": {
"description": "Created after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"updatedAfter": {
"description": "Updated after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"sort": {
"description": "Sort field.",
"type": "string"
},
"sortOrder": {
"description": "Sort direction.",
"type": "string",
"enum": [
"ASC",
"DESC"
]
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_locations(name, companyId, status, updatedAfter, page, ...)
List customer service locations (sites) with address, company, status and tags. ServiceTrade API: GET /location.
輸入結構描述
{
"type": "object",
"properties": {
"name": {
"description": "Filter by location name.",
"type": "string"
},
"companyId": {
"description": "Only locations of this company id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"status": {
"description": "Location status, e.g. active.",
"type": "string"
},
"updatedAfter": {
"description": "Updated after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_companies(name, city, state, isCustomer, status, ...)
List companies (customers, vendors, contractors) with city, state and status. ServiceTrade API: GET /company.
輸入結構描述
{
"type": "object",
"properties": {
"name": {
"description": "Filter by company name.",
"type": "string"
},
"city": {
"description": "Filter by city.",
"type": "string"
},
"state": {
"description": "Filter by state.",
"type": "string"
},
"isCustomer": {
"description": "true = only customers.",
"type": "boolean"
},
"status": {
"description": "Company status, e.g. active.",
"type": "string"
},
"updatedAfter": {
"description": "Updated after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_appointments(jobId, locationId, techIds, status, windowBeginsAfter, ...)
List scheduled appointments (technician visits) with time window, job, location and assigned technicians. ServiceTrade API: GET /appointment.
輸入結構描述
{
"type": "object",
"properties": {
"jobId": {
"description": "Only appointments of this job id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"locationId": {
"description": "Only appointments at this location id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"techIds": {
"description": "Technician user id or comma-separated ids.",
"type": "string"
},
"status": {
"description": "Appointment status.",
"type": "string"
},
"windowBeginsAfter": {
"description": "Window starts after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"windowBeginsBefore": {
"description": "Window starts before as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_service_requests(jobId, locationId, status, page, limit)
List service requests (the work items to perform on a job, with description, service line and window). ServiceTrade API: GET /servicerequest.
輸入結構描述
{
"type": "object",
"properties": {
"jobId": {
"description": "Only requests of this job id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"locationId": {
"description": "Only requests at this location id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"status": {
"description": "Service request status.",
"type": "string"
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_deficiencies(severity, status, assetId, locationId, companyId, ...)
List deficiencies (problems found during inspections, such as fire or life-safety defects) with severity, status and asset. ServiceTrade API: GET /deficiency.
輸入結構描述
{
"type": "object",
"properties": {
"severity": {
"description": "Severity filter, e.g. deficient, impairment, suggested.",
"type": "string"
},
"status": {
"description": "Status or comma-separated list: new, invalid, verified, fixed.",
"type": "string"
},
"assetId": {
"description": "Only deficiencies of this asset id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"locationId": {
"description": "Only deficiencies at this location id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"companyId": {
"description": "Only deficiencies of this company id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAfter": {
"description": "Created after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_assets(locationId, jobId, type, status, name, ...)
List assets (equipment such as extinguishers, panels, pumps) at customer locations with type, status and name. ServiceTrade API: GET /asset.
輸入結構描述
{
"type": "object",
"properties": {
"locationId": {
"description": "Only assets at this location id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"jobId": {
"description": "Only assets of this job id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"type": {
"description": "Asset type.",
"type": "string"
},
"status": {
"description": "Asset status.",
"type": "string"
},
"name": {
"description": "Filter by asset name.",
"type": "string"
},
"search": {
"description": "Free-text search.",
"type": "string"
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_quotes(status, customerId, locationId, jobId, createdAfter, ...)
List quotes with status, customer, location, total and expiry. ServiceTrade API: GET /quote.
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"description": "Status or comma-separated list: accepted, canceled, draft, new, rejected, submitted, pending_sales_tax.",
"type": "string"
},
"customerId": {
"description": "Only quotes for this customer company id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"locationId": {
"description": "Only quotes at this location id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"jobId": {
"description": "Only quotes linked to this job id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"createdAfter": {
"description": "Created after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"sort": {
"description": "Sort field.",
"type": "string",
"enum": [
"name",
"created",
"updated",
"status"
]
},
"sortOrder": {
"description": "Sort direction.",
"type": "string",
"enum": [
"ASC",
"DESC"
]
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_invoices(status, jobId, customerId, locationId, paid, ...)
List invoices with status, customer, job, totals, due date and paid state. ServiceTrade API: GET /invoice.
輸入結構描述
{
"type": "object",
"properties": {
"status": {
"description": "Invoice status.",
"type": "string",
"enum": [
"ok",
"internal_review",
"pending_accounting",
"pending_sales_tax",
"processed",
"paid",
"sent",
"failed",
"void"
]
},
"jobId": {
"description": "Only invoices of this job id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"customerId": {
"description": "Only invoices for this customer company id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"locationId": {
"description": "Only invoices at this location id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"paid": {
"description": "true = only paid, false = only unpaid.",
"type": "boolean"
},
"createdAfter": {
"description": "Created after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"transactionDateAfter": {
"description": "Transaction date after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"transactionDateBefore": {
"description": "Transaction date before as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"sort": {
"description": "Sort field.",
"type": "string",
"enum": [
"name",
"transactionDate",
"substatus"
]
},
"sortOrder": {
"description": "Sort direction.",
"type": "string",
"enum": [
"ASC",
"DESC"
]
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_contracts(customerId, locationId, active, name, page, ...)
List service contracts and agreements with customer, location, review date and active state. ServiceTrade API: GET /contract.
輸入結構描述
{
"type": "object",
"properties": {
"customerId": {
"description": "Only contracts for this customer company id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"locationId": {
"description": "Only contracts at this location id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"active": {
"description": "true = only active contracts.",
"type": "boolean"
},
"name": {
"description": "Filter by contract name.",
"type": "string"
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_users(name, companyId, isTech, status, search, ...)
List users (technicians, sales staff, office staff and customer contacts) with company and status. ServiceTrade API: GET /user.
輸入結構描述
{
"type": "object",
"properties": {
"name": {
"description": "Filter by user name.",
"type": "string"
},
"companyId": {
"description": "Only users of this company id.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"isTech": {
"description": "true = only technicians.",
"type": "boolean"
},
"status": {
"description": "User status, e.g. active.",
"type": "string"
},
"search": {
"description": "Free-text search.",
"type": "string"
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_list_comments(entityType, entityId, visibility, createdAfter, page, ...)
List comments on one record. Pass the entity type number and the record id (Asset 2, Job 3, Invoice 6, Quote 9, Deficiency 10, Location 11). ServiceTrade API: GET /comment.
輸入結構描述
{
"type": "object",
"properties": {
"entityType": {
"description": "Entity type number: Asset 2, Job 3, Invoice 6, Quote 9, Deficiency 10, Location 11.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"entityId": {
"description": "The id of the record.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"visibility": {
"description": "Visibility filter: public, schedule, tech or billing.",
"type": "string"
},
"createdAfter": {
"description": "Created after as a Unix timestamp in seconds.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"page": {
"description": "Page number (1-indexed, default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"limit": {
"description": "Results per page (default and maximum 2000).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2000
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_get_job(id)
Get one job by id with customer, location, owner, appointments summary, dates and price. ServiceTrade API: GET /job/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The job id."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_get_location(id)
Get one customer location by id with address, contacts and status. ServiceTrade API: GET /location/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The location id."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_get_company(id)
Get one company by id. ServiceTrade API: GET /company/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The company id."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_get_appointment(id)
Get one appointment by id with window, technicians and job. ServiceTrade API: GET /appointment/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The appointment id."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_get_deficiency(id)
Get one deficiency by id with severity, status, asset and reporting job. ServiceTrade API: GET /deficiency/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The deficiency id."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_get_asset(id)
Get one asset by id with type, location and status. ServiceTrade API: GET /asset/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The asset id."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_get_quote(id)
Get one quote by id with status, line items and totals. ServiceTrade API: GET /quote/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The quote id."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_get_invoice(id)
Get one invoice by id with status, items and totals. ServiceTrade API: GET /invoice/{id}.
輸入結構描述
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The invoice id."
}
},
"required": [
"id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢servicetrade_whoami
Show which ServiceTrade account, company, user and timezone the connected credential belongs to. ServiceTrade API: GET /oauth2/userinfo.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴servicetrade_add_comment(entityType, entityId, content, visibility)
WRITE: add a new comment to a job, asset, invoice, quote, deficiency or location. Each call creates one more comment (not idempotent: do not retry blindly). ServiceTrade API: POST /comment.
輸入結構描述
{
"type": "object",
"properties": {
"entityType": {
"type": "string",
"enum": [
"asset",
"job",
"invoice",
"quote",
"deficiency",
"location"
],
"description": "The kind of record to comment on."
},
"entityId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The record id."
},
"content": {
"type": "string",
"minLength": 1,
"maxLength": 5000,
"description": "The comment text."
},
"visibility": {
"description": "Who can see it (default: ServiceTrade default). Assets accept only public and tech.",
"type": "array",
"items": {
"type": "string",
"enum": [
"public",
"schedule",
"tech",
"billing"
]
}
}
},
"required": [
"entityType",
"entityId",
"content"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據