MCP
Not under /api/v1. Same Bearer token.
GET /mcp
POST /mcpGET https://app.gymmaintain.com/mcp returns server info (name, version, protocol, auth).
POST is JSON-RPC 2.0. Methods: initialize, tools/list, tools/call. Tools always run in the tenant of the token.
Tools, one row, required vs optional arguments:
| Tool | Required | Optional |
|---|---|---|
list_machines | — | location |
get_machine | machine_id | — |
report_ticket | machine_id, description | reporter_name |
list_open_tickets | — | — |
update_ticket_status | ticket_id, status | — |
list_exercises | — | machine_id |
upcoming_maintenance | — | days (default 14) |
list_workorders | — | status |
update_workorder_status | workorder_id, status | resolution |
complete_maintenance | task_id | — |
list_parts | — | low_stock |
list_locations | — | — |
list_suppliers | — | — |
list_inspections | — | machine_id, failed |
create_inspection | machine_id, passed | inspector, notes, inspected_at, next_due_at, signature, checklist, blocked_machine |
list_incidents | — | status, machine_id |
report_incident | machine_id, description | reporter_name, involved_person, injury, occurred_at, blocked_machine |
list_reporters | — | q |
list_quotes | — | status |
list_purchase_orders | — | status |
list_warranty_claims | — | status |
list_contracts | — | status |
list_floor_plans | — | location_id |
get_ticket | ticket_id | — |
list_notes | notable_type, notable_id | — |
add_note | notable_type, notable_id, body | — |
update_ticket_status.status: new | reviewed | planned | in_progress | waiting_parts | waiting_supplier | resolved | wont_fix.
update_workorder_status.status: open | planned | in_progress | waiting_parts | completed | cancelled.
list_incidents.status: open | investigating | resolved | closed.
create_inspection: a failed inspection sets the machine to out_of_service, even without blocked_machine. That differs from POST /inspections, where that only happens together with blocked_machine.
report_incident requires an existing machine_id. blocked_machine sets the machine to out_of_service.
list_notes / add_note use notable_id (uuid or numeric id; notable_uuid is also accepted) and the same notable_type values as POST /notes.
curl -X POST https://app.gymmaintain.com/mcp \
-H "Authorization: Bearer gm_..." -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"add_note","arguments":{"notable_type":"machine","notable_id":"<uuid>","body":"Grease after the summer break"}}}'