{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "doingwork.work",
    "site": "doingwork.work",
    "addresses": [
      {
        "address": "104.21.35.93",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.21.32.0/20",
          "country": "US"
        }
      },
      {
        "address": "172.67.217.12",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "172.67.208.0/20",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3035::6815:235d",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3035::/48",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3037::ac43:d90c",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3037::/48",
          "country": "US"
        }
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "104.21.35.93",
          "172.67.217.12",
          "2606:4700:3035::6815:235d",
          "2606:4700:3037::ac43:d90c"
        ],
        "first_seen": "2026-11-21T20:28:01.494Z",
        "last_seen": "2026-11-21T20:28:01.494Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "doing-work",
      "version": "2026-11-01",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "cloudflare",
      "strict-transport-security": "max-age=31536000"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 1,
      "sample": [
        {
          "id": "48038",
          "url": "https://app.doingwork.work/mcp/home",
          "server_name": "work.doingwork/home",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T20:27:01.617Z"
        }
      ]
    },
    "same_site": {
      "total": 1,
      "sample": [
        {
          "id": "48038",
          "url": "https://app.doingwork.work/mcp/home",
          "server_name": "work.doingwork/home",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T20:27:01.617Z"
        }
      ]
    },
    "same_tool_list": {
      "total": 1,
      "sample": [
        {
          "id": "48038",
          "url": "https://app.doingwork.work/mcp/home",
          "server_name": "work.doingwork/home",
          "last_state": "listed",
          "last_checked_at": "2026-11-21T20:27:01.617Z"
        }
      ]
    },
    "same_publisher": {
      "publisher": "work.doingwork",
      "total": 1,
      "sample": [
        {
          "name": "work.doingwork/home",
          "title": "Home Service Quotes by Doing Work"
        }
      ]
    },
    "same_repository": {
      "repository_url": "https://github.com/doingwork-hq/doing-work-mcp",
      "total": 0,
      "sample": []
    },
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "48039",
    "server_name": "work.doingwork/shop",
    "url": "https://doingwork.work/mcp",
    "host": "doingwork.work",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-21T20:28:01.494Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "ce3512d16cfd75c62c8803352692f2b6d6a0a9e3ac5e7f593bc30d650ebdf1ea",
    "first_listed_at": "2026-11-21T20:28:01.494Z",
    "created_at": "2026-11-21T13:40:10.028Z",
    "resolved_addresses": [
      "104.21.35.93",
      "172.67.217.12",
      "2606:4700:3035::6815:235d",
      "2606:4700:3037::ac43:d90c"
    ]
  },
  "server": {
    "name": "work.doingwork/shop",
    "title": "Field Service Business Platform by Doing Work",
    "description": "Headless field service software. Your AI agent runs jobs, schedules, quotes, invoices and payments.",
    "version": "1.0.3",
    "registry_status": "active",
    "repository_url": "https://github.com/doingwork-hq/doing-work-mcp",
    "website_url": "https://doingwork.work/ai/",
    "published_at": "2026-11-18T20:09:24.038Z",
    "updated_at": "2026-11-18T20:09:24.038Z",
    "first_seen": "2026-11-21T13:35:06.621Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [
      "runs-agents",
      "takes-payment"
    ],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T16:10:08.001Z"
  },
  "operator": null,
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 1,
    "answered": 1,
    "answered_percent": 100,
    "avg_listing_latency_ms": 1182,
    "first_check_in_window": "2026-11-21T20:28:01.494Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "ce3512d16cfd75c62c8803352692f2b6d6a0a9e3ac5e7f593bc30d650ebdf1ea",
    "tools": 440,
    "resources": 0,
    "prompts": 0,
    "first_seen": "2026-11-21T20:27:02.442Z",
    "tool_names": [
      "auth_requestLink",
      "auth_sendLink",
      "auth_oauthRegister",
      "auth_oauthAuthorize",
      "auth_oauthToken",
      "me_get",
      "me_start",
      "me_shops",
      "shops_create",
      "members_invite",
      "members_resendInvite",
      "members_sendPage",
      "members_accept",
      "members_list",
      "members_end",
      "members_changeRole",
      "jobs_create",
      "jobs_list",
      "jobs_get",
      "media_requestUpload",
      "media_requestCustomerUpload",
      "media_videoPartUrls",
      "media_completeVideoUpload",
      "media_abortVideoUpload",
      "media_list",
      "media_map",
      "media_get",
      "jobs_requestConfirmation",
      "media_setSummary",
      "media_needsSummary",
      "quotes_create",
      "quotes_send",
      "quotes_revise",
      "quotes_withdraw",
      "quotes_get",
      "quotes_list",
      "subcontractors_get",
      "subcontractors_prepare",
      "payments_connectLink",
      "invoices_createFromQuote",
      "invoices_send",
      "invoices_markPaidOutside",
      "invoices_refund",
      "fees_schedule",
      "fees_preview",
      "fees_statement",
      "records_keys",
      "jobs_record",
      "webhooks_create",
      "webhooks_list",
      "webhooks_delete",
      "audit_list",
      "platforms_create",
      "platforms_list",
      "platforms_revokeManage",
      "customers_create",
      "customers_get",
      "customers_list",
      "customers_search",
      "customers_update",
      "customers_archive",
      "customers_duplicates",
      "customers_merge",
      "customers_contactAdd",
      "customers_contactUpdate",
      "properties_add",
      "properties_list",
      "properties_update",
      "equipment_add",
      "equipment_list",
      "equipment_update",
      "jobs_setTags",
      "customers_timeline",
      "customers_statement",
      "customers_privacyExport",
      "fields_define",
      "fields_list",
      "fields_set",
      "fields_get",
      "requests_create",
      "requests_list",
      "requests_pipeline",
      "requests_get",
      "requests_update",
      "requests_convert",
      "requests_formCreate",
      "requests_submitForm",
      "visits_createRecurring",
      "visits_cancelSeries",
      "visits_start",
      "visits_done",
      "visits_create",
      "visits_update",
      "visits_assign",
      "visits_cancel",
      "visits_setPriority",
      "dispatch_suggest",
      "visits_get",
      "schedule_list",
      "routes_setLocation"
    ],
    "declared": {
      "tools": [
        {
          "name": "auth_requestLink",
          "description": "Email a one-time sign-in link. Always answers ok, so it never reveals whether an email has an account.",
          "inputSchema": {
            "type": "object",
            "required": [
              "email"
            ],
            "properties": {
              "next": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "auth_sendLink",
          "description": "Email a person a one-time sign-in link that opens a named Doing Work screen after they sign in, so an agent can hand its person straight to the page that needs a human (brand, terms, job photos and so on). The screen comes from a fixed list: today, prices, brand, payments, resume, terms, transfer, close, work, capture, subcontractors, claim, card, hub, board, override, start. Shop screens take shop_id; capture and subcontractors take job_id; claim is refused here, because the agent connect flow sends its own link; board takes shop_id and an optional date; override takes kind (job or visit) and id; card and hub take the key from their link. To send a page to a named member of your shop with role and assignment checks, use members.sendPage. The link works once, in any browser, and expires in 15 minutes. Always answers ok, so it never reveals whether an email has an account. The page still checks that the person may see it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "email",
              "screen"
            ],
            "properties": {
              "email": {
                "type": "string"
              },
              "params": {
                "type": "object",
                "description": "Values the screen reads, such as shop_id or job_id.",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "screen": {
                "enum": [
                  "today",
                  "prices",
                  "brand",
                  "payments",
                  "resume",
                  "terms",
                  "transfer",
                  "close",
                  "work",
                  "capture",
                  "subcontractors",
                  "claim",
                  "card",
                  "hub",
                  "board",
                  "override",
                  "start"
                ],
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "ok",
              "opens"
            ],
            "properties": {
              "ok": {
                "type": "boolean"
              },
              "opens": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "auth_oauthRegister",
          "description": "Register an OAuth client (RFC 7591 dynamic registration). Public clients only: PKCE, no secret. Redirects must be https, or http on loopback.",
          "inputSchema": {
            "type": "object",
            "required": [
              "redirect_uris"
            ],
            "properties": {
              "scope": {
                "type": "string"
              },
              "tos_uri": {
                "type": "string"
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "logo_uri": {
                "type": "string"
              },
              "client_uri": {
                "type": "string"
              },
              "policy_uri": {
                "type": "string"
              },
              "client_name": {
                "type": "string"
              },
              "grant_types": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "software_id": {
                "type": "string"
              },
              "redirect_uris": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "response_types": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "software_version": {
                "type": "string"
              },
              "token_endpoint_auth_method": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "auth_oauthAuthorize",
          "description": "A signed-in person approves an agent client. Returns the redirect with a one-time code (PKCE S256). Needs a browser session, not an agent token. `resource` (RFC 8707) binds the token to this server's MCP endpoint.",
          "inputSchema": {
            "type": "object",
            "required": [
              "client_id",
              "redirect_uri",
              "code_challenge",
              "code_challenge_method"
            ],
            "properties": {
              "scope": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "shop_id": {
                "type": "string"
              },
              "resource": {
                "type": "string"
              },
              "client_id": {
                "type": "string"
              },
              "redirect_uri": {
                "type": "string"
              },
              "response_type": {
                "enum": [
                  "code"
                ],
                "type": "string"
              },
              "code_challenge": {
                "type": "string"
              },
              "code_challenge_method": {
                "enum": [
                  "S256"
                ],
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "auth_oauthToken",
          "description": "Exchange an authorization code and PKCE verifier, or a refresh token, for a short-lived agent access token and a new refresh token. Refresh tokens rotate: each works once (with a 60-second retry window for simultaneous refreshes), and reusing one after that window revokes the whole chain. With grant_type urn:workos:agent-auth:grant-type:claim and your claim_token (auth.md), poll every interval only while the error is authorization_pending. slow_down means wait longer and poll again. access_denied, expired_token, and invalid_grant end this claim. Also stop when expires_in has passed. shown_once is only on success. Success hands over a named agent key once (no refresh token, it does not expire until revoked).",
          "inputSchema": {
            "type": "object",
            "required": [
              "grant_type"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "scope": {
                "type": "string"
              },
              "resource": {
                "type": "string"
              },
              "client_id": {
                "type": "string"
              },
              "grant_type": {
                "enum": [
                  "authorization_code",
                  "refresh_token",
                  "urn:workos:agent-auth:grant-type:claim"
                ],
                "type": "string"
              },
              "claim_token": {
                "type": "string"
              },
              "redirect_uri": {
                "type": "string"
              },
              "code_verifier": {
                "type": "string"
              },
              "refresh_token": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "me_get",
          "description": "The signed-in person. Call me.start for shops, what this connection can do, and the next tasks.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "id",
              "email",
              "display_name",
              "next"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "next": {
                "type": "string"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_name": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "me_start",
          "description": "Start here. Shops this connection can use, the grant in plain words, counts, and the next tasks for the state of each shop.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "grant",
              "binding",
              "bound_shop_id",
              "shops",
              "can",
              "cannot",
              "tasks",
              "next_actions",
              "fees",
              "approvals",
              "next"
            ],
            "properties": {
              "can": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "fees": {
                "type": "object",
                "required": [
                  "tool",
                  "say"
                ],
                "properties": {
                  "say": {
                    "type": "string"
                  },
                  "tool": {
                    "type": "string"
                  }
                }
              },
              "next": {
                "type": "string"
              },
              "grant": {
                "type": "string"
              },
              "shops": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "shop_id",
                    "name",
                    "role",
                    "customers",
                    "open_jobs",
                    "draft_quotes",
                    "open_invoices"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "customers": {
                      "type": "integer"
                    },
                    "open_jobs": {
                      "type": "integer"
                    },
                    "draft_quotes": {
                      "type": "integer"
                    },
                    "open_invoices": {
                      "type": "integer"
                    }
                  }
                }
              },
              "tasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "shop_id",
                    "say",
                    "tool",
                    "argument"
                  ],
                  "properties": {
                    "say": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "shop_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "argument": {
                      "type": "string"
                    }
                  }
                }
              },
              "cannot": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "binding": {
                "type": "string"
              },
              "approvals": {
                "type": "object",
                "required": [
                  "tool",
                  "say"
                ],
                "properties": {
                  "say": {
                    "type": "string"
                  },
                  "tool": {
                    "type": "string"
                  }
                }
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "bound_shop_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "me_shops",
          "description": "Shops the signed-in person belongs to right now, with their role. A shop key gets only the one shop that key is bound to.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "cursor": {
                "type": "string",
                "maxLength": 500
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data",
              "next_cursor"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "shop_id",
                    "name",
                    "role"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shops_create",
          "description": "Create a shop. The caller becomes its one owner. The caller must already have accepted the current Terms and Privacy, once for their account, which covers every shop. Until then this call is refused and names /p/legal. On the sign-up page, one checkbox records both current versions (accept_terms_version) with the version, time, IP address and browser. A person who already accepted is not asked again. An agent cannot agree for them. owner_name, when it is a real name, replaces a display name that is only the email local part.",
          "inputSchema": {
            "type": "object",
            "required": [
              "name",
              "jurisdiction"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "lead_code": {
                "type": "string",
                "description": "Optional internal acquisition or campaign tracking code for this shop."
              },
              "owner_name": {
                "type": "string",
                "description": "The person's name, when they typed one. Replaces a display name that is only the email local part."
              },
              "jurisdiction": {
                "type": "string"
              },
              "partner_code": {
                "type": "string",
                "description": "Optional affiliate partner or referral code for this shop."
              },
              "referral_code": {
                "type": "string",
                "description": "Optional alias for partner_code."
              },
              "accept_terms_version": {
                "type": "string",
                "description": "Sign-up page only: the person agreed to the current Terms and Privacy Policy"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "members_invite",
          "description": "Invite a person by email as office, lead or field. Owners and office can invite. A lead cannot. The invite link works once. Shop roles are owner, office, lead and field.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "email",
              "role"
            ],
            "properties": {
              "role": {
                "enum": [
                  "office",
                  "lead",
                  "field"
                ],
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "shop_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "members_resendInvite",
          "description": "Email an open invite again with a new link, for a worker or office member who lost it or let it expire. The old invite is revoked and a new one is made with the same email and role: use the invite_id this returns from now on. The new link works once for 14 days. Owners and office only. Accepted or revoked invites are refused.",
          "inputSchema": {
            "type": "object",
            "required": [
              "invite_id"
            ],
            "properties": {
              "invite_id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "invite_id",
                  "expires_at"
                ],
                "properties": {
                  "invite_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "members_sendPage",
          "description": "Email a current member of your shop a one-time sign-in link that opens one page: board (the day board, for owner or office), override (mark a job or visit done anyway, owner only), or capture (job photos, for anyone on the job; a field worker must be assigned to a visit on it). Owners and office only. The member is named by membership_id, so the link only goes to someone in the shop. The link works once and expires in 15 minutes. The page still checks access when it opens.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "membership_id",
              "screen"
            ],
            "properties": {
              "params": {
                "type": "object",
                "description": "board: date (YYYY-MM-DD, optional). override: kind (job or visit) and id. capture: job_id.",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "screen": {
                "enum": [
                  "board",
                  "override",
                  "capture"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string"
              },
              "membership_id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "ok",
                  "opens"
                ],
                "properties": {
                  "ok": {
                    "type": "boolean"
                  },
                  "opens": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "members_accept",
          "description": "Accept an invite as the signed-in person. The invite email must match yours.",
          "inputSchema": {
            "type": "object",
            "required": [
              "token"
            ],
            "properties": {
              "token": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "members_list",
          "description": "Current members of a shop with role and start date. Role is owner, office, lead or field.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string"
              },
              "include_ended": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "members"
            ],
            "properties": {
              "members": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "membership_id",
                    "person_id",
                    "display_name",
                    "role",
                    "started_at",
                    "ended_at",
                    "ended_reason"
                  ],
                  "properties": {
                    "role": {
                      "type": "string"
                    },
                    "ended_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "person_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "started_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "ended_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "membership_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "members_end",
          "description": "End a membership: the owner removes a worker, or a worker leaves. Shop tokens end with it. The owner cannot leave; ownership moves only by transfer.",
          "inputSchema": {
            "type": "object",
            "required": [
              "membership_id"
            ],
            "properties": {
              "membership_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "members_changeRole",
          "description": "Owner changes a worker among office, lead and field. The old membership ends and a new one starts, so history keeps both. Shop roles are owner, office, lead and field.",
          "inputSchema": {
            "type": "object",
            "required": [
              "membership_id",
              "role"
            ],
            "properties": {
              "role": {
                "enum": [
                  "office",
                  "lead",
                  "field"
                ],
                "type": "string"
              },
              "membership_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "jobs_create",
          "description": "Start a job at a home, found or created from the address: address is an object, not a string, with required line1, locality, postal_code and jurisdiction (line2 is optional; jurisdiction is an ISO 3166-2 code like US-ID, and a US shop also accepts ID, id, or Idaho), for example {\"line1\":\"100 Test St\",\"locality\":\"Boise\",\"postal_code\":\"83702\",\"jurisdiction\":\"US-ID\"}.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "address"
            ],
            "properties": {
              "address": {
                "type": "object",
                "example": {
                  "line1": "100 Test St",
                  "locality": "Boise",
                  "postal_code": "83702",
                  "jurisdiction": "US-ID"
                },
                "required": [
                  "line1",
                  "locality",
                  "postal_code",
                  "jurisdiction"
                ],
                "properties": {
                  "line1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "locality": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "jurisdiction": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "ISO 3166-2 like US-ID. ID, id, and Idaho are accepted for a US shop."
                  }
                },
                "description": "address is an object, not a string, with required line1, locality, postal_code and jurisdiction (line2 is optional; jurisdiction is an ISO 3166-2 code like US-ID, and a US shop also accepts ID, id, or Idaho), for example {\"line1\":\"100 Test St\",\"locality\":\"Boise\",\"postal_code\":\"83702\",\"jurisdiction\":\"US-ID\"}"
              },
              "shop_id": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              },
              "customer_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "jobs_list",
          "description": "Jobs of a shop you belong to, newest first. A field worker sees only jobs with a visit they are assigned to. A lead also sees jobs their crew is on. Another shop is refused, including a shop token pointed at a different shop. Optional status filter. Shop roles are owner, office, lead and field.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many jobs to return (default 50). An integer, or a numeric string such as \"50\"."
              },
              "status": {
                "type": "string"
              },
              "shop_id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "time_zone",
              "summary",
              "display",
              "jobs"
            ],
            "properties": {
              "jobs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "status",
                    "kind",
                    "summary",
                    "occurred_at",
                    "home_id",
                    "address_line1",
                    "locality",
                    "customer_id"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "enum": [
                        "open",
                        "quoted",
                        "scheduled",
                        "in_progress",
                        "done",
                        "cancelled"
                      ],
                      "type": "string"
                    },
                    "home_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "locality": {
                      "type": "string"
                    },
                    "customer_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "address_line1": {
                      "type": "string"
                    }
                  }
                }
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "time_zone": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "jobs_get",
          "description": "One job with its home address and, when it was converted from a request, that request. A field worker gets not found unless they are assigned to a visit on it. A lead also gets a job their crew is on. Notes on the job are notes_list and notes_add (target_kind job, target_id this job_id), not fields on this result.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "shop_id",
              "status",
              "kind",
              "summary",
              "occurred_at",
              "customer_id",
              "home_id",
              "request_id",
              "address_line1",
              "address_line2",
              "locality",
              "postal_code",
              "jurisdiction_id",
              "next",
              "next_actions"
            ],
            "properties": {
              "kind": {
                "type": "string"
              },
              "next": {
                "type": "string"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string"
              },
              "home_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "summary": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "locality": {
                "type": "string"
              },
              "request_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "customer_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "postal_code": {
                "type": "string"
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "address_line1": {
                "type": "string"
              },
              "address_line2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "jurisdiction_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_requestUpload",
          "description": "Get a signed upload URL for a job photo or video. Before you call this, look at the file and say what it shows in summary: plain words, findings, any text you can read (model and serial plates), measurements, and for video a transcript, key moments and the length. If what you see does not match what the worker said, tell the worker before you upload. If you cannot look at it, send summary.unable_to_analyze with a reason and the media is listed by media.needsSummary. Summaries stay inside the shop and are searchable with media.list q and search.global. Photos: JPEG, PNG, WebP, HEIC or TIFF (HEIC and TIFF are kept as sent, with a JPEG copy for viewing). Video: MP4, MOV or WebM. Without object storage it is kept on this server, at most 100 MB and 10 minutes, and is not shared outside the shop. When R2 is configured, a video is uploaded in parts directly to storage (mode multipart, then media.videoPartUrls, media.completeVideoUpload or media.abortVideoUpload), up to 2 GB and 30 minutes unless DW_MAX_VIDEO_BYTES or DW_MAX_VIDEO_SECONDS set a different cap, and it can be included on a share link. The server does not download the video to recheck the hash. Declare the sha256 of the bytes you will send as exactly 64 hex characters (upper or lower case). Anything else is refused and no upload link is made. The upload is rejected if the bytes differ. Taken time, GPS location, heading and camera details are read from photos and kept for your shop. Copies shared outside the shop (share links, quote pages, PDFs) have that metadata removed. Pass provided_by customer when the customer sent the file, and channel for how it arrived (upload, email, text, capture, network_request, import). customer_id is optional and must be a customer of this shop.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "stage",
              "sha256",
              "summary"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "photo",
                  "video"
                ],
                "type": "string",
                "description": "Default photo"
              },
              "stage": {
                "enum": [
                  "before",
                  "during",
                  "after",
                  "other"
                ],
                "type": "string"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "sha256": {
                "type": "string",
                "format": "sha256",
                "description": "SHA-256 of the bytes you will upload, exactly 64 hex characters."
              },
              "channel": {
                "enum": [
                  "upload",
                  "email",
                  "text",
                  "capture",
                  "network_request",
                  "import"
                ],
                "type": "string",
                "description": "How the file arrived. Default upload."
              },
              "summary": {
                "type": "object",
                "properties": {
                  "notable": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "kind",
                        "text"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "damage",
                            "leak",
                            "safety",
                            "code_issue",
                            "wear",
                            "pest",
                            "mold",
                            "access",
                            "other"
                          ],
                          "type": "string"
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 500,
                          "description": "What and where, in a sentence"
                        }
                      }
                    },
                    "maxItems": 20,
                    "description": "Findings worth a second look."
                  },
                  "summary": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "Plain words a worker can read later: what the photo or video shows, where, and its condition. 1 to 4000 characters."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language of the transcript, such as en or es"
                  },
                  "transcript": {
                    "type": "string",
                    "maxLength": 100000,
                    "description": "Video only: what was said, as words. Leave out if nobody spoke."
                  },
                  "key_moments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "at_seconds",
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string",
                          "maxLength": 500,
                          "description": "What happens then"
                        },
                        "at_seconds": {
                          "type": "number",
                          "minimum": 0
                        }
                      }
                    },
                    "maxItems": 100,
                    "description": "Video only: the moments that matter."
                  },
                  "generated_by": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Which agent or model wrote this, such as your product name. Required with summary."
                  },
                  "measurements": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "what",
                        "value",
                        "unit",
                        "how"
                      ],
                      "properties": {
                        "how": {
                          "enum": [
                            "read",
                            "estimated"
                          ],
                          "type": "string"
                        },
                        "unit": {
                          "type": "string",
                          "maxLength": 20,
                          "description": "Unit, such as in, ft, psi, F"
                        },
                        "what": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "What was measured"
                        },
                        "value": {
                          "type": "number"
                        }
                      }
                    },
                    "maxItems": 30,
                    "description": "Sizes and readings. Say whether you read it off a tape or gauge, or estimated it."
                  },
                  "readable_text": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "what",
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string",
                          "maxLength": 300,
                          "description": "Exactly what it says"
                        },
                        "what": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "What it is, such as model number or serial number"
                        }
                      }
                    },
                    "maxItems": 30,
                    "description": "Text you could read: model and serial plates, labels, gauges, signs. Copy it exactly."
                  },
                  "duration_seconds": {
                    "type": "number",
                    "description": "Video only and required for video: length in seconds, at most 600."
                  },
                  "unable_to_analyze": {
                    "type": "object",
                    "required": [
                      "reason"
                    ],
                    "properties": {
                      "detail": {
                        "type": "string",
                        "maxLength": 500,
                        "description": "A sentence on why"
                      },
                      "reason": {
                        "enum": [
                          "no_vision",
                          "no_video",
                          "file_unreadable",
                          "too_large",
                          "not_allowed",
                          "other"
                        ],
                        "type": "string"
                      }
                    },
                    "description": "Send this instead of summary when you cannot look at the file. The upload still goes through and the media is listed by media.needsSummary until someone summarizes it."
                  }
                },
                "description": "What you saw in the file. Look at the photo or watch the video before you upload it. Send either summary (with generated_by) or unable_to_analyze, never both."
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "provided_by": {
                "enum": [
                  "shop",
                  "customer"
                ],
                "type": "string",
                "description": "Default shop. customer when the customer sent the file."
              },
              "content_type": {
                "enum": [
                  "mp4",
                  "mov",
                  "webm"
                ],
                "type": "string",
                "description": "Video only, when it uploads in parts. Default mp4."
              },
              "shows_interior": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_requestCustomerUpload",
          "description": "Make an expiring link the customer opens with no account and uses to send photos or videos for one job. The link lasts days (1 to 14, default 7). Each file is saved as provided_by customer and channel upload, with the same size limits, type checks, and location handling as a shop upload: the shop keeps camera details, and copies that leave the shop have them removed. Pass customer_id to name the customer, or leave it out to use the job's customer.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "maximum": 14,
                "minimum": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "upload_url",
                  "expires_at",
                  "job_id",
                  "customer_id"
                ],
                "properties": {
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "upload_url": {
                    "type": "string"
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_videoPartUrls",
          "description": "Presigned URLs for the parts of a video upload that media.requestUpload started in multipart mode. Each URL accepts one PUT of part_size bytes (the last part may be shorter) and expires in 20 minutes. Ask again for the next parts. The server never sees the bytes.",
          "inputSchema": {
            "type": "object",
            "required": [
              "upload_token",
              "part_numbers"
            ],
            "properties": {
              "part_numbers": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "maximum": 10000,
                  "minimum": 1
                },
                "maxItems": 100,
                "minItems": 1
              },
              "upload_token": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 20
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "part_size",
              "urls"
            ],
            "properties": {
              "urls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "part_number",
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "part_number": {
                      "type": "integer"
                    }
                  }
                }
              },
              "part_size": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_completeVideoUpload",
          "description": "Finish a part upload after every part has been sent. Send each part number and the ETag the storage returned. The server checks the size and the first bytes, then saves the video on the job. It does not download the video.",
          "inputSchema": {
            "type": "object",
            "required": [
              "upload_token",
              "parts"
            ],
            "properties": {
              "parts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "part_number",
                    "etag"
                  ],
                  "properties": {
                    "etag": {
                      "type": "string",
                      "maxLength": 128,
                      "minLength": 1
                    },
                    "part_number": {
                      "type": "integer",
                      "maximum": 10000,
                      "minimum": 1
                    }
                  }
                },
                "maxItems": 10000,
                "minItems": 1
              },
              "upload_token": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 20
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "media_id",
                  "bytes",
                  "content_type",
                  "sha256"
                ],
                "properties": {
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "media_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "content_type": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_abortVideoUpload",
          "description": "Stop a part upload and drop the parts already sent. The video is not saved.",
          "inputSchema": {
            "type": "object",
            "required": [
              "upload_token"
            ],
            "properties": {
              "upload_token": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 20
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "aborted"
                ],
                "properties": {
                  "aborted": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "media_list",
          "description": "List the photos and videos you are allowed to see, with what the agent said each shows (summary), who provided each file (shop or customer), the channel it arrived on, taken time, GPS location, heading and camera details. Filter by job, kind, words in the summary or transcript (q), summary status, distance from a point, taken time, or whether it has a location.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "q": {
                "type": "string",
                "description": "Words to find in what agents said the photo or video shows: summary, readable text such as serial numbers, findings and video transcripts"
              },
              "kind": {
                "enum": [
                  "photo",
                  "video"
                ],
                "type": "string",
                "description": "Only photos or only videos"
              },
              "sort": {
                "enum": [
                  "uploaded",
                  "taken",
                  "taken_desc",
                  "distance"
                ],
                "type": "string",
                "description": "Default uploaded; distance needs near_lat and near_lng"
              },
              "limit": {
                "type": "integer",
                "maximum": 500,
                "minimum": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid",
                "description": "Only photos on this job. Leave out to search every photo you can see."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "near_lat": {
                "type": "number",
                "description": "Latitude of a point; with near_lng and radius_m, only photos taken within radius_m of it"
              },
              "near_lng": {
                "type": "number"
              },
              "radius_m": {
                "type": "number",
                "description": "Search radius in meters (default 200, max 50000)"
              },
              "taken_after": {
                "type": "string",
                "description": "ISO date or time: photos taken at or after this"
              },
              "has_location": {
                "enum": [
                  "true",
                  "false"
                ],
                "type": "string",
                "description": "Only photos with (true) or without (false) GPS"
              },
              "taken_before": {
                "type": "string",
                "description": "ISO date or time: photos taken before this"
              },
              "summary_status": {
                "enum": [
                  "summarized",
                  "needs_summary"
                ],
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_map",
          "description": "Photos with a GPS location as a GeoJSON FeatureCollection (points in longitude, latitude order), ready for a map. Takes the same filters as media.list.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "q": {
                "type": "string",
                "description": "Words to find in what agents said the photo or video shows: summary, readable text such as serial numbers, findings and video transcripts"
              },
              "kind": {
                "enum": [
                  "photo",
                  "video"
                ],
                "type": "string",
                "description": "Only photos or only videos"
              },
              "sort": {
                "enum": [
                  "uploaded",
                  "taken",
                  "taken_desc",
                  "distance"
                ],
                "type": "string",
                "description": "Default uploaded; distance needs near_lat and near_lng"
              },
              "limit": {
                "type": "integer",
                "maximum": 500,
                "minimum": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid",
                "description": "Only photos on this job. Leave out to search every photo you can see."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "near_lat": {
                "type": "number",
                "description": "Latitude of a point; with near_lng and radius_m, only photos taken within radius_m of it"
              },
              "near_lng": {
                "type": "number"
              },
              "radius_m": {
                "type": "number",
                "description": "Search radius in meters (default 200, max 50000)"
              },
              "taken_after": {
                "type": "string",
                "description": "ISO date or time: photos taken at or after this"
              },
              "has_location": {
                "enum": [
                  "true",
                  "false"
                ],
                "type": "string",
                "description": "Only photos with (true) or without (false) GPS"
              },
              "taken_before": {
                "type": "string",
                "description": "ISO date or time: photos taken before this"
              },
              "summary_status": {
                "enum": [
                  "summarized",
                  "needs_summary"
                ],
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "type",
              "features"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "features": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "type",
                    "id",
                    "geometry",
                    "properties"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "type": {
                      "type": "string"
                    },
                    "geometry": {
                      "type": "object",
                      "required": [
                        "type",
                        "coordinates"
                      ],
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "coordinates": {
                          "type": "array",
                          "items": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "properties": {
                      "type": "object",
                      "required": [
                        "id",
                        "job_id",
                        "home_id",
                        "stage",
                        "source",
                        "provided_by",
                        "channel",
                        "customer_id",
                        "shows_interior",
                        "sha256",
                        "uploaded_at",
                        "uploaded_by",
                        "taken_at",
                        "taken_at_local",
                        "gps_heading",
                        "gps_accuracy_m",
                        "camera_make",
                        "camera_model",
                        "lens",
                        "orientation",
                        "width",
                        "height",
                        "has_original",
                        "original_content_type",
                        "kind",
                        "content_type",
                        "bytes",
                        "summary"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "kind": {
                          "type": "string"
                        },
                        "lens": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "bytes": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "stage": {
                          "type": "string"
                        },
                        "width": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "height": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "job_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "sha256": {
                          "type": "string"
                        },
                        "source": {
                          "type": "string"
                        },
                        "channel": {
                          "type": "string"
                        },
                        "home_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "summary": {
                          "type": "object"
                        },
                        "taken_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "distance_m": {
                          "type": "number"
                        },
                        "camera_make": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "customer_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "gps_heading": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "orientation": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "provided_by": {
                          "type": "string"
                        },
                        "uploaded_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "uploaded_by": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "camera_model": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "content_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_original": {
                          "type": "boolean"
                        },
                        "gps_accuracy_m": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "shows_interior": {
                          "type": "boolean"
                        },
                        "taken_at_local": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "original_content_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_get",
          "description": "One photo or video's details, including its full summary (findings, readable text, measurements, transcript and key moments), taken time, location, camera fields and the full metadata read from the file. Set include_content to get the stored bytes as base64 (metadata included), or include_original to get the original HEIC or TIFF when the photo was converted.",
          "inputSchema": {
            "type": "object",
            "required": [
              "media_id"
            ],
            "properties": {
              "media_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_content": {
                "enum": [
                  "true",
                  "false"
                ],
                "type": "string"
              },
              "include_original": {
                "enum": [
                  "true",
                  "false"
                ],
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "jobs_requestConfirmation",
          "description": "Get a single-use link the customer opens to confirm the work was done (or flag a problem).",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_setSummary",
          "description": "Write or correct what a photo or video shows. Use it to fix a summary, to fill in one marked needs_summary (older photos and browser captures have none), or after a person edits the words. Each change keeps the earlier wording. Workers on the shop can edit; the summary is never shown to customers.",
          "inputSchema": {
            "type": "object",
            "required": [
              "media_id",
              "summary"
            ],
            "properties": {
              "summary": {
                "type": "object",
                "properties": {
                  "notable": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "kind",
                        "text"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "damage",
                            "leak",
                            "safety",
                            "code_issue",
                            "wear",
                            "pest",
                            "mold",
                            "access",
                            "other"
                          ],
                          "type": "string"
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 500,
                          "description": "What and where, in a sentence"
                        }
                      }
                    },
                    "maxItems": 20,
                    "description": "Findings worth a second look."
                  },
                  "summary": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "Plain words a worker can read later: what the photo or video shows, where, and its condition. 1 to 4000 characters."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language of the transcript, such as en or es"
                  },
                  "transcript": {
                    "type": "string",
                    "maxLength": 100000,
                    "description": "Video only: what was said, as words. Leave out if nobody spoke."
                  },
                  "key_moments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "at_seconds",
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string",
                          "maxLength": 500,
                          "description": "What happens then"
                        },
                        "at_seconds": {
                          "type": "number",
                          "minimum": 0
                        }
                      }
                    },
                    "maxItems": 100,
                    "description": "Video only: the moments that matter."
                  },
                  "generated_by": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Which agent or model wrote this, such as your product name. Required with summary."
                  },
                  "measurements": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "what",
                        "value",
                        "unit",
                        "how"
                      ],
                      "properties": {
                        "how": {
                          "enum": [
                            "read",
                            "estimated"
                          ],
                          "type": "string"
                        },
                        "unit": {
                          "type": "string",
                          "maxLength": 20,
                          "description": "Unit, such as in, ft, psi, F"
                        },
                        "what": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "What was measured"
                        },
                        "value": {
                          "type": "number"
                        }
                      }
                    },
                    "maxItems": 30,
                    "description": "Sizes and readings. Say whether you read it off a tape or gauge, or estimated it."
                  },
                  "readable_text": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "what",
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string",
                          "maxLength": 300,
                          "description": "Exactly what it says"
                        },
                        "what": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "What it is, such as model number or serial number"
                        }
                      }
                    },
                    "maxItems": 30,
                    "description": "Text you could read: model and serial plates, labels, gauges, signs. Copy it exactly."
                  },
                  "duration_seconds": {
                    "type": "number",
                    "description": "Video only and required for video: length in seconds, at most 600."
                  },
                  "unable_to_analyze": {
                    "type": "object",
                    "required": [
                      "reason"
                    ],
                    "properties": {
                      "detail": {
                        "type": "string",
                        "maxLength": 500,
                        "description": "A sentence on why"
                      },
                      "reason": {
                        "enum": [
                          "no_vision",
                          "no_video",
                          "file_unreadable",
                          "too_large",
                          "not_allowed",
                          "other"
                        ],
                        "type": "string"
                      }
                    },
                    "description": "Send this instead of summary when you cannot look at the file. The upload still goes through and the media is listed by media.needsSummary until someone summarizes it."
                  }
                },
                "description": "What you saw in the file. Look at the photo or watch the video before you upload it. Send either summary (with generated_by) or unable_to_analyze, never both."
              },
              "media_id": {
                "type": "string"
              },
              "edited_by_person": {
                "type": "boolean",
                "description": "True when a person wrote or changed these words, not your model"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "media_id",
                  "kind",
                  "summary",
                  "next_actions"
                ],
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "object"
                  },
                  "media_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "media_needsSummary",
          "description": "Photos and videos with no summary yet: older uploads, browser captures, and uploads whose agent could not look at the file. Open each with media.get include_content, look at it, then send media.setSummary.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "photo",
                  "video"
                ],
                "type": "string"
              },
              "limit": {
                "type": "integer",
                "maximum": 500,
                "minimum": 1
              },
              "job_id": {
                "type": "string"
              },
              "shop_id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "items",
              "total_in_shop"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "media_id",
                    "job_id",
                    "kind",
                    "stage",
                    "source",
                    "uploaded_at",
                    "unable_reason",
                    "unable_detail"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "stage": {
                      "type": "string"
                    },
                    "job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "source": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "uploaded_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "unable_detail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "unable_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "total_in_shop": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "quotes_create",
          "description": "Create a quote (AI can draft lines; a person who can send quotes approves agent-drafted lines before the quote is sent). Optional: good, better, best options and optional lines the customer picks when signing.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "lines"
            ],
            "properties": {
              "tm": {
                "type": "object",
                "required": [
                  "rate_unit",
                  "rate_minor"
                ],
                "properties": {
                  "cap_minor": {
                    "type": "integer",
                    "description": "Optional not-to-exceed amount. Billing stops there until a change order is approved."
                  },
                  "rate_unit": {
                    "enum": [
                      "hour",
                      "day"
                    ],
                    "type": "string"
                  },
                  "rate_minor": {
                    "type": "integer",
                    "description": "Price per worker per hour or day, in cents"
                  },
                  "hours_per_day": {
                    "type": "number",
                    "description": "Hours that make one day on a day rate. Default 8."
                  },
                  "rush_rate_minor": {
                    "type": "integer",
                    "description": "Optional higher rate for time the shop marks as rush"
                  },
                  "materials_markup_bps": {
                    "type": "integer",
                    "description": "Added to what the shop paid for materials, in basis points (2000 is 20%)"
                  }
                },
                "description": "Rush or open-ended work: the customer signs the rates, and invoices.createFromTm bills approved time and materials at them. Lines may then be empty."
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description",
                    "quantity",
                    "unit_price_minor"
                  ],
                  "properties": {
                    "kind": {
                      "enum": [
                        "item",
                        "fee",
                        "discount"
                      ],
                      "type": "string",
                      "description": "item (default), fee (trip charge, disposal, card fee) or discount. For a discount, enter the amount off as a positive unit_price_minor."
                    },
                    "taxable": {
                      "type": "boolean",
                      "description": "Counts toward tax when the quote or invoice has a tax rate. Default true."
                    },
                    "optional": {
                      "type": "boolean",
                      "description": "The customer can add or leave out this line when signing."
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "option_key": {
                      "type": "string",
                      "description": "Put this line only in the option with this key. Leave out for a line shared by every option."
                    },
                    "description": {
                      "type": "string"
                    },
                    "unit_price_minor": {
                      "type": "integer"
                    }
                  }
                }
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 8000,
                "description": "Written scope of work stored on this version. The customer page and PDF show it."
              },
              "job_id": {
                "type": "string"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "label"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Like good, better, best"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "description": "Good, better, best: 2 to 5 options the customer chooses one of when signing. Each needs its own lines."
              },
              "tax_rate_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Tax rate to charge (taxes.listRates). Leave out to use the shop default rate; null for no tax."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "quotes_send",
          "description": "Lock the quote and get a single-use signing link for the customer (the customer signs on the hosted page; an agent cannot sign or accept a quote). Who may send is shops.sendPermissions: the owner always may, office for any job, a lead for jobs on their crew, and a field worker for jobs assigned to them, until the owner turns that off. Lines an agent drafted are refused until a person who may send quotes sends the quote. An agent token cannot send those lines. A quote imported as history cannot be sent.",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id"
            ],
            "properties": {
              "quote_id": {
                "type": "string"
              },
              "email_customer": {
                "type": "boolean",
                "description": "Also email the customer a branded email with their own signing link, from the shop. Default false: you share sign_url yourself."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "quotes_revise",
          "description": "Pass the COMPLETE new line list; any line you omit is removed. Replace an unsigned quote with a new version. Earlier signing links stop working; send it again for a new link.",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id",
              "lines"
            ],
            "properties": {
              "tm": {
                "type": [
                  "object",
                  "null"
                ],
                "required": [
                  "rate_unit",
                  "rate_minor"
                ],
                "properties": {
                  "cap_minor": {
                    "type": "integer",
                    "description": "Optional not-to-exceed amount. Billing stops there until a change order is approved."
                  },
                  "rate_unit": {
                    "enum": [
                      "hour",
                      "day"
                    ],
                    "type": "string"
                  },
                  "rate_minor": {
                    "type": "integer",
                    "description": "Price per worker per hour or day, in cents"
                  },
                  "hours_per_day": {
                    "type": "number",
                    "description": "Hours that make one day on a day rate. Default 8."
                  },
                  "rush_rate_minor": {
                    "type": "integer",
                    "description": "Optional higher rate for time the shop marks as rush"
                  },
                  "materials_markup_bps": {
                    "type": "integer",
                    "description": "Added to what the shop paid for materials, in basis points (2000 is 20%)"
                  }
                },
                "description": "New rates. Leave out to keep the rates of the last version; null to make it a fixed price quote."
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description",
                    "quantity",
                    "unit_price_minor"
                  ],
                  "properties": {
                    "kind": {
                      "enum": [
                        "item",
                        "fee",
                        "discount"
                      ],
                      "type": "string",
                      "description": "item (default), fee (trip charge, disposal, card fee) or discount. For a discount, enter the amount off as a positive unit_price_minor."
                    },
                    "taxable": {
                      "type": "boolean",
                      "description": "Counts toward tax when the quote or invoice has a tax rate. Default true."
                    },
                    "optional": {
                      "type": "boolean",
                      "description": "The customer can add or leave out this line when signing."
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "option_key": {
                      "type": "string",
                      "description": "Put this line only in the option with this key. Leave out for a line shared by every option."
                    },
                    "description": {
                      "type": "string"
                    },
                    "unit_price_minor": {
                      "type": "integer"
                    }
                  }
                }
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "label"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Like good, better, best"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "description": "Good, better, best: 2 to 5 options the customer chooses one of when signing. Each needs its own lines."
              },
              "quote_id": {
                "type": "string"
              },
              "tax_rate_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Tax rate to charge (taxes.listRates). Leave out to use the shop default rate; null for no tax."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "quotes_withdraw",
          "description": "Withdraw a draft or sent quote the customer has not signed, with an optional reason. Signing links stop working and follow-ups stop. A withdrawn quote cannot be reopened; create a new quote if needed.",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "description": "Why it was withdrawn, up to 500 characters. Kept with the quote, not shown to the customer."
              },
              "quote_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "quote_id",
                  "status",
                  "withdrawn_at",
                  "next_actions"
                ],
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "quote_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "withdrawn_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "quotes_get",
          "description": "One customer quote in this shop: doc_no and doc_label (Q-12), status, every version with its lines, totals, and notes (the written scope of work, when the version has one), the job and customer, when it was sent and viewed, and the signer name and signed time once someone has signed. Read only. This is a quote, not an AI line draft (that is quotes.draft).",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id"
            ],
            "properties": {
              "quote_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "quote_id",
              "shop_id",
              "job_id",
              "customer_id",
              "customer_name",
              "historical",
              "status",
              "doc_no",
              "doc_label",
              "signer_name",
              "signed_at",
              "currency",
              "total_minor",
              "max_total_minor",
              "created_at",
              "last_sent_at",
              "first_viewed_at",
              "last_viewed_at",
              "versions",
              "next_actions"
            ],
            "properties": {
              "doc_no": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The shop's quote number. Customers see it as Q- followed by this number."
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "enum": [
                  "draft",
                  "sent",
                  "signed",
                  "declined",
                  "superseded",
                  "withdrawn"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "currency": {
                "type": "string"
              },
              "quote_id": {
                "type": "string",
                "format": "uuid"
              },
              "versions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "version",
                    "currency",
                    "total_minor",
                    "max_total_minor",
                    "created_at",
                    "first_viewed_at",
                    "last_viewed_at",
                    "views",
                    "options",
                    "notes",
                    "tax",
                    "lines"
                  ],
                  "properties": {
                    "tax": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "name",
                        "jurisdiction",
                        "rate_bps"
                      ],
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "rate_bps": {
                          "type": "integer"
                        },
                        "jurisdiction": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "position",
                          "description",
                          "quantity",
                          "unit_price_minor",
                          "amount_minor",
                          "option_key",
                          "optional",
                          "kind",
                          "taxable",
                          "source"
                        ],
                        "properties": {
                          "kind": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "taxable": {
                            "type": "boolean"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "position": {
                            "type": "integer"
                          },
                          "quantity": {
                            "type": "number"
                          },
                          "option_key": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": "string"
                          },
                          "amount_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          },
                          "unit_price_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          }
                        }
                      }
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Written scope of work shown on the customer quote page and PDF. Null when the version has none."
                    },
                    "views": {
                      "type": "integer"
                    },
                    "options": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "label"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "version": {
                      "type": "integer"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    },
                    "last_viewed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "first_viewed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "max_total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    }
                  }
                }
              },
              "doc_label": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Q- followed by doc_no, for example Q-11. Null when the quote has no number."
              },
              "signed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the quote was signed, in UTC. Null until then."
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "historical": {
                "type": "boolean",
                "description": "Imported from another system as already decided. It prices new quotes and is never sent or invoiced."
              },
              "customer_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "signer_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The name typed when the quote was signed. Null until then."
              },
              "total_minor": {
                "type": "integer",
                "description": "Amount in minor units of the currency (cents)."
              },
              "last_sent_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "customer_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_viewed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "first_viewed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "max_total_minor": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Amount in minor units of the currency (cents), or null."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "quotes_list",
          "description": "Customer quotes in one shop, newest first. Filter by job_id, status, or both. Read only. Send shop_id or job_id. A shop you are not a member of is refused, and a job you cannot access is not found.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "cursor": {
                "type": "string",
                "maxLength": 500
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "enum": [
                  "draft",
                  "sent",
                  "signed",
                  "declined",
                  "superseded",
                  "withdrawn"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data",
              "next_cursor",
              "time_zone",
              "summary",
              "display"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "quote_id",
                    "job_id",
                    "customer_id",
                    "customer_name",
                    "status",
                    "currency",
                    "total_minor",
                    "total_text",
                    "doc_no",
                    "doc_label",
                    "created_at",
                    "last_sent_at",
                    "last_viewed_at"
                  ],
                  "properties": {
                    "doc_no": {
                      "type": "integer"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "enum": [
                        "draft",
                        "sent",
                        "signed",
                        "declined",
                        "superseded",
                        "withdrawn"
                      ],
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "doc_label": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total_text": {
                      "type": "string"
                    },
                    "customer_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "total_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    },
                    "last_sent_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "customer_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "last_viewed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "time_zone": {
                "type": "string"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "subcontractors_get",
          "description": "The Idaho 45-525(3) subcontractor and supplier statement for a job: the latest signed one, any prepared draft, and whether final payment needs one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "subcontractors_prepare",
          "description": "Prepare the Idaho 45-525(3) statement for the shop to sign: a list of subcontractors, materialmen and rental equipment providers over $500, or none_attestation \"yes\" for \"No subcontractors or suppliers over $500 on this job\". Does not sign.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "entries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "business_name",
                    "address",
                    "phone",
                    "role"
                  ],
                  "properties": {
                    "role": {
                      "enum": [
                        "subcontractor",
                        "materialman",
                        "rental_equipment"
                      ],
                      "type": "string"
                    },
                    "phone": {
                      "type": "string",
                      "maxLength": 50,
                      "minLength": 1
                    },
                    "address": {
                      "type": "string",
                      "maxLength": 300,
                      "minLength": 1
                    },
                    "business_name": {
                      "type": "string",
                      "maxLength": 200,
                      "minLength": 1
                    }
                  }
                },
                "description": "Subcontractors, materialmen and rental equipment providers over $500."
              },
              "none_attestation": {
                "enum": [
                  "yes"
                ],
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "payments_connectLink",
          "description": "Owner only: the link to the shop's payment setup page. Give it to the owner; they open it, sign in, and press one button to set up card and bank payments with Stripe. Nothing starts until they do. status is none, onboarding, active, restricted or settling_only.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop",
              "status",
              "url",
              "next",
              "next_actions"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "next": {
                "type": "string"
              },
              "shop": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "invoices_createFromQuote",
          "description": "Create an invoice for a signed quote, for the total of the option and optional lines the customer picked. A quote imported as history cannot be invoiced.",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id"
            ],
            "properties": {
              "quote_id": {
                "type": "string"
              },
              "deposit_minor": {
                "type": "integer",
                "description": "Optional deposit asked for on the first send"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "invoices_send",
          "description": "Send an invoice (or the next part of it) and get a single-use pay link. Who may send is shops.sendPermissions: the owner always may, office for any job, a lead for jobs on their crew, and a field worker for jobs assigned to them, until the owner turns that off. Lines an agent drafted stay unsent until a person who may send invoices sends them. An agent token cannot send those lines. Earlier pay links stop working. Refused with conflict on a Doing Work deposit invoice whose booking ended (shop cancel or no-show). payments_ready false means the shop has no active payments account yet (after a hand-off, connect one with payments.connectLink); the link shows payment isn't available until it does.",
          "inputSchema": {
            "type": "object",
            "required": [
              "invoice_id"
            ],
            "properties": {
              "percent": {
                "type": "number",
                "description": "Progress billing: ask for this percent of the invoice total now (capped at the balance). Use instead of amount_minor."
              },
              "invoice_id": {
                "type": "string"
              },
              "amount_minor": {
                "type": "integer",
                "description": "Amount to ask for now. Defaults to the deposit on the first send, then the balance."
              },
              "email_customer": {
                "type": "boolean",
                "description": "Also email the customer a branded email with their own pay link, from the shop. Default false: you share pay_url yourself."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "invoices_markPaidOutside",
          "description": "Record that the customer paid an invoice outside Doing Work (check, cash, financing, insurance or other). Owner or office, or their agent. Closes the invoice, and the job too unless its checklists still block done (job_status says which; finish them and call jobs.complete). The job record says \"Paid outside Doing Work\", is never marked paid or verified, and no Doing Work receipt goes to the customer. There is no limit on jobs paid outside Doing Work and no fee on them. Agents can record these too unless the owner turned that off with shops.setAgentMoney.",
          "inputSchema": {
            "type": "object",
            "required": [
              "invoice_id",
              "method",
              "paid_on"
            ],
            "properties": {
              "note": {
                "type": "string",
                "description": "Optional note for the shop, up to 500 characters. Not shown in the home record."
              },
              "method": {
                "enum": [
                  "check",
                  "cash",
                  "financing",
                  "insurance",
                  "other"
                ],
                "type": "string"
              },
              "paid_on": {
                "type": "string",
                "description": "Date the customer paid, YYYY-MM-DD"
              },
              "invoice_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "invoices_refund",
          "description": "Refund part or all of a payment (owner or office, or their agent). The reply says requested. Confirmation arrives shortly, and invoices.get is where the confirmed refund shows. An agent refund above the shop's agent refund cap (shops.setAgentMoney, $250 unless the owner changed it) does not run: it waits for the owner's OK and the reply says approval_required.",
          "inputSchema": {
            "type": "object",
            "required": [
              "charge_id",
              "amount_minor"
            ],
            "properties": {
              "charge_id": {
                "type": "string"
              },
              "amount_minor": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "fees_schedule",
          "description": "Doing Work's fee: the first $1,000 of payments each calendar month is free, then 0.5%, never more than $149 per owner per month. No subscription. The fee comes out of the payment.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "fees_preview",
          "description": "What Doing Work would keep on a payment of this size right now, the effective rate on it, and the owner's payment total so far this month (owner or office). Leave out amount_minor for just the month picture. The checkout may ask Stripe to hold more, then return the difference when the payment succeeds.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string"
              },
              "amount_minor": {
                "type": "integer",
                "minimum": 1,
                "description": "A payment amount in cents"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "period": {
                "type": "string",
                "description": "YYYY-MM, the shop-local calendar month"
              },
              "shop_id": {
                "type": "string"
              },
              "fee_minor": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "amount_minor": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_rate_bps": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_band_line": {
                "type": "string"
              },
              "current_rate_bps": {
                "type": "integer"
              },
              "effective_rate_bps": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "month_volume_minor": {
                "type": "integer"
              },
              "to_next_band_minor": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "fees_statement",
          "description": "A month's Doing Work fees for a shop: payments, fees by kind, the effective rate, and each line (owner or office). volume_minor is the owner's month total the fee was based on, the same number fees.preview returns as month_volume_minor for this month. Refunds do not lower that total.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "month"
            ],
            "properties": {
              "month": {
                "type": "string",
                "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
              },
              "shop_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "records_keys",
          "description": "Public keys that verify signed job records.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "jobs_record",
          "description": "The latest signed record for a job and its level (logged, paid, verified). When the job has none yet, record is null and reason says so.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "record",
              "reason"
            ],
            "properties": {
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "record": {
                "type": [
                  "object",
                  "null"
                ],
                "required": [
                  "version",
                  "level",
                  "body",
                  "signature",
                  "signing_key_id"
                ],
                "properties": {
                  "body": {
                    "type": "object"
                  },
                  "level": {
                    "type": "string"
                  },
                  "version": {
                    "type": "integer"
                  },
                  "signature": {
                    "type": "string"
                  },
                  "signing_key_id": {
                    "type": "string"
                  }
                },
                "description": "The latest signed record, or null when the job has none yet."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "webhooks_create",
          "description": "Add a webhook endpoint for a shop (owner or office, or their agent). The url must be https on a public internet address. Returns the signing secret once; it is never shown again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "url"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "shop_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "webhooks_list",
          "description": "List a shop's webhook endpoints and their recent delivery counts. Secrets are not returned.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "webhooks_delete",
          "description": "Remove a webhook endpoint. Pending deliveries to it stop.",
          "inputSchema": {
            "type": "object",
            "required": [
              "endpoint_id"
            ],
            "properties": {
              "endpoint_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "audit_list",
          "description": "Read a shop's audit log, newest first (owner only).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "limit": {
                "type": "integer"
              },
              "shop_id": {
                "type": "string"
              },
              "before_id": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "platforms_create",
          "description": "Create a developer platform account (private beta). The caller owns it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "name",
              "terms_version"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "terms_version": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "platforms_list",
          "description": "List the platform accounts this person owns and the shops each one manages: a person OAuth grant is not bound to one shop and gets that list, empty when they own none, and a shop-bound token (a named agent key or a dws_ shop token) is refused and should call me.shops.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "platforms_revokeManage",
          "description": "Stop a platform from managing this shop. Shop owner only.",
          "inputSchema": {
            "type": "object",
            "required": [
              "grant_id"
            ],
            "properties": {
              "grant_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "customers_create",
          "description": "Add a customer to a shop, with kind, company, email, phone, billing address, lead source, tags and notes in one call.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "name"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "person",
                  "company"
                ],
                "type": "string"
              },
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1
                },
                "maxItems": 50
              },
              "email": {
                "type": "string",
                "maxLength": 254
              },
              "notes": {
                "type": "string",
                "maxLength": 5000
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "shop_id": {
                "type": "string"
              },
              "lead_source": {
                "type": "string",
                "maxLength": 100
              },
              "company_name": {
                "type": "string",
                "maxLength": 200
              },
              "billing_address": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 2
                  },
                  "locality": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 20
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "customers_get",
          "description": "One customer with contacts, properties, custom fields and open balance. A field worker gets not found unless the customer has a job they are assigned to. open_balance_minor is null when see_prices is off.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "customer_id",
              "shop_id",
              "kind",
              "name",
              "company_name",
              "email",
              "phone",
              "billing_address",
              "lead_source",
              "tags",
              "notes",
              "archived_at",
              "merged_into",
              "erased_at",
              "created_at",
              "updated_at",
              "contacts",
              "properties",
              "fields",
              "open_balance_minor"
            ],
            "properties": {
              "kind": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "target",
                    "type",
                    "value",
                    "currency",
                    "written_at"
                  ],
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "value": {},
                    "target": {
                      "type": "string"
                    },
                    "currency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "written_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "contact_id",
                    "name",
                    "email",
                    "phone",
                    "role",
                    "is_primary"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "role": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "contact_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "is_primary": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "erased_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "properties": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "property_id",
                    "home_id",
                    "label",
                    "address_line1",
                    "address_line2",
                    "locality",
                    "postal_code",
                    "jurisdiction_id",
                    "access_notes"
                  ],
                  "properties": {
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "home_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "locality": {
                      "type": "string"
                    },
                    "postal_code": {
                      "type": "string"
                    },
                    "property_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "access_notes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "address_line1": {
                      "type": "string"
                    },
                    "address_line2": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "jurisdiction_id": {
                      "type": "string"
                    }
                  }
                }
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "lead_source": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "merged_into": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "company_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "billing_address": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "open_balance_minor": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Amount in minor units of the currency (cents), or null."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "customers_list",
          "description": "Customers of a shop, newest first, filtered by tag, lead source or archived. A field worker sees only customers on a job they are assigned to.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "tag": {
                "type": "string",
                "maxLength": 50
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "cursor": {
                "type": "string",
                "maxLength": 500
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "archived": {
                "type": "boolean"
              },
              "lead_source": {
                "type": "string",
                "maxLength": 100
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data",
              "next_cursor",
              "summary",
              "display"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "customer_id",
                    "shop_id",
                    "kind",
                    "name",
                    "company_name",
                    "email",
                    "phone",
                    "billing_address",
                    "lead_source",
                    "tags",
                    "notes",
                    "archived_at",
                    "merged_into",
                    "erased_at",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "erased_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "customer_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "lead_source": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "merged_into": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "company_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "billing_address": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "customers_search",
          "description": "Find customers by name, company, email, phone or property address.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "q"
            ],
            "properties": {
              "q": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "customer_id",
                    "shop_id",
                    "kind",
                    "name",
                    "company_name",
                    "email",
                    "phone",
                    "billing_address",
                    "lead_source",
                    "tags",
                    "notes",
                    "archived_at",
                    "merged_into",
                    "erased_at",
                    "created_at",
                    "updated_at"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "erased_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "customer_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "lead_source": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "merged_into": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "company_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "billing_address": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "customers_update",
          "description": "Change a customer's name, kind, company, email, phone, billing address, lead source, tags or notes.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "person",
                  "company"
                ],
                "type": "string"
              },
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1
                },
                "maxItems": 50
              },
              "email": {
                "type": "string",
                "maxLength": 254
              },
              "notes": {
                "type": "string",
                "maxLength": 5000
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "lead_source": {
                "type": "string",
                "maxLength": 100
              },
              "company_name": {
                "type": "string",
                "maxLength": 200
              },
              "billing_address": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "country": {
                    "type": "string",
                    "maxLength": 2
                  },
                  "locality": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 20
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "customers_archive",
          "description": "Archive a customer (hidden from lists, history kept) or bring one back.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "archived": {
                "type": "boolean"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "customers_duplicates",
          "description": "Likely duplicate customers in a shop: same email, same phone digits, or same name.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "customers_merge",
          "description": "Merge a duplicate customer into another: jobs, requests, contacts, properties and fields move over.",
          "inputSchema": {
            "type": "object",
            "required": [
              "from_customer_id",
              "into_customer_id"
            ],
            "properties": {
              "from_customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "into_customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "customers_contactAdd",
          "description": "Add a contact person to a customer (tenant, manager, billing, spouse).",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id",
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "role": {
                "type": "string",
                "maxLength": 100
              },
              "email": {
                "type": "string",
                "maxLength": 254
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "is_primary": {
                "type": "boolean"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "customers_contactUpdate",
          "description": "Change or remove one contact of a customer.",
          "inputSchema": {
            "type": "object",
            "required": [
              "contact_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "role": {
                "type": "string",
                "maxLength": 100
              },
              "email": {
                "type": "string",
                "maxLength": 254
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "removed": {
                "type": "boolean"
              },
              "contact_id": {
                "type": "string",
                "format": "uuid"
              },
              "is_primary": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "properties_add",
          "description": "Add a service address to a customer, with optional label and access notes.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id",
              "address"
            ],
            "properties": {
              "label": {
                "type": "string",
                "maxLength": 100
              },
              "address": {
                "type": "object",
                "example": {
                  "line1": "100 Test St",
                  "locality": "Boise",
                  "postal_code": "83702",
                  "jurisdiction": "US-ID"
                },
                "required": [
                  "line1",
                  "locality",
                  "postal_code",
                  "jurisdiction"
                ],
                "properties": {
                  "line1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "locality": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "jurisdiction": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "ISO 3166-2 like US-ID. ID, id, and Idaho are accepted for a US shop."
                  }
                },
                "description": "address is an object, not a string, with required line1, locality, postal_code and jurisdiction (line2 is optional; jurisdiction is an ISO 3166-2 code like US-ID, and a US shop also accepts ID, id, or Idaho), for example {\"line1\":\"100 Test St\",\"locality\":\"Boise\",\"postal_code\":\"83702\",\"jurisdiction\":\"US-ID\"}"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "access_notes": {
                "type": "string",
                "maxLength": 2000
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "properties_list",
          "description": "Service addresses saved on a customer (properties_add, or jobs_create when you pass customer_id); a job with no customer keeps its address on jobs_get and is not listed here.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "cursor": {
                "type": "string",
                "maxLength": 500
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "properties_update",
          "description": "Change a property's label or access notes, or archive it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "property_id"
            ],
            "properties": {
              "label": {
                "type": "string",
                "maxLength": 100
              },
              "archived": {
                "type": "boolean"
              },
              "property_id": {
                "type": "string",
                "format": "uuid"
              },
              "access_notes": {
                "type": "string",
                "maxLength": 2000
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "equipment_add",
          "description": "Record equipment at a property: kind, make, model, serial, install date and warranty.",
          "inputSchema": {
            "type": "object",
            "required": [
              "property_id",
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "make": {
                "type": "string",
                "maxLength": 100
              },
              "model": {
                "type": "string",
                "maxLength": 100
              },
              "notes": {
                "type": "string",
                "maxLength": 2000
              },
              "serial": {
                "type": "string",
                "maxLength": 100
              },
              "property_id": {
                "type": "string",
                "format": "uuid"
              },
              "install_date": {
                "type": "string",
                "maxLength": 10
              },
              "warranty_until": {
                "type": "string",
                "maxLength": 10
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "equipment_list",
          "description": "Equipment at a property, or warranties ending soon across a shop.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "property_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              },
              "warranty_ends_within_days": {
                "type": "integer",
                "maximum": 3650,
                "minimum": 0
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "equipment_update",
          "description": "Change or archive an equipment record.",
          "inputSchema": {
            "type": "object",
            "required": [
              "equipment_id"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "make": {
                "type": "string",
                "maxLength": 100
              },
              "model": {
                "type": "string",
                "maxLength": 100
              },
              "notes": {
                "type": "string",
                "maxLength": 2000
              },
              "serial": {
                "type": "string",
                "maxLength": 100
              },
              "archived": {
                "type": "boolean"
              },
              "equipment_id": {
                "type": "string",
                "format": "uuid"
              },
              "install_date": {
                "type": "string",
                "maxLength": 10
              },
              "warranty_until": {
                "type": "string",
                "maxLength": 10
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "jobs_setTags",
          "description": "Set the tags and lead source on a job.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1
                },
                "maxItems": 50
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "lead_source": {
                "type": "string",
                "maxLength": 100
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "customers_timeline",
          "description": "Everything that happened with a customer, newest first: requests, jobs, quotes, signatures, invoices and payments.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "cursor": {
                "type": "string",
                "maxLength": 500
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "customers_statement",
          "description": "A customer's account statement: every invoice with total, paid, refunded and balance, and the total owed.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "customers_privacyExport",
          "description": "Everything the shop holds about one customer, as one JSON document, for a privacy request.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "fields_define",
          "description": "Add a custom field to customers, properties, jobs, quotes or invoices for a shop.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "key",
              "target",
              "type"
            ],
            "properties": {
              "key": {
                "type": "string",
                "maxLength": 63,
                "minLength": 1
              },
              "pii": {
                "type": "boolean"
              },
              "type": {
                "enum": [
                  "text",
                  "number",
                  "money",
                  "date",
                  "boolean",
                  "enum",
                  "json"
                ],
                "type": "string"
              },
              "label": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "target": {
                "enum": [
                  "customer",
                  "property",
                  "job",
                  "quote",
                  "invoice"
                ],
                "type": "string"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 100,
                  "minLength": 1
                },
                "maxItems": 100
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "required": {
                "type": "boolean"
              },
              "shared_with_homeowner": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "fields_list",
          "description": "Custom fields a shop has defined, optionally for one kind of record.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "target": {
                "enum": [
                  "customer",
                  "property",
                  "job",
                  "quote",
                  "invoice"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "fields_set",
          "description": "Set one custom field value on a customer, property, job, quote or invoice. Writing a money value does not need see_prices (read masking only; D-20261106-CF-4).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "key",
              "target",
              "object_id",
              "value"
            ],
            "properties": {
              "key": {
                "type": "string",
                "maxLength": 63,
                "minLength": 1
              },
              "value": {
                "type": "string",
                "maxLength": 10000,
                "description": "The value as text: a number, money in minor units (cents), a date YYYY-MM-DD, true or false, an option, or JSON."
              },
              "target": {
                "enum": [
                  "customer",
                  "property",
                  "job",
                  "quote",
                  "invoice"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "currency": {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              "object_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "fields_get",
          "description": "Custom field values on one record, with any required fields still empty. Money-type values and currency are null unless you may see prices (see_prices); key and type stay visible.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "target",
              "object_id"
            ],
            "properties": {
              "target": {
                "enum": [
                  "customer",
                  "property",
                  "job",
                  "quote",
                  "invoice"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "object_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "requests_create",
          "description": "Log a request for work from a customer or a new lead.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "title"
            ],
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1
                },
                "maxItems": 50
              },
              "title": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "source": {
                "enum": [
                  "agent",
                  "form",
                  "portal",
                  "phone",
                  "email",
                  "text",
                  "walk_in",
                  "other"
                ],
                "type": "string"
              },
              "address": {
                "type": "object",
                "example": {
                  "line1": "100 Test St",
                  "locality": "Boise",
                  "postal_code": "83702",
                  "jurisdiction": "US-ID"
                },
                "required": [
                  "line1",
                  "locality",
                  "postal_code",
                  "jurisdiction"
                ],
                "properties": {
                  "line1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "locality": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "jurisdiction": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "ISO 3166-2 like US-ID. ID, id, and Idaho are accepted for a US shop."
                  }
                },
                "description": "address is an object, not a string, with required line1, locality, postal_code and jurisdiction (line2 is optional; jurisdiction is an ISO 3166-2 code like US-ID, and a US shop also accepts ID, id, or Idaho), for example {\"line1\":\"100 Test St\",\"locality\":\"Boise\",\"postal_code\":\"83702\",\"jurisdiction\":\"US-ID\"}"
              },
              "details": {
                "type": "string",
                "maxLength": 10000
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "lead_text": {
                "type": "string",
                "maxLength": 10000,
                "description": "The lead as pasted. Untrusted customer text; read for type and urgency only."
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "lead_source": {
                "type": "string",
                "maxLength": 100
              },
              "marketplace": {
                "enum": [
                  "thumbtack",
                  "angi",
                  "angies_list",
                  "homeadvisor",
                  "modernize",
                  "networx",
                  "google_lsa",
                  "yelp",
                  "other"
                ],
                "type": "string",
                "description": "The lead site this came from, when pasted or forwarded from one."
              },
              "property_id": {
                "type": "string",
                "format": "uuid"
              },
              "contact_name": {
                "type": "string",
                "maxLength": 200
              },
              "contact_email": {
                "type": "string",
                "maxLength": 254
              },
              "contact_phone": {
                "type": "string",
                "maxLength": 40
              },
              "preferred_times": {
                "type": "string",
                "maxLength": 1000
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "requests_list",
          "description": "Requests of a shop, newest first, filtered by stage, customer or tag. A field worker sees a request only when they are assigned to a visit on its job.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "tag": {
                "type": "string",
                "maxLength": 50
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "stage": {
                "enum": [
                  "new",
                  "contacted",
                  "assessment",
                  "quoted",
                  "won",
                  "invoiced",
                  "lost"
                ],
                "type": "string"
              },
              "cursor": {
                "type": "string",
                "maxLength": 500
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "requests_pipeline",
          "description": "How many open requests a shop has in each stage, and how many were won, invoiced or lost in the last 30 days.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "requests_get",
          "description": "One request with its customer and the job it became. A field worker gets not found unless they are assigned to a visit on that job.",
          "inputSchema": {
            "type": "object",
            "required": [
              "request_id"
            ],
            "properties": {
              "request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "requests_update",
          "description": "Move a request to another stage or change its details, customer or property.",
          "inputSchema": {
            "type": "object",
            "required": [
              "request_id"
            ],
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1
                },
                "maxItems": 50
              },
              "stage": {
                "enum": [
                  "new",
                  "contacted",
                  "assessment",
                  "quoted",
                  "won",
                  "invoiced",
                  "lost"
                ],
                "type": "string"
              },
              "title": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "details": {
                "type": "string",
                "maxLength": 10000
              },
              "archived": {
                "type": "boolean"
              },
              "request_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "lead_source": {
                "type": "string",
                "maxLength": 100
              },
              "lost_reason": {
                "type": "string",
                "maxLength": 500
              },
              "property_id": {
                "type": "string",
                "format": "uuid"
              },
              "preferred_times": {
                "type": "string",
                "maxLength": 1000
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "requests_convert",
          "description": "Turn a request into a job at its property or address and link them both ways. The request's property becomes the job's home, and the job keeps the request. The worker then writes the quote or books a visit.",
          "inputSchema": {
            "type": "object",
            "required": [
              "request_id"
            ],
            "properties": {
              "address": {
                "type": "object",
                "example": {
                  "line1": "100 Test St",
                  "locality": "Boise",
                  "postal_code": "83702",
                  "jurisdiction": "US-ID"
                },
                "required": [
                  "line1",
                  "locality",
                  "postal_code",
                  "jurisdiction"
                ],
                "properties": {
                  "line1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "locality": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "jurisdiction": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "ISO 3166-2 like US-ID. ID, id, and Idaho are accepted for a US shop."
                  }
                },
                "description": "address is an object, not a string, with required line1, locality, postal_code and jurisdiction (line2 is optional; jurisdiction is an ISO 3166-2 code like US-ID, and a US shop also accepts ID, id, or Idaho), for example {\"line1\":\"100 Test St\",\"locality\":\"Boise\",\"postal_code\":\"83702\",\"jurisdiction\":\"US-ID\"}"
              },
              "summary": {
                "type": "string",
                "maxLength": 500
              },
              "request_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "requests_formCreate",
          "description": "Turn on the shop's public request form and get its key. Making a new one turns off the old key.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "requests_submitForm",
          "description": "Send a shop a request through its public form. No sign-in; needs the form key.",
          "inputSchema": {
            "type": "object",
            "required": [
              "form_key",
              "title",
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "email": {
                "type": "string",
                "maxLength": 254
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "title": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "address": {
                "type": "object",
                "example": {
                  "line1": "100 Test St",
                  "locality": "Boise",
                  "postal_code": "83702",
                  "jurisdiction": "US-ID"
                },
                "required": [
                  "line1",
                  "locality",
                  "postal_code",
                  "jurisdiction"
                ],
                "properties": {
                  "line1": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "line2": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "locality": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "postal_code": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "jurisdiction": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "ISO 3166-2 like US-ID. ID, id, and Idaho are accepted for a US shop."
                  }
                },
                "description": "address is an object, not a string, with required line1, locality, postal_code and jurisdiction (line2 is optional; jurisdiction is an ISO 3166-2 code like US-ID, and a US shop also accepts ID, id, or Idaho), for example {\"line1\":\"100 Test St\",\"locality\":\"Boise\",\"postal_code\":\"83702\",\"jurisdiction\":\"US-ID\"}"
              },
              "details": {
                "type": "string",
                "maxLength": 5000
              },
              "form_key": {
                "type": "string",
                "maxLength": 100,
                "minLength": 10
              },
              "sms_opt_in": {
                "type": "boolean",
                "description": "The customer checked the box to get texts about this request. Needs phone. Saved as pending until they text YES."
              },
              "preferred_times": {
                "type": "string",
                "maxLength": 1000
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_createRecurring",
          "description": "Book a repeating visit (daily, weekly or monthly, every n) for a job. All visits are booked now, up to 104. Times repeat in the shop's local time zone. Overlaps and unavailable workers come back as warnings, never blocks.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "starts_at",
              "ends_at",
              "freq"
            ],
            "properties": {
              "freq": {
                "enum": [
                  "daily",
                  "weekly",
                  "monthly"
                ],
                "type": "string"
              },
              "every": {
                "type": "integer",
                "maximum": 52,
                "minimum": 1
              },
              "notes": {
                "type": "string",
                "maxLength": 5000
              },
              "title": {
                "type": "string",
                "maxLength": 200
              },
              "until": {
                "type": "string",
                "format": "date-time"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "ends_at": {
                "type": "string",
                "format": "date-time"
              },
              "starts_at": {
                "type": "string",
                "format": "date-time"
              },
              "occurrences": {
                "type": "integer",
                "maximum": 104,
                "minimum": 1
              },
              "assignee_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "uniqueItems": true
              },
              "arrival_window_minutes": {
                "type": "integer",
                "maximum": 480,
                "minimum": 0,
                "description": "Arrival window in minutes: the customer is told the worker arrives between starts_at and starts_at plus this. Defaults to the shop's setting (schedule.setRules)."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_cancelSeries",
          "description": "Cancel the visits of a repeating series that have not started yet, from a time onward (default now). Past, started and done visits stay.",
          "inputSchema": {
            "type": "object",
            "required": [
              "series_id"
            ],
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": "string",
                "maxLength": 500
              },
              "series_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "visits_start",
          "description": "Mark a visit started (from scheduled, on the way, or arrived). The worker on the visit (or the office) can do this.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_done",
          "description": "Mark a visit done, with an optional note. The worker on the visit (or the office) can do this. A visit not yet started is started too. Refused with checklist_open while a checklist on the visit has required items open or a sign-off missing; the owner, signed in on the hosted override page (/p/checklist/override), may pass override_reason to mark it done anyway (recorded and audited). Agents, keys and office staff cannot override.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "override_reason": {
                "type": "string",
                "maxLength": 1000,
                "minLength": 1,
                "description": "Owner in person only (hosted override page): why the visit is done with checklist work left."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "visit_id",
                  "status",
                  "override_id",
                  "missed_steps",
                  "next_actions"
                ],
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "visit_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "override_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "missed_steps": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_create",
          "description": "Book a visit to a job at a time, optionally with the workers going (assignee_ids, a saved crew_id, or both). Overlaps for those workers come back in conflicts.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "starts_at",
              "ends_at"
            ],
            "properties": {
              "notes": {
                "type": "string",
                "maxLength": 5000
              },
              "title": {
                "type": "string",
                "maxLength": 200
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "crew_id": {
                "type": "string",
                "format": "uuid"
              },
              "ends_at": {
                "type": "string",
                "format": "date-time"
              },
              "priority": {
                "enum": [
                  "normal",
                  "urgent",
                  "emergency"
                ],
                "type": "string",
                "description": "normal (default), urgent or emergency. Urgent and emergency visits send visit.priority_set and can use dispatch.suggest."
              },
              "starts_at": {
                "type": "string",
                "format": "date-time"
              },
              "assignee_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "uniqueItems": true
              },
              "arrival_window_minutes": {
                "type": "integer",
                "maximum": 480,
                "minimum": 0,
                "description": "Arrival window in minutes: the customer is told the worker arrives between starts_at and starts_at plus this. Defaults to the shop's setting (schedule.setRules)."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_update",
          "description": "Move a visit or change its title, notes or arrival window. Overlaps for its workers come back in conflicts. Moving it re-plans the appointment reminder.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "notes": {
                "type": "string",
                "maxLength": 5000
              },
              "title": {
                "type": "string",
                "maxLength": 200
              },
              "ends_at": {
                "type": "string",
                "format": "date-time"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "starts_at": {
                "type": "string",
                "format": "date-time"
              },
              "arrival_window_minutes": {
                "type": "integer",
                "maximum": 480,
                "minimum": 0,
                "description": "Arrival window in minutes: the customer is told the worker arrives between starts_at and starts_at plus this. Defaults to the shop's setting (schedule.setRules)."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "visits_assign",
          "description": "Set who is going on a visit: person_ids, a saved crew_id, or both. The list replaces the current one; an empty person_ids with no crew leaves it unassigned.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "crew_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "uniqueItems": true
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "visits_cancel",
          "description": "Cancel a visit that is scheduled, on the way, or arrived. It stays on record with the reason, and customer notices not yet sent for it are dropped.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "maxLength": 500
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "visits_setPriority",
          "description": "Set a visit's priority: normal, urgent or emergency. Sends visit.priority_set. For urgent or emergency, call dispatch.suggest for who could go.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id",
              "priority"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "maxLength": 500
              },
              "priority": {
                "enum": [
                  "normal",
                  "urgent",
                  "emergency"
                ],
                "type": "string",
                "description": "normal (default), urgent or emergency. Urgent and emergency visits send visit.priority_set and can use dispatch.suggest."
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "visit_id",
                  "priority",
                  "previous",
                  "changed"
                ],
                "properties": {
                  "changed": {
                    "type": "boolean"
                  },
                  "previous": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string"
                  },
                  "visit_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "dispatch_suggest",
          "description": "Read only: for an urgent or emergency visit, the shop's field workers and owners ranked by who is free (no overlapping visit, not on time off, inside their hours) and then by the fewest visits that day. Suggestions only; assign with visits.assign.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 50,
                "minimum": 1
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "visit_id",
              "priority",
              "starts_at",
              "ends_at",
              "assignee_ids",
              "candidates"
            ],
            "properties": {
              "ends_at": {
                "type": "string",
                "format": "date-time"
              },
              "priority": {
                "type": "string"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "starts_at": {
                "type": "string",
                "format": "date-time"
              },
              "candidates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "person_id",
                    "display_name",
                    "role",
                    "free",
                    "conflicts",
                    "time_off",
                    "outside_hours",
                    "visits_that_day",
                    "already_assigned"
                  ],
                  "properties": {
                    "free": {
                      "type": "boolean"
                    },
                    "role": {
                      "type": "string"
                    },
                    "time_off": {
                      "type": "boolean"
                    },
                    "conflicts": {
                      "type": "integer"
                    },
                    "person_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "display_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "outside_hours": {
                      "type": "boolean"
                    },
                    "visits_that_day": {
                      "type": "integer"
                    },
                    "already_assigned": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "assignee_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_get",
          "description": "One visit with its job and workers.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "visit_id",
              "shop_id",
              "job_id",
              "job_summary",
              "starts_at",
              "ends_at",
              "title",
              "notes",
              "status",
              "cancel_reason",
              "series_id",
              "started_at",
              "done_at",
              "done_note",
              "priority",
              "arrival_window_minutes",
              "arrive_by",
              "on_the_way_at",
              "eta_at",
              "arrived_at",
              "assignee_ids",
              "next_actions"
            ],
            "properties": {
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eta_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "enum": [
                  "scheduled",
                  "on_the_way",
                  "arrived",
                  "started",
                  "done",
                  "cancelled"
                ],
                "type": "string"
              },
              "done_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "ends_at": {
                "type": "string",
                "format": "date-time"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "priority": {
                "type": "string"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "arrive_by": {
                "type": "string",
                "format": "date-time"
              },
              "done_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "series_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "starts_at": {
                "type": "string",
                "format": "date-time"
              },
              "arrived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "job_summary": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "assignee_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "cancel_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "on_the_way_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "arrival_window_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_list",
          "description": "A shop's visits that overlap a time window, earliest first. Filter by worker, job, or only mine. Field workers only ever see their own. A lead sees the crews they belong to or lead. Shop roles are owner, office, lead and field.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "from",
              "to"
            ],
            "properties": {
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "mine": {
                "type": "boolean"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              },
              "unassigned": {
                "type": "boolean"
              },
              "include_cancelled": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "time_zone",
              "summary",
              "display",
              "items",
              "truncated"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "visit_id",
                    "shop_id",
                    "job_id",
                    "job_summary",
                    "starts_at",
                    "ends_at",
                    "title",
                    "notes",
                    "status",
                    "cancel_reason",
                    "series_id",
                    "started_at",
                    "done_at",
                    "done_note",
                    "priority",
                    "arrival_window_minutes",
                    "arrive_by",
                    "on_the_way_at",
                    "eta_at",
                    "arrived_at",
                    "assignee_ids"
                  ],
                  "properties": {
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "eta_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "enum": [
                        "scheduled",
                        "on_the_way",
                        "arrived",
                        "started",
                        "done",
                        "cancelled"
                      ],
                      "type": "string"
                    },
                    "done_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "ends_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "priority": {
                      "type": "string"
                    },
                    "visit_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "arrive_by": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "done_note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "series_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "starts_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "arrived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "started_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "job_summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assignee_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "cancel_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "on_the_way_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "arrival_window_minutes": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "time_zone": {
                "type": "string"
              },
              "truncated": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "routes_setLocation",
          "description": "Save the map point for a job's address, so routes.day can give it to you with each stop (owner or office). Look the address up with your own maps tools, or have a person type it in. Doing Work does not look addresses up. The point is kept for this shop's jobs at the same address.",
          "inputSchema": {
            "type": "object",
            "required": [
              "lat",
              "lng"
            ],
            "properties": {
              "lat": {
                "type": "number",
                "maximum": 90,
                "minimum": -90,
                "description": "Latitude in decimal degrees (WGS 84), for example 43.6150."
              },
              "lng": {
                "type": "number",
                "maximum": 180,
                "minimum": -180,
                "description": "Longitude in decimal degrees (WGS 84), for example -116.2023."
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "enum": [
                  "agent",
                  "typed"
                ],
                "type": "string",
                "description": "agent when your tools looked it up (default), typed when a person typed it in."
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "home_id",
                  "job_id",
                  "location"
                ],
                "properties": {
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "home_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "location": {
                    "type": "object",
                    "required": [
                      "lat",
                      "lng",
                      "source"
                    ],
                    "properties": {
                      "lat": {
                        "type": "number"
                      },
                      "lng": {
                        "type": "number"
                      },
                      "source": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "routes_setStart",
          "description": "Save where a worker starts the day (their home or a yard), or with no person_id the shop's yard, used when a worker has none. Owner or office for anyone; a worker for themselves. A worker's own start is seen only by them and the owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "label",
              "lat",
              "lng"
            ],
            "properties": {
              "lat": {
                "type": "number",
                "maximum": 90,
                "minimum": -90,
                "description": "Latitude in decimal degrees (WGS 84), for example 43.6150."
              },
              "lng": {
                "type": "number",
                "maximum": 180,
                "minimum": -180,
                "description": "Longitude in decimal degrees (WGS 84), for example -116.2023."
              },
              "label": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "A short name, for example \"Shop yard\" or \"Home\"."
              },
              "source": {
                "enum": [
                  "agent",
                  "typed"
                ],
                "type": "string",
                "description": "agent when your tools looked it up (default), typed when a person typed it in."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "person_id",
                  "label",
                  "location"
                ],
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "location": {
                    "type": "object",
                    "required": [
                      "lat",
                      "lng",
                      "source"
                    ],
                    "properties": {
                      "lat": {
                        "type": "number"
                      },
                      "lng": {
                        "type": "number"
                      },
                      "source": {
                        "type": "string"
                      }
                    }
                  },
                  "person_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "routes_day",
          "description": "One day's stops for planning a route, per worker in visit time order: each worker's start point (their own, else the shop yard), and for each stop the address, map point (null until you save one with routes.setLocation; source says where it came from), time, length, arrival window, priority, and locked when the worker is already on the way, there, or done. Visits with no worker come back in unassigned. Owner and office see everyone; a lead sees their crew's day; a field worker sees only their own day. Plan the order with your own tools, then write it back with routes.apply.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "date"
            ],
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "description": "The day in the shop's time zone, YYYY-MM-DD."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 50,
                "description": "Only these workers. Default: everyone with a stop that day.",
                "uniqueItems": true
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "date",
              "time_zone",
              "yard",
              "workers",
              "unassigned",
              "missing_locations"
            ],
            "properties": {
              "date": {
                "type": "string"
              },
              "yard": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "workers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "person_id",
                    "name",
                    "start",
                    "stops"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "start": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "stops": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "visit_id",
                          "job_id",
                          "title",
                          "customer",
                          "address",
                          "location",
                          "starts_at",
                          "ends_at",
                          "duration_minutes",
                          "arrival_window_minutes",
                          "arrive_by",
                          "priority",
                          "status",
                          "locked",
                          "assignee_ids"
                        ],
                        "properties": {
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "job_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "status": {
                            "type": "string"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "ends_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "customer": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "location": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "priority": {
                            "type": "string"
                          },
                          "visit_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "arrive_by": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "starts_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "assignee_ids": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "duration_minutes": {
                            "type": "integer"
                          },
                          "arrival_window_minutes": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "person_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "time_zone": {
                "type": "string"
              },
              "unassigned": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "visit_id",
                    "job_id",
                    "title",
                    "customer",
                    "address",
                    "location",
                    "starts_at",
                    "ends_at",
                    "duration_minutes",
                    "arrival_window_minutes",
                    "arrive_by",
                    "priority",
                    "status",
                    "locked",
                    "assignee_ids"
                  ],
                  "properties": {
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "locked": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "ends_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "customer": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "location": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "priority": {
                      "type": "string"
                    },
                    "visit_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "arrive_by": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "starts_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "assignee_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "duration_minutes": {
                      "type": "integer"
                    },
                    "arrival_window_minutes": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "missing_locations": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "routes_apply",
          "description": "Write a planned route back: new times, and optionally new workers, for up to 100 visits at once (owner or office). All or nothing: if any visit is not scheduled (already on the way, there, started, done or cancelled), not this shop's, or the plan leaves a worker with overlapping visits, nothing changes and the problems come back in conflicts. Pass allow_overlaps true to save overlaps anyway, or dry_run true to check without saving. Each moved visit gets its appointment reminder planned again once.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "changes"
            ],
            "properties": {
              "changes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "visit_id",
                    "starts_at",
                    "ends_at"
                  ],
                  "properties": {
                    "ends_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "visit_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "starts_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "person_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "maxItems": 20,
                      "description": "Replace the workers on this visit. Leave out to keep them.",
                      "uniqueItems": true
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 100,
                "minItems": 1
              },
              "dry_run": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "allow_overlaps": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "applied",
                  "dry_run",
                  "visit_ids",
                  "conflicts"
                ],
                "properties": {
                  "applied": {
                    "type": "boolean"
                  },
                  "dry_run": {
                    "type": "boolean"
                  },
                  "conflicts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "visit_id",
                        "reason",
                        "person_id",
                        "other_visit_id"
                      ],
                      "properties": {
                        "reason": {
                          "type": "string"
                        },
                        "visit_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "person_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "other_visit_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        }
                      }
                    }
                  },
                  "visit_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "vendors_create",
          "description": "Add a supplier the shop buys parts from. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              "note": {
                "type": "string",
                "maxLength": 1000
              },
              "email": {
                "type": "string",
                "maxLength": 200
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "account_number": {
                "type": "string",
                "maxLength": 60
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "vendor_id",
                  "shop_id",
                  "name",
                  "email",
                  "phone",
                  "account_number",
                  "note",
                  "archived"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "archived": {
                    "type": "boolean"
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "account_number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "vendors_update",
          "description": "Change a supplier's name, contact details or note, or archive it (archived: true). Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "vendor_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              "note": {
                "type": "string",
                "maxLength": 1000
              },
              "email": {
                "type": "string",
                "maxLength": 200
              },
              "phone": {
                "type": "string",
                "maxLength": 40
              },
              "archived": {
                "type": "boolean"
              },
              "vendor_id": {
                "type": "string",
                "format": "uuid"
              },
              "account_number": {
                "type": "string",
                "maxLength": 60
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "vendor_id",
                  "shop_id",
                  "name",
                  "email",
                  "phone",
                  "account_number",
                  "note",
                  "archived"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "archived": {
                    "type": "boolean"
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "account_number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "vendors_list",
          "description": "List the shop's suppliers (archived ones only with include_archived). Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "vendor_id",
                    "shop_id",
                    "name",
                    "email",
                    "phone",
                    "account_number",
                    "note",
                    "archived"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "vendor_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "account_number": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "po_create",
          "description": "Start a purchase order (draft) for parts for a job from a supplier. Nothing counts as job cost until po.receive. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "vendor_id",
              "lines"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "name",
                    "quantity",
                    "unit_cost_minor"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "maxLength": 200,
                      "minLength": 1
                    },
                    "unit": {
                      "type": "string",
                      "maxLength": 20,
                      "minLength": 1
                    },
                    "taxable": {
                      "type": "boolean"
                    },
                    "quantity": {
                      "type": "number",
                      "maximum": 999999999,
                      "exclusiveMinimum": 0
                    },
                    "unit_cost_minor": {
                      "type": "integer",
                      "maximum": 100000000000,
                      "minimum": 0
                    },
                    "unit_price_minor": {
                      "type": "integer",
                      "maximum": 100000000000,
                      "minimum": 0,
                      "description": "Optional price to the customer, copied to the material when received."
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "vendor_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "po_id",
                  "shop_id",
                  "number",
                  "vendor_id",
                  "vendor_name",
                  "job_id",
                  "status",
                  "note",
                  "ordered_at",
                  "total_minor",
                  "received_cost_minor",
                  "bill_minor",
                  "bill_ref",
                  "bill_difference_minor",
                  "lines",
                  "created_at"
                ],
                "properties": {
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "line_no",
                        "name",
                        "unit",
                        "quantity",
                        "unit_cost_minor",
                        "unit_price_minor",
                        "taxable",
                        "received_quantity",
                        "cost_minor",
                        "received_cost_minor"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "line_no": {
                          "type": "integer"
                        },
                        "taxable": {
                          "type": "boolean"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "received_quantity": {
                          "type": "number"
                        },
                        "received_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        }
                      }
                    }
                  },
                  "po_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "number": {
                    "type": "integer"
                  },
                  "status": {
                    "enum": [
                      "draft",
                      "ordered",
                      "partial",
                      "received",
                      "cancelled"
                    ],
                    "type": "string",
                    "description": "partial: ordered, some received."
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ordered_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "total_minor": {
                    "type": "integer",
                    "description": "Ordered quantity x unit cost."
                  },
                  "vendor_name": {
                    "type": "string"
                  },
                  "received_cost_minor": {
                    "type": "integer",
                    "description": "What is in job cost now: received quantity x unit cost, as materials."
                  },
                  "bill_difference_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "bill_minor minus received_cost_minor, when billed."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "po_update",
          "description": "Change a draft purchase order's supplier, note or lines (lines replace all lines). Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "po_id"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "name",
                    "quantity",
                    "unit_cost_minor"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "maxLength": 200,
                      "minLength": 1
                    },
                    "unit": {
                      "type": "string",
                      "maxLength": 20,
                      "minLength": 1
                    },
                    "taxable": {
                      "type": "boolean"
                    },
                    "quantity": {
                      "type": "number",
                      "maximum": 999999999,
                      "exclusiveMinimum": 0
                    },
                    "unit_cost_minor": {
                      "type": "integer",
                      "maximum": 100000000000,
                      "minimum": 0
                    },
                    "unit_price_minor": {
                      "type": "integer",
                      "maximum": 100000000000,
                      "minimum": 0,
                      "description": "Optional price to the customer, copied to the material when received."
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "po_id": {
                "type": "string",
                "format": "uuid"
              },
              "vendor_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "po_id",
                  "shop_id",
                  "number",
                  "vendor_id",
                  "vendor_name",
                  "job_id",
                  "status",
                  "note",
                  "ordered_at",
                  "total_minor",
                  "received_cost_minor",
                  "bill_minor",
                  "bill_ref",
                  "bill_difference_minor",
                  "lines",
                  "created_at"
                ],
                "properties": {
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "line_no",
                        "name",
                        "unit",
                        "quantity",
                        "unit_cost_minor",
                        "unit_price_minor",
                        "taxable",
                        "received_quantity",
                        "cost_minor",
                        "received_cost_minor"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "line_no": {
                          "type": "integer"
                        },
                        "taxable": {
                          "type": "boolean"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "received_quantity": {
                          "type": "number"
                        },
                        "received_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        }
                      }
                    }
                  },
                  "po_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "number": {
                    "type": "integer"
                  },
                  "status": {
                    "enum": [
                      "draft",
                      "ordered",
                      "partial",
                      "received",
                      "cancelled"
                    ],
                    "type": "string",
                    "description": "partial: ordered, some received."
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ordered_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "total_minor": {
                    "type": "integer",
                    "description": "Ordered quantity x unit cost."
                  },
                  "vendor_name": {
                    "type": "string"
                  },
                  "received_cost_minor": {
                    "type": "integer",
                    "description": "What is in job cost now: received quantity x unit cost, as materials."
                  },
                  "bill_difference_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "bill_minor minus received_cost_minor, when billed."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "po_get",
          "description": "A purchase order with its lines, what was received (in job cost) and the supplier's bill. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "po_id"
            ],
            "properties": {
              "po_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "po_id",
              "shop_id",
              "number",
              "vendor_id",
              "vendor_name",
              "job_id",
              "status",
              "note",
              "ordered_at",
              "total_minor",
              "received_cost_minor",
              "bill_minor",
              "bill_ref",
              "bill_difference_minor",
              "lines",
              "created_at"
            ],
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "line_id",
                    "line_no",
                    "name",
                    "unit",
                    "quantity",
                    "unit_cost_minor",
                    "unit_price_minor",
                    "taxable",
                    "received_quantity",
                    "cost_minor",
                    "received_cost_minor"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "unit": {
                      "type": "string"
                    },
                    "line_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "line_no": {
                      "type": "integer"
                    },
                    "taxable": {
                      "type": "boolean"
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "cost_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    },
                    "unit_cost_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    },
                    "unit_price_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    },
                    "received_quantity": {
                      "type": "number"
                    },
                    "received_cost_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    }
                  }
                }
              },
              "po_id": {
                "type": "string",
                "format": "uuid"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "number": {
                "type": "integer"
              },
              "status": {
                "enum": [
                  "draft",
                  "ordered",
                  "partial",
                  "received",
                  "cancelled"
                ],
                "type": "string",
                "description": "partial: ordered, some received."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "bill_ref": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vendor_id": {
                "type": "string",
                "format": "uuid"
              },
              "bill_minor": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "ordered_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "total_minor": {
                "type": "integer",
                "description": "Ordered quantity x unit cost."
              },
              "vendor_name": {
                "type": "string"
              },
              "received_cost_minor": {
                "type": "integer",
                "description": "What is in job cost now: received quantity x unit cost, as materials."
              },
              "bill_difference_minor": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "bill_minor minus received_cost_minor, when billed."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "po_list",
          "description": "List purchase orders for the shop, or for one job or supplier, newest first. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "vendor_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "po_id",
                    "shop_id",
                    "number",
                    "vendor_id",
                    "vendor_name",
                    "job_id",
                    "status",
                    "note",
                    "ordered_at",
                    "total_minor",
                    "received_cost_minor",
                    "bill_minor",
                    "bill_ref",
                    "bill_difference_minor",
                    "lines",
                    "created_at"
                  ],
                  "properties": {
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "line_id",
                          "line_no",
                          "name",
                          "unit",
                          "quantity",
                          "unit_cost_minor",
                          "unit_price_minor",
                          "taxable",
                          "received_quantity",
                          "cost_minor",
                          "received_cost_minor"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "unit": {
                            "type": "string"
                          },
                          "line_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "line_no": {
                            "type": "integer"
                          },
                          "taxable": {
                            "type": "boolean"
                          },
                          "quantity": {
                            "type": "number"
                          },
                          "cost_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          },
                          "unit_cost_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          },
                          "unit_price_minor": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Amount in minor units of the currency (cents), or null."
                          },
                          "received_quantity": {
                            "type": "number"
                          },
                          "received_cost_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          }
                        }
                      }
                    },
                    "po_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "number": {
                      "type": "integer"
                    },
                    "status": {
                      "enum": [
                        "draft",
                        "ordered",
                        "partial",
                        "received",
                        "cancelled"
                      ],
                      "type": "string",
                      "description": "partial: ordered, some received."
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "bill_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "vendor_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "bill_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "ordered_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "total_minor": {
                      "type": "integer",
                      "description": "Ordered quantity x unit cost."
                    },
                    "vendor_name": {
                      "type": "string"
                    },
                    "received_cost_minor": {
                      "type": "integer",
                      "description": "What is in job cost now: received quantity x unit cost, as materials."
                    },
                    "bill_difference_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "bill_minor minus received_cost_minor, when billed."
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "po_markOrdered",
          "description": "Mark a draft purchase order as sent to the supplier (the agent or a person sends it). Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "po_id"
            ],
            "properties": {
              "po_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "po_id",
                  "shop_id",
                  "number",
                  "vendor_id",
                  "vendor_name",
                  "job_id",
                  "status",
                  "note",
                  "ordered_at",
                  "total_minor",
                  "received_cost_minor",
                  "bill_minor",
                  "bill_ref",
                  "bill_difference_minor",
                  "lines",
                  "created_at"
                ],
                "properties": {
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "line_no",
                        "name",
                        "unit",
                        "quantity",
                        "unit_cost_minor",
                        "unit_price_minor",
                        "taxable",
                        "received_quantity",
                        "cost_minor",
                        "received_cost_minor"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "line_no": {
                          "type": "integer"
                        },
                        "taxable": {
                          "type": "boolean"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "received_quantity": {
                          "type": "number"
                        },
                        "received_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        }
                      }
                    }
                  },
                  "po_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "number": {
                    "type": "integer"
                  },
                  "status": {
                    "enum": [
                      "draft",
                      "ordered",
                      "partial",
                      "received",
                      "cancelled"
                    ],
                    "type": "string",
                    "description": "partial: ordered, some received."
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ordered_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "total_minor": {
                    "type": "integer",
                    "description": "Ordered quantity x unit cost."
                  },
                  "vendor_name": {
                    "type": "string"
                  },
                  "received_cost_minor": {
                    "type": "integer",
                    "description": "What is in job cost now: received quantity x unit cost, as materials."
                  },
                  "bill_difference_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "bill_minor minus received_cost_minor, when billed."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "po_receive",
          "description": "Record parts that arrived. Each received line becomes a material on the job at the line's cost (this is the only way a purchase order reaches job cost; do not also add an expense for it). Leave lines out to receive everything left. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "po_id"
            ],
            "properties": {
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "line_id",
                    "quantity"
                  ],
                  "properties": {
                    "line_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "quantity": {
                      "type": "number",
                      "maximum": 999999999,
                      "exclusiveMinimum": 0
                    }
                  }
                },
                "maxItems": 200
              },
              "po_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "po_id",
                  "shop_id",
                  "number",
                  "vendor_id",
                  "vendor_name",
                  "job_id",
                  "status",
                  "note",
                  "ordered_at",
                  "total_minor",
                  "received_cost_minor",
                  "bill_minor",
                  "bill_ref",
                  "bill_difference_minor",
                  "lines",
                  "created_at",
                  "material_ids",
                  "next_actions"
                ],
                "properties": {
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "line_no",
                        "name",
                        "unit",
                        "quantity",
                        "unit_cost_minor",
                        "unit_price_minor",
                        "taxable",
                        "received_quantity",
                        "cost_minor",
                        "received_cost_minor"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "line_no": {
                          "type": "integer"
                        },
                        "taxable": {
                          "type": "boolean"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "received_quantity": {
                          "type": "number"
                        },
                        "received_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        }
                      }
                    }
                  },
                  "po_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "number": {
                    "type": "integer"
                  },
                  "status": {
                    "enum": [
                      "draft",
                      "ordered",
                      "partial",
                      "received",
                      "cancelled"
                    ],
                    "type": "string",
                    "description": "partial: ordered, some received."
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ordered_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "total_minor": {
                    "type": "integer",
                    "description": "Ordered quantity x unit cost."
                  },
                  "vendor_name": {
                    "type": "string"
                  },
                  "material_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "received_cost_minor": {
                    "type": "integer",
                    "description": "What is in job cost now: received quantity x unit cost, as materials."
                  },
                  "bill_difference_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "bill_minor minus received_cost_minor, when billed."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "po_undoReceipt",
          "description": "Take back a received material from a purchase order (wrong part, returned). It leaves job cost and the line can be received again. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "material_id"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "maxLength": 500
              },
              "material_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "po_id",
                  "shop_id",
                  "number",
                  "vendor_id",
                  "vendor_name",
                  "job_id",
                  "status",
                  "note",
                  "ordered_at",
                  "total_minor",
                  "received_cost_minor",
                  "bill_minor",
                  "bill_ref",
                  "bill_difference_minor",
                  "lines",
                  "created_at"
                ],
                "properties": {
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "line_no",
                        "name",
                        "unit",
                        "quantity",
                        "unit_cost_minor",
                        "unit_price_minor",
                        "taxable",
                        "received_quantity",
                        "cost_minor",
                        "received_cost_minor"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "line_no": {
                          "type": "integer"
                        },
                        "taxable": {
                          "type": "boolean"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "received_quantity": {
                          "type": "number"
                        },
                        "received_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        }
                      }
                    }
                  },
                  "po_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "number": {
                    "type": "integer"
                  },
                  "status": {
                    "enum": [
                      "draft",
                      "ordered",
                      "partial",
                      "received",
                      "cancelled"
                    ],
                    "type": "string",
                    "description": "partial: ordered, some received."
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ordered_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "total_minor": {
                    "type": "integer",
                    "description": "Ordered quantity x unit cost."
                  },
                  "vendor_name": {
                    "type": "string"
                  },
                  "received_cost_minor": {
                    "type": "integer",
                    "description": "What is in job cost now: received quantity x unit cost, as materials."
                  },
                  "bill_difference_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "bill_minor minus received_cost_minor, when billed."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "po_cancel",
          "description": "Cancel a purchase order that has nothing received (undo receipts first). Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "po_id"
            ],
            "properties": {
              "po_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "po_id",
                  "shop_id",
                  "number",
                  "vendor_id",
                  "vendor_name",
                  "job_id",
                  "status",
                  "note",
                  "ordered_at",
                  "total_minor",
                  "received_cost_minor",
                  "bill_minor",
                  "bill_ref",
                  "bill_difference_minor",
                  "lines",
                  "created_at"
                ],
                "properties": {
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "line_no",
                        "name",
                        "unit",
                        "quantity",
                        "unit_cost_minor",
                        "unit_price_minor",
                        "taxable",
                        "received_quantity",
                        "cost_minor",
                        "received_cost_minor"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "line_no": {
                          "type": "integer"
                        },
                        "taxable": {
                          "type": "boolean"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "received_quantity": {
                          "type": "number"
                        },
                        "received_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        }
                      }
                    }
                  },
                  "po_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "number": {
                    "type": "integer"
                  },
                  "status": {
                    "enum": [
                      "draft",
                      "ordered",
                      "partial",
                      "received",
                      "cancelled"
                    ],
                    "type": "string",
                    "description": "partial: ordered, some received."
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ordered_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "total_minor": {
                    "type": "integer",
                    "description": "Ordered quantity x unit cost."
                  },
                  "vendor_name": {
                    "type": "string"
                  },
                  "received_cost_minor": {
                    "type": "integer",
                    "description": "What is in job cost now: received quantity x unit cost, as materials."
                  },
                  "bill_difference_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "bill_minor minus received_cost_minor, when billed."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "po_recordBill",
          "description": "Record the supplier's bill for a purchase order, for paying the supplier. It is never added to job cost or expenses (the received materials already are); the difference from what was received is shown. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "po_id",
              "bill_minor"
            ],
            "properties": {
              "po_id": {
                "type": "string",
                "format": "uuid"
              },
              "bill_ref": {
                "type": "string",
                "maxLength": 100
              },
              "bill_minor": {
                "type": "integer",
                "maximum": 100000000000,
                "minimum": 0
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "po_id",
                  "shop_id",
                  "number",
                  "vendor_id",
                  "vendor_name",
                  "job_id",
                  "status",
                  "note",
                  "ordered_at",
                  "total_minor",
                  "received_cost_minor",
                  "bill_minor",
                  "bill_ref",
                  "bill_difference_minor",
                  "lines",
                  "created_at"
                ],
                "properties": {
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "line_no",
                        "name",
                        "unit",
                        "quantity",
                        "unit_cost_minor",
                        "unit_price_minor",
                        "taxable",
                        "received_quantity",
                        "cost_minor",
                        "received_cost_minor"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "line_no": {
                          "type": "integer"
                        },
                        "taxable": {
                          "type": "boolean"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "received_quantity": {
                          "type": "number"
                        },
                        "received_cost_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        }
                      }
                    }
                  },
                  "po_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "number": {
                    "type": "integer"
                  },
                  "status": {
                    "enum": [
                      "draft",
                      "ordered",
                      "partial",
                      "received",
                      "cancelled"
                    ],
                    "type": "string",
                    "description": "partial: ordered, some received."
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_ref": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vendor_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "bill_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "What the supplier billed (po.recordBill). For paying the supplier only; never job cost."
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ordered_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "total_minor": {
                    "type": "integer",
                    "description": "Ordered quantity x unit cost."
                  },
                  "vendor_name": {
                    "type": "string"
                  },
                  "received_cost_minor": {
                    "type": "integer",
                    "description": "What is in job cost now: received quantity x unit cost, as materials."
                  },
                  "bill_difference_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "bill_minor minus received_cost_minor, when billed."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "calendar_createFeed",
          "description": "Make a calendar feed link (.ics) of one worker's visits that a calendar app subscribes to (read only). Leave person_id out for your own; owner or office can make one for any current member. A new feed turns that person's old one off. The link is shown once.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "feed_id",
                  "shop_id",
                  "person_id",
                  "created_by",
                  "created_at",
                  "revoked_at",
                  "active",
                  "fetches",
                  "last_fetched_at",
                  "url",
                  "webcal_url",
                  "replaced_feed_id"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "feed_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "fetches": {
                    "type": "integer"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "person_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "revoked_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "webcal_url": {
                    "type": "string"
                  },
                  "last_fetched_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "replaced_feed_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "calendar_listFeeds",
          "description": "Calendar feeds in a shop, newest first, with whether each is active and how often it was fetched. Field workers see only their own. The link is not shown again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "feed_id",
                    "shop_id",
                    "person_id",
                    "created_by",
                    "created_at",
                    "revoked_at",
                    "active",
                    "fetches",
                    "last_fetched_at"
                  ],
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "feed_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "fetches": {
                      "type": "integer"
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "person_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "revoked_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "last_fetched_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "calendar_revokeFeed",
          "description": "Turn a calendar feed off now. Calendar apps that fetch it after this get 410 and stop showing new visits.",
          "inputSchema": {
            "type": "object",
            "required": [
              "feed_id"
            ],
            "properties": {
              "feed_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "feed_id",
                  "revoked_at"
                ],
                "properties": {
                  "feed_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "revoked_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "availability_setHours",
          "description": "Set a worker's weekly hours, replacing what was there. Days are 0 (Sunday) to 6, times are shop local HH:MM. An empty list means no set hours (always available).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "hours"
            ],
            "properties": {
              "hours": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "weekday",
                    "start",
                    "end"
                  ],
                  "properties": {
                    "end": {
                      "type": "string",
                      "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                    },
                    "start": {
                      "type": "string",
                      "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                    },
                    "weekday": {
                      "type": "integer",
                      "maximum": 6,
                      "minimum": 0
                    }
                  }
                },
                "maxItems": 28
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "availability_addTimeOff",
          "description": "Add time off for a worker (vacation, sick, appointment).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "starts_at",
              "ends_at"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "maxLength": 200
              },
              "ends_at": {
                "type": "string",
                "format": "date-time"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              },
              "starts_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "availability_removeTimeOff",
          "description": "Remove a time-off entry.",
          "inputSchema": {
            "type": "object",
            "required": [
              "time_off_id"
            ],
            "properties": {
              "time_off_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "availability_get",
          "description": "A worker's weekly hours, time off, and booked visits in a window (at most 62 days). Defaults to me.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "from",
              "to"
            ],
            "properties": {
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_settings",
          "description": "The shop's scheduling setup: time zone, booking hours (or the default when none are set), arrival window, travel buffer, reminder lead time, whether on the way notices go out, and whether arrival times are shown. on_my_way_notices covers both the on the way and the arrived notice. arrival_notices is off unless the shop turns it on. When on, an on the way message includes an arrival time when one is known (a stored route estimate, or the time the worker entered; no drive time is looked up). On the way and arrived each go by text and by email. Any worker in the shop can read it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "time_zone",
              "hours",
              "hours_source",
              "arrival_window_minutes",
              "buffer_minutes",
              "reminder_hours",
              "on_my_way_notices",
              "arrival_notices"
            ],
            "properties": {
              "hours": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "weekday",
                    "start",
                    "end"
                  ],
                  "properties": {
                    "end": {
                      "type": "string",
                      "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                    },
                    "start": {
                      "type": "string",
                      "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                    },
                    "weekday": {
                      "type": "integer",
                      "maximum": 6,
                      "minimum": 0
                    }
                  }
                }
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "time_zone": {
                "type": "string",
                "description": "IANA zone all shop-local times use."
              },
              "hours_source": {
                "enum": [
                  "shop",
                  "default"
                ],
                "type": "string",
                "description": "default means the shop set no hours and Monday to Friday 08:00 to 17:00 is assumed."
              },
              "time_zone_set": {
                "type": "boolean",
                "description": "False when the zone comes from the shop's jurisdiction."
              },
              "buffer_minutes": {
                "type": "integer"
              },
              "reminder_hours": {
                "type": "integer",
                "description": "0 means no appointment reminders."
              },
              "arrival_notices": {
                "type": "boolean",
                "description": "When true, an on the way message includes an arrival time when one is known (a stored route estimate, or the time the worker entered). Off by default. The arrived notice follows on_my_way_notices. No drive time is looked up."
              },
              "on_my_way_notices": {
                "type": "boolean"
              },
              "arrival_window_minutes": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_setShopHours",
          "description": "Set the shop's booking hours, replacing what was there (owner or office). Days are 0 (Sunday) to 6, times are shop local HH:MM, several blocks a day are fine. An empty list clears them, and find-a-time falls back to Monday to Friday 08:00 to 17:00. Visits outside these hours are still allowed and come back with outside_shop_hours.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "hours"
            ],
            "properties": {
              "hours": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "weekday",
                    "start",
                    "end"
                  ],
                  "properties": {
                    "end": {
                      "type": "string",
                      "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                    },
                    "start": {
                      "type": "string",
                      "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                    },
                    "weekday": {
                      "type": "integer",
                      "maximum": 6,
                      "minimum": 0
                    }
                  }
                },
                "maxItems": 28
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "time_zone",
                  "hours",
                  "hours_source",
                  "arrival_window_minutes",
                  "buffer_minutes",
                  "reminder_hours",
                  "on_my_way_notices",
                  "arrival_notices"
                ],
                "properties": {
                  "hours": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "weekday",
                        "start",
                        "end"
                      ],
                      "properties": {
                        "end": {
                          "type": "string",
                          "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                        },
                        "start": {
                          "type": "string",
                          "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                        },
                        "weekday": {
                          "type": "integer",
                          "maximum": 6,
                          "minimum": 0
                        }
                      }
                    }
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "time_zone": {
                    "type": "string",
                    "description": "IANA zone all shop-local times use."
                  },
                  "hours_source": {
                    "enum": [
                      "shop",
                      "default"
                    ],
                    "type": "string",
                    "description": "default means the shop set no hours and Monday to Friday 08:00 to 17:00 is assumed."
                  },
                  "time_zone_set": {
                    "type": "boolean",
                    "description": "False when the zone comes from the shop's jurisdiction."
                  },
                  "buffer_minutes": {
                    "type": "integer"
                  },
                  "reminder_hours": {
                    "type": "integer",
                    "description": "0 means no appointment reminders."
                  },
                  "arrival_notices": {
                    "type": "boolean",
                    "description": "When true, an on the way message includes an arrival time when one is known (a stored route estimate, or the time the worker entered). Off by default. The arrived notice follows on_my_way_notices. No drive time is looked up."
                  },
                  "on_my_way_notices": {
                    "type": "boolean"
                  },
                  "arrival_window_minutes": {
                    "type": "integer"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "schedule_setRules",
          "description": "Change the shop's scheduling rules (owner or office; the time zone is owner only). arrival_window_minutes is the default window customers are told for new visits (0 means an exact time). buffer_minutes is travel and setup time find-a-time keeps clear around booked visits. reminder_hours is how long before a visit the customer gets an appointment reminder (0 turns reminders off). on_my_way_notices tells the customer by text and by email when a worker says they are on the way. Text is the main one. The email goes whenever the customer has an email address, even if the text does not. arrival_notices (off by default) adds an arrival time to that message when one is known (a stored route estimate, or the time the worker entered; route data has no drive time, so with no worker time there is no arrival line). The arrived text and email follow on_my_way_notices, the same setting as the on the way message. A do-not-email address is not emailed. Only the fields you send change. Visits already booked keep their window and reminder.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "time_zone": {
                "type": "string",
                "maxLength": 64,
                "description": "IANA zone name, for example America/Boise."
              },
              "buffer_minutes": {
                "type": "integer",
                "maximum": 240,
                "minimum": 0
              },
              "reminder_hours": {
                "type": "integer",
                "maximum": 168,
                "minimum": 0
              },
              "arrival_notices": {
                "type": "boolean",
                "description": "When true, an on the way message includes an arrival time when one is known (a stored route estimate, or the time the worker entered). Off by default. The arrived notice follows on_my_way_notices. No drive time is looked up."
              },
              "on_my_way_notices": {
                "type": "boolean"
              },
              "arrival_window_minutes": {
                "type": "integer",
                "maximum": 480,
                "minimum": 0
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "time_zone",
                  "hours",
                  "hours_source",
                  "arrival_window_minutes",
                  "buffer_minutes",
                  "reminder_hours",
                  "on_my_way_notices",
                  "arrival_notices"
                ],
                "properties": {
                  "hours": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "weekday",
                        "start",
                        "end"
                      ],
                      "properties": {
                        "end": {
                          "type": "string",
                          "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                        },
                        "start": {
                          "type": "string",
                          "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
                        },
                        "weekday": {
                          "type": "integer",
                          "maximum": 6,
                          "minimum": 0
                        }
                      }
                    }
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "time_zone": {
                    "type": "string",
                    "description": "IANA zone all shop-local times use."
                  },
                  "hours_source": {
                    "enum": [
                      "shop",
                      "default"
                    ],
                    "type": "string",
                    "description": "default means the shop set no hours and Monday to Friday 08:00 to 17:00 is assumed."
                  },
                  "time_zone_set": {
                    "type": "boolean",
                    "description": "False when the zone comes from the shop's jurisdiction."
                  },
                  "buffer_minutes": {
                    "type": "integer"
                  },
                  "reminder_hours": {
                    "type": "integer",
                    "description": "0 means no appointment reminders."
                  },
                  "arrival_notices": {
                    "type": "boolean",
                    "description": "When true, an on the way message includes an arrival time when one is known (a stored route estimate, or the time the worker entered). Off by default. The arrived notice follows on_my_way_notices. No drive time is looked up."
                  },
                  "on_my_way_notices": {
                    "type": "boolean"
                  },
                  "arrival_window_minutes": {
                    "type": "integer"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "schedule_findTime",
          "description": "Find open times for a visit of a given length; each slot has starts_at in UTC plus local shop time and tz (for example local 2026-11-10 8:00 AM, tz America/Boise). Looks inside shop hours (or Monday to Friday 08:00 to 17:00 when none are set), skips worker time off and times outside a worker's own hours, and keeps the shop's travel buffer clear around booked visits. Give person_ids or a saved crew_id (or both) to check those workers (together: all of them free at once, the default; or any one of them). Leave it out to check every worker in the shop and get back who is free. A lead can check the crews they belong to or lead. Field workers can only check themselves. Nothing is booked; call visits.create with a slot.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "duration_minutes"
            ],
            "properties": {
              "to": {
                "type": "string",
                "format": "date-time",
                "description": "Latest end. Default 14 days after from; at most 31 days after it."
              },
              "from": {
                "type": "string",
                "format": "date-time",
                "description": "Earliest start. Default now."
              },
              "limit": {
                "type": "integer",
                "maximum": 50,
                "minimum": 1,
                "description": "Default 10."
              },
              "crew_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "together": {
                "type": "boolean"
              },
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 10,
                "uniqueItems": true
              },
              "step_minutes": {
                "type": "integer",
                "maximum": 240,
                "minimum": 5,
                "description": "Spacing between candidate starts. Default 30."
              },
              "duration_minutes": {
                "type": "integer",
                "maximum": 720,
                "minimum": 15
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "time_zone",
              "hours_source",
              "buffer_minutes",
              "slots"
            ],
            "properties": {
              "slots": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "starts_at",
                    "ends_at",
                    "arrive_by",
                    "person_ids",
                    "local",
                    "tz"
                  ],
                  "properties": {
                    "tz": {
                      "type": "string",
                      "description": "IANA zone of local, for example America/Boise."
                    },
                    "local": {
                      "type": "string",
                      "description": "starts_at in the shop's time zone, for example 2026-11-10 8:00 AM."
                    },
                    "ends_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "arrive_by": {
                      "type": "string",
                      "format": "date-time",
                      "description": "End of the arrival window to tell the customer."
                    },
                    "starts_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "person_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                }
              },
              "time_zone": {
                "type": "string"
              },
              "hours_source": {
                "enum": [
                  "shop",
                  "default"
                ],
                "type": "string"
              },
              "buffer_minutes": {
                "type": "integer"
              },
              "arrival_window_minutes": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_onTheWay",
          "description": "Mark that the worker is on the way to a visit, with an optional ETA (eta_at, or eta_minutes from now). The worker on the visit (or the office) can do this. When the shop has on the way notices on, the customer gets a text and an email. Text is the main one. The email goes whenever the customer has an email address, even if the text is blocked, refused, or does not go through. When arrival notices are also on, the message includes an arrival time: a route estimate when the visit already has one, otherwise the time the worker entered, otherwise no arrival line. Route data stores the booked start and the arrival window, not a drive time. Doing Work does not look up a drive time.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "eta_at": {
                "type": "string",
                "format": "date-time"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "eta_minutes": {
                "type": "integer",
                "maximum": 600,
                "minimum": 1
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "visit_id",
                  "status"
                ],
                "properties": {
                  "eta_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "status": {
                    "type": "string"
                  },
                  "visit_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "customer_notice": {
                    "enum": [
                      "queued",
                      "off",
                      "already"
                    ],
                    "type": "string",
                    "description": "Whether a customer notice was queued. On the way, that is the on the way message. Arrived, that is the arrived message. Both follow on_my_way_notices. It is sent only if the customer can be reached."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "visits_arrived",
          "description": "Mark that the worker arrived at a visit. The worker on the visit (or the office) can do this. Any on the way message not yet sent is dropped. When on the way notices are on, the customer gets one arrived text and one arrived email. Text is the main one. The email goes whenever the customer has an email address, even if the text does not. A do-not-email address is not emailed. Once only.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "visit_id",
                  "status"
                ],
                "properties": {
                  "eta_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "status": {
                    "type": "string"
                  },
                  "visit_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "customer_notice": {
                    "enum": [
                      "queued",
                      "off",
                      "already"
                    ],
                    "type": "string",
                    "description": "Whether a customer notice was queued. On the way, that is the on the way message. Arrived, that is the arrived message. Both follow on_my_way_notices. It is sent only if the customer can be reached."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "visit_on_my_way",
          "description": "Mark that the worker is on the way to a visit when they tell their agent, for example on my way, there by 2. eta is that time in their words and can be left out. A worker may call this only for a visit they are assigned to. The owner or office may call it for any visit in the shop. When on the way notices are on, the customer gets a text and an email. Text is the main one. The email goes whenever the customer has an email address, even if the text is blocked, refused, or does not go through. When arrival notices are also on, the message includes the time the worker gave. A repeat call does not send again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "eta": {
                "type": "string",
                "maxLength": 80,
                "description": "A time the worker says, for example there by 2, 2:30 PM, or 20 minutes. Leave it out when they do not give a time."
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "visit_id",
                  "status",
                  "customer_notice",
                  "repeated"
                ],
                "properties": {
                  "eta_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "status": {
                    "type": "string"
                  },
                  "repeated": {
                    "type": "boolean",
                    "description": "True when the visit was already in this state. A repeat call does not send the notice again and does not change the arrival time."
                  },
                  "visit_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "customer_notice": {
                    "enum": [
                      "queued",
                      "off",
                      "already"
                    ],
                    "type": "string",
                    "description": "queued: a customer notice was queued. off: the shop setting is off, so nothing was queued. already: this visit was already in this state, so nothing was sent again."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "visit_arrived",
          "description": "Mark that the worker has arrived at a visit when they tell their agent, for example I am here. A worker may call this only for a visit they are assigned to. The owner or office may call it for any visit in the shop. When on the way notices are on, the customer gets one arrived text and one arrived email. Text is the main one. The email goes whenever the customer has an email address, even if the text does not. A do-not-email address is not emailed. When on the way notices are off, this sends nothing. A repeat call does not send again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "visit_id",
                  "status",
                  "customer_notice",
                  "repeated"
                ],
                "properties": {
                  "eta_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "status": {
                    "type": "string"
                  },
                  "repeated": {
                    "type": "boolean",
                    "description": "True when the visit was already in this state. A repeat call does not send the notice again and does not change the arrival time."
                  },
                  "visit_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "customer_notice": {
                    "enum": [
                      "queued",
                      "off",
                      "already"
                    ],
                    "type": "string",
                    "description": "queued: a customer notice was queued. off: the shop setting is off, so nothing was queued. already: this visit was already in this state, so nothing was sent again."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "visits_notices",
          "description": "Customer notices planned or handled for a visit (appointment reminder, on the way, arrived), with status pending, queued (handed to text, email, or both), cancelled or skipped and why. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "visit_id",
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "enum": [
                        "appointment_reminder",
                        "on_my_way",
                        "arrived"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "status": {
                      "enum": [
                        "pending",
                        "queued",
                        "cancelled",
                        "skipped"
                      ],
                      "type": "string"
                    },
                    "outcome": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "notice_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "finished_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "customer_email_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_openSlots",
          "description": "Times the shop marked open for its voice agent to book (upcoming only), and which are booked. Any worker in the shop can read it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "slot_id",
                    "starts_at",
                    "ends_at",
                    "booked",
                    "kind"
                  ],
                  "properties": {
                    "kind": {
                      "enum": [
                        "routine",
                        "emergency"
                      ],
                      "type": "string"
                    },
                    "booked": {
                      "type": "boolean"
                    },
                    "ends_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "slot_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "starts_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "request_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_addOpenSlots",
          "description": "Mark times open for the shop's voice agent to book callers into (owner or office). The agent books them only when phone.setVoiceAi has book_open_slots true, which is off by default. Each slot is at most 12 hours and in the future. A booked slot becomes a request with that time for the office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "slots"
            ],
            "properties": {
              "slots": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "starts_at",
                    "ends_at"
                  ],
                  "properties": {
                    "kind": {
                      "enum": [
                        "routine",
                        "emergency"
                      ],
                      "type": "string",
                      "description": "emergency: held for emergency calls only, booked by the voice agent only when the shop turned on emergency handling (phone.setEmergency). Default routine."
                    },
                    "ends_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "starts_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "maxItems": 50,
                "minItems": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "slot_id",
                        "starts_at",
                        "ends_at",
                        "booked",
                        "kind"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "routine",
                            "emergency"
                          ],
                          "type": "string"
                        },
                        "booked": {
                          "type": "boolean"
                        },
                        "ends_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "slot_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "starts_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "request_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_removeOpenSlot",
          "description": "Take back an open time that is not booked yet (owner or office).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "slot_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "slot_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "slot_id",
                        "starts_at",
                        "ends_at",
                        "booked",
                        "kind"
                      ],
                      "properties": {
                        "kind": {
                          "enum": [
                            "routine",
                            "emergency"
                          ],
                          "type": "string"
                        },
                        "booked": {
                          "type": "boolean"
                        },
                        "ends_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "slot_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "starts_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "request_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "schedule_bookingPage",
          "description": "Read the shop's public booking URL settings and Google Actions Center NAP readiness (booking_url, google_booking_url, service_zips, trade, and any missing NAP fields). Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "enabled",
              "slug",
              "booking_url",
              "google_booking_url",
              "show_open_times",
              "google_enabled",
              "trade",
              "service_zips",
              "job_types",
              "nap",
              "nap_ready",
              "missing_nap",
              "next_actions"
            ],
            "properties": {
              "nap": {
                "type": "object",
                "required": [
                  "name",
                  "phone",
                  "address",
                  "jurisdiction_id"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "jurisdiction_id": {
                    "type": "string"
                  }
                }
              },
              "slug": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "trade": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "enabled": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "job_types": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "name",
                    "minutes"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "minutes": {
                      "type": "integer"
                    }
                  }
                }
              },
              "nap_ready": {
                "type": "boolean"
              },
              "booking_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "missing_nap": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "service_zips": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "google_enabled": {
                "type": "boolean"
              },
              "show_open_times": {
                "type": "boolean"
              },
              "google_booking_url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_setBookingPage",
          "description": "Configure the shop's hosted public booking page (/p/book/<slug>) for Google Business Profile and Google Actions Center. Setting google_enabled true requires enabled true, slug, trade, service_zips, contact_phone, and mailing_address matching Google Business Profile (owner only to update contact_phone or mailing_address; owner or office for booking fields).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "slug": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[a-z0-9][a-z0-9-]{2,60}$"
              },
              "trade": {
                "enum": [
                  "painting",
                  "fencing",
                  "gutters",
                  "roofing",
                  "siding",
                  "windows_doors",
                  "plumbing",
                  "electrical",
                  "hvac",
                  "landscaping",
                  "lawn_care",
                  "tree_service",
                  "concrete_masonry",
                  "decks_patios",
                  "flooring",
                  "drywall",
                  "carpentry",
                  "cabinets_countertops",
                  "remodeling",
                  "handyman",
                  "cleaning",
                  "pressure_washing",
                  "pest_control",
                  "junk_removal",
                  "moving",
                  "appliance_repair",
                  "garage_doors",
                  "insulation",
                  "foundation",
                  "septic",
                  "pools",
                  "solar",
                  "locksmith",
                  "other",
                  null
                ],
                "type": [
                  "string",
                  "null"
                ]
              },
              "enabled": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "service_zips": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[0-9]{5}$"
                },
                "maxItems": 500,
                "uniqueItems": true
              },
              "contact_phone": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40
              },
              "google_enabled": {
                "type": "boolean"
              },
              "mailing_address": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 300
              },
              "show_open_times": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "enabled",
                  "slug",
                  "booking_url",
                  "google_booking_url",
                  "show_open_times",
                  "google_enabled",
                  "trade",
                  "service_zips",
                  "job_types",
                  "nap",
                  "nap_ready",
                  "missing_nap",
                  "next_actions"
                ],
                "properties": {
                  "nap": {
                    "type": "object",
                    "required": [
                      "name",
                      "phone",
                      "address",
                      "jurisdiction_id"
                    ],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "address": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "jurisdiction_id": {
                        "type": "string"
                      }
                    }
                  },
                  "slug": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "trade": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "job_types": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "name",
                        "minutes"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "minutes": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "nap_ready": {
                    "type": "boolean"
                  },
                  "booking_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "missing_nap": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "service_zips": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "google_enabled": {
                    "type": "boolean"
                  },
                  "show_open_times": {
                    "type": "boolean"
                  },
                  "google_booking_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "shops_setInvoiceReminders",
          "description": "Turn the automatic unpaid-invoice reminder on or off for the whole shop (owner only). When on, a customer gets one friendly email reminder a set number of days (default 1) after an invoice or deposit request is sent if it is still unpaid. Mail comes from a doingwork.work address on the shop's behalf, with replies going to the owner.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "delay_days": {
                "type": "integer",
                "maximum": 30,
                "minimum": 1,
                "description": "Days after a send before the reminder goes out. Default 1."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "shops_setContact",
          "description": "Set the phone and email customers see when they open a canceled invoice or quote link (owner only). Leave a field out or send null to fall back to the owner's own email and phone.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "An email address customers can write to."
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Up to 40 characters."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "phone",
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "shops_setFieldCosts",
          "description": "Let field workers in the shop see job costs (labor cost, material cost, expenses others entered, price book cost), or hide them again (owner only). Off by default. A worker whose own see_costs is off still does not see costs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "field_see_costs"
                ],
                "properties": {
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "field_see_costs": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "shops_setHubLinkInEmails",
          "description": "Turn the customer hub link in quote and invoice emails on or off for the whole shop (owner only). On by default: each quote or invoice email the customer gets from Doing Work ends with a link to their hub, where they see their quotes, invoices and visits with you.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "hub_link_in_emails"
                ],
                "properties": {
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "hub_link_in_emails": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "invoices_setReminder",
          "description": "Turn the automatic unpaid reminder on or off for one invoice (owner or office).",
          "inputSchema": {
            "type": "object",
            "required": [
              "invoice_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "invoice_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "pricebook_saveItem",
          "description": "Add a price book item, or change one when item_id is given (owner or office). AI can draft a quote line from an item. The owner approves it before the quote is sent.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "service",
                  "material",
                  "task"
                ],
                "type": "string",
                "description": "task: a flat rate task that bundles labor and parts at one price"
              },
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "unit": {
                "type": "string",
                "maxLength": 20,
                "description": "each, hour, foot, and so on"
              },
              "parts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "item_id",
                    "quantity"
                  ],
                  "properties": {
                    "item_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "quantity": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    }
                  }
                },
                "maxItems": 50,
                "description": "Tasks only: the price book materials the task uses, for costing. Never shown as a price and never taken from stock on its own."
              },
              "item_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "taxable": {
                "type": "boolean"
              },
              "category": {
                "type": "string",
                "maxLength": 80,
                "description": "Category name; made if new"
              },
              "task_code": {
                "type": "string",
                "maxLength": 40,
                "description": "Tasks only: the shop's code, like AC-CAP. Unique in the shop. Empty string clears it."
              },
              "cost_minor": {
                "type": "integer",
                "minimum": 0,
                "description": "What it costs the shop, in cents. Never shown to customers."
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "est_minutes": {
                "type": "integer",
                "maximum": 100000,
                "minimum": 0,
                "description": "Tasks only: estimated labor minutes, for costing"
              },
              "warranty_note": {
                "type": "string",
                "maxLength": 500,
                "description": "Shown to the customer with the task, like 1 year parts and labor. Empty string clears it."
              },
              "markup_percent": {
                "type": "number",
                "maximum": 1000,
                "minimum": 0,
                "description": "Instead of unit_price_minor: price = cost times (1 + markup/100), rounded to the cent"
              },
              "unit_price_minor": {
                "type": "integer",
                "minimum": 0,
                "description": "Price to the customer, in cents"
              },
              "member_price_minor": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "description": "Tasks only: price for customers on an active maintenance plan, in cents. Not above the price. null clears it."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "pricebook_list",
          "description": "List the shop's price book items, by name. Filter by category or text; archived items are left out unless asked for. cost_minor is null for a worker the owner has not let see costs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "q": {
                "type": "string",
                "maxLength": 100
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "category": {
                "type": "string"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "pricebook_archiveItem",
          "description": "Archive a price book item, or bring it back with archived false (owner or office). Quotes that used it keep their lines.",
          "inputSchema": {
            "type": "object",
            "required": [
              "item_id"
            ],
            "properties": {
              "item_id": {
                "type": "string",
                "format": "uuid"
              },
              "archived": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "templates_save",
          "description": "Save a quote template: worker-written lines (and good, better, best options) to start quotes from. Give template_id to replace one (owner or office).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "name",
              "lines"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description",
                    "quantity",
                    "unit_price_minor"
                  ],
                  "properties": {
                    "kind": {
                      "enum": [
                        "item",
                        "fee",
                        "discount"
                      ],
                      "type": "string",
                      "description": "item (default), fee (trip charge, disposal, card fee) or discount. For a discount, enter the amount off as a positive unit_price_minor."
                    },
                    "taxable": {
                      "type": "boolean",
                      "description": "Counts toward tax when the quote or invoice has a tax rate. Default true."
                    },
                    "optional": {
                      "type": "boolean",
                      "description": "The customer can add or leave out this line when signing."
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "option_key": {
                      "type": "string",
                      "description": "Put this line only in the option with this key. Leave out for a line shared by every option."
                    },
                    "description": {
                      "type": "string"
                    },
                    "unit_price_minor": {
                      "type": "integer"
                    }
                  }
                }
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "label"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Like good, better, best"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "description": "Good, better, best: 2 to 5 options the customer chooses one of when signing. Each needs its own lines."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "template_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "templates_list",
          "description": "List the shop's saved quote templates with their lines. To use one, pass its lines and options to quotes.create, changed as the worker says.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "templates_archive",
          "description": "Archive a quote template, or bring it back with archived false (owner or office).",
          "inputSchema": {
            "type": "object",
            "required": [
              "template_id"
            ],
            "properties": {
              "archived": {
                "type": "boolean"
              },
              "template_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "quotes_activity",
          "description": "What the customer has done with a quote: when each version was first opened and how often, and any decline or change request with its note.",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id"
            ],
            "properties": {
              "quote_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shops_setQuoteFollowup",
          "description": "Set how many days after a quote is sent the customer gets one friendly follow-up email if they have not answered (owner only). 0 turns it off. Default 3.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "days"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "maximum": 30,
                "minimum": 0
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "invoices_create",
          "description": "Create an invoice without a quote (AI can draft lines; a person who can send invoices approves agent-drafted lines before the invoice is sent). Optional due date, memo and deposit. Send it with invoices.send.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "lines"
            ],
            "properties": {
              "memo": {
                "type": "string",
                "maxLength": 2000
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description",
                    "quantity",
                    "unit_price_minor"
                  ],
                  "properties": {
                    "kind": {
                      "enum": [
                        "item",
                        "fee",
                        "discount"
                      ],
                      "type": "string",
                      "description": "item (default), fee (trip charge, disposal, card fee) or discount. For a discount, enter the amount off as a positive unit_price_minor."
                    },
                    "taxable": {
                      "type": "boolean",
                      "description": "Counts toward tax when the quote or invoice has a tax rate. Default true."
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "unit_price_minor": {
                      "type": "integer"
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "due_on": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "tax_rate_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Tax rate to charge. Leave out for the shop default rate; null for no tax."
              },
              "deposit_minor": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "invoices_createBatch",
          "description": "Create many invoices at once (up to 100), each from a job and the lines the worker wrote. All or nothing. With send=true each is sent and its pay link returned. An agent cannot send lines it drafted; a person who can send invoices does that.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "items"
            ],
            "properties": {
              "send": {
                "type": "boolean"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "lines"
                  ],
                  "properties": {
                    "memo": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "description",
                          "quantity",
                          "unit_price_minor"
                        ],
                        "properties": {
                          "kind": {
                            "enum": [
                              "item",
                              "fee",
                              "discount"
                            ],
                            "type": "string",
                            "description": "item (default), fee (trip charge, disposal, card fee) or discount. For a discount, enter the amount off as a positive unit_price_minor."
                          },
                          "taxable": {
                            "type": "boolean",
                            "description": "Counts toward tax when the quote or invoice has a tax rate. Default true."
                          },
                          "quantity": {
                            "type": "number"
                          },
                          "description": {
                            "type": "string",
                            "maxLength": 500
                          },
                          "unit_price_minor": {
                            "type": "integer"
                          }
                        }
                      },
                      "maxItems": 200,
                      "minItems": 1
                    },
                    "due_on": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "tax_rate_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                },
                "maxItems": 100,
                "minItems": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "invoices_get",
          "description": "One invoice with doc_no and doc_label (I-12), its lines, what has been paid, the balance, the due date, and whether a bank payment is still clearing. payments lists each card or bank payment: id is the charge_id invoices.refund takes, plus amount, method, status, paid_at, refunded amount and refunds. refunded_minor is money sent back. net_collected_minor is what remains of the payment after that. A payment status is refunded or partially_refunded once the processor confirms. collected_minor stays the amount that was paid, and balance_minor stays what is still owed, which is 0 after a refund. display_status is payment_pending while a bank payment clears (3 to 5 business days), otherwise the invoice status. last_bank_payment_failed_at is set when the latest bank payment failed and the customer can pay again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "invoice_id"
            ],
            "properties": {
              "invoice_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "invoice_id",
              "job_id",
              "status",
              "currency",
              "doc_no",
              "doc_label",
              "total_minor",
              "collected_minor",
              "refunded_minor",
              "net_collected_minor",
              "balance_minor",
              "written_off_minor",
              "deposit_minor",
              "issued_at",
              "due_on",
              "memo",
              "bank_payment_clearing",
              "display_status",
              "last_bank_payment_failed_at",
              "payments",
              "lines",
              "next_actions"
            ],
            "properties": {
              "tax": {
                "type": "object",
                "required": [
                  "name",
                  "jurisdiction",
                  "rate_bps",
                  "taxable_minor",
                  "tax_minor"
                ],
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rate_bps": {
                    "type": "integer"
                  },
                  "tax_minor": {
                    "type": "integer",
                    "description": "Amount in minor units of the currency (cents)."
                  },
                  "jurisdiction": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "taxable_minor": {
                    "type": "integer",
                    "description": "Amount in minor units of the currency (cents)."
                  }
                }
              },
              "memo": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "position",
                    "description",
                    "quantity",
                    "unit_price_minor",
                    "kind",
                    "taxable",
                    "amount_minor"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "taxable": {
                      "type": "boolean"
                    },
                    "position": {
                      "type": "integer"
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "description": {
                      "type": "string"
                    },
                    "amount_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    },
                    "unit_price_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    }
                  }
                }
              },
              "doc_no": {
                "type": "integer"
              },
              "due_on": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "payments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "invoice_id",
                    "amount_minor",
                    "method",
                    "status",
                    "paid_at",
                    "refunded_minor",
                    "refunds"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "method": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "paid_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "refunds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "amount_minor",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "amount_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          }
                        }
                      }
                    },
                    "invoice_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "amount_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    },
                    "refunded_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    }
                  }
                }
              },
              "doc_label": {
                "type": "string"
              },
              "issued_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "invoice_id": {
                "type": "string",
                "format": "uuid"
              },
              "total_minor": {
                "type": "integer",
                "description": "Amount in minor units of the currency (cents)."
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "balance_minor": {
                "type": "integer",
                "description": "Amount in minor units of the currency (cents)."
              },
              "deposit_minor": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Amount in minor units of the currency (cents), or null."
              },
              "display_status": {
                "type": "string"
              },
              "refunded_minor": {
                "type": "integer",
                "description": "Money sent back on this invoice, in cents."
              },
              "collected_minor": {
                "type": "integer",
                "description": "Amount in minor units of the currency (cents)."
              },
              "written_off_minor": {
                "type": "integer",
                "description": "Amount in minor units of the currency (cents)."
              },
              "net_collected_minor": {
                "type": "integer",
                "description": "What remains after refunds and lost disputes, never below 0."
              },
              "bank_payment_clearing": {
                "type": "boolean"
              },
              "last_bank_payment_failed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "invoices_list",
          "description": "Invoices in one shop, newest first. Filter by status or by a customer name or invoice id. Read only. A shop you are not a member of is refused. Seeing the amounts needs see_prices, the same as invoices.get.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "q": {
                "type": "string",
                "maxLength": 200
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "cursor": {
                "type": "string",
                "maxLength": 500
              },
              "status": {
                "enum": [
                  "draft",
                  "sent",
                  "partially_paid",
                  "paid",
                  "partially_refunded",
                  "refunded",
                  "void"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data",
              "next_cursor",
              "time_zone",
              "summary",
              "display"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "invoice_id",
                    "job_id",
                    "status",
                    "customer",
                    "total_minor",
                    "total_text",
                    "doc_no",
                    "doc_label",
                    "currency",
                    "issued_at",
                    "due_on",
                    "created_at"
                  ],
                  "properties": {
                    "doc_no": {
                      "type": "integer"
                    },
                    "due_on": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "enum": [
                        "draft",
                        "sent",
                        "partially_paid",
                        "paid",
                        "partially_refunded",
                        "refunded",
                        "void"
                      ],
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "customer": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "doc_label": {
                      "type": "string"
                    },
                    "issued_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "invoice_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "total_text": {
                      "type": "string"
                    },
                    "total_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    }
                  }
                }
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "time_zone": {
                "type": "string"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "invoices_pdf",
          "description": "The invoice as a PDF (base64), with shop, customer, lines, paid so far and balance. Attach it to email or save it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "invoice_id"
            ],
            "properties": {
              "invoice_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "invoices_aging",
          "description": "Accounts receivable aging (limit is accepted and ignored; totals include every open invoice): every open invoice's balance by how late it is (current, 1-30, 31-60, 61-90, over 90 days past due), with totals per customer (owner or office); an invoice with no due date is due when sent.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "as_of": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "Accepted and ignored. Aging has no page. Totals include every open invoice. List ops default to 50 rows when limit is left out."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "payments_list",
          "description": "Card and bank payments in one shop, newest first. Each id is the charge_id invoices.refund takes. Read only. A shop you are not a member of is refused. Amounts need see_prices.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "How many rows to return. Default 50 when you leave it out. An integer, or a numeric string such as \"50\"."
              },
              "cursor": {
                "type": "string",
                "maxLength": 500
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data",
              "next_cursor"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "invoice_id",
                    "amount_minor",
                    "method",
                    "status",
                    "paid_at",
                    "refunded_minor",
                    "refunds"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "method": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "paid_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "refunds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "amount_minor",
                          "created_at"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "amount_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          }
                        }
                      }
                    },
                    "invoice_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "amount_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    },
                    "refunded_minor": {
                      "type": "integer",
                      "description": "Money sent back on this payment, in cents."
                    }
                  }
                }
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "payments_get",
          "description": "One card or bank payment, with the amount sent back and each refund. id is the charge_id invoices.refund takes. Read only. A payment in a shop you are not a member of is not found. Amounts need see_prices.",
          "inputSchema": {
            "type": "object",
            "required": [
              "charge_id"
            ],
            "properties": {
              "charge_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "id",
              "invoice_id",
              "amount_minor",
              "method",
              "status",
              "paid_at",
              "refunded_minor",
              "refunds"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "method": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "paid_at": {
                "type": "string",
                "format": "date-time"
              },
              "refunds": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "amount_minor",
                    "created_at"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "amount_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    }
                  }
                }
              },
              "invoice_id": {
                "type": "string",
                "format": "uuid"
              },
              "amount_minor": {
                "type": "integer",
                "description": "Amount in minor units of the currency (cents)."
              },
              "refunded_minor": {
                "type": "integer",
                "description": "Money sent back on this payment, in cents."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shops_setTips",
          "description": "Turn tips on or off on this shop's invoice pay page (owner only). Off by default. A tip is paid with the invoice, never counts toward the invoice total, and shows in tips.report.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "shops_setReviewRequest",
          "description": "Set the review link (for example your Google review page, https only) and how many days after an invoice is paid the customer gets one email asking for a review (owner only). No link means no email. Default 1 day; 0 turns it off. Review emails show the shop name and mailing_address in the footer, so a link can only be set once the shop has a mailing address (send it here).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "maximum": 30,
                "minimum": 0
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "review_url": {
                "type": "string",
                "maxLength": 500
              },
              "mailing_address": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "tips_report",
          "description": "Tips customers paid, by invoice and in total, between two dates (owner or office). Tips are kept apart from invoice totals. Refunds of a payment are not split out from its tip.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "from",
              "to"
            ],
            "properties": {
              "to": {
                "type": "string",
                "description": "YYYY-MM-DD, inclusive. Dates are in the shop's own time zone."
              },
              "from": {
                "type": "string",
                "description": "YYYY-MM-DD"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shops_getBrand",
          "description": "How this shop's quotes and invoices look: accent color, license number, footer text, logo size, and whether \"Sent with Doing Work\" shows.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "accent_color",
              "accent_contrast",
              "license_number",
              "footer",
              "sent_with_doing_work",
              "logo"
            ],
            "properties": {
              "logo": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "bytes": {
                    "type": "integer"
                  },
                  "width": {
                    "type": "integer"
                  },
                  "height": {
                    "type": "integer"
                  }
                }
              },
              "footer": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "accent_color": {
                "type": "string"
              },
              "license_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "accent_contrast": {
                "type": "number"
              },
              "sent_with_doing_work": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shops_setBrand",
          "description": "Set how this shop's quotes, invoices and emails to customers look, on the customer's page, in the PDF and in every email (owner only). The owner can also change it on the brand page at /p/shop/brand. Send only what changes; null clears a field. The footer is footer or footer_text (the same field). accent_color is \"#rrggbb\" and must reach 4.5 to 1 contrast on white (the default is #1f4fd1). logo_base64 is a PNG or JPEG of up to 5 MB, stored as a JPEG of at most 600 pixels on its long side. sent_with_doing_work (on by default) prints \"Sent with Doing Work\" in the PDF footer, on the page and at the bottom of emails.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "footer": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Up to 300 characters printed at the bottom, such as payment terms or a thank you."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "footer_text": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Same as footer. Either name is accepted."
              },
              "logo_base64": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A PNG or JPEG file, base64. null removes the logo."
              },
              "accent_color": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "\"#rrggbb\", dark enough to read on white. null goes back to the default."
              },
              "license_number": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Up to 80 characters, printed as \"License ...\"."
              },
              "sent_with_doing_work": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "accent_color",
                  "accent_contrast",
                  "license_number",
                  "footer",
                  "sent_with_doing_work",
                  "logo"
                ],
                "properties": {
                  "logo": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "bytes": {
                        "type": "integer"
                      },
                      "width": {
                        "type": "integer"
                      },
                      "height": {
                        "type": "integer"
                      }
                    }
                  },
                  "footer": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "accent_color": {
                    "type": "string"
                  },
                  "license_number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "accent_contrast": {
                    "type": "number"
                  },
                  "sent_with_doing_work": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "quotes_pdf",
          "description": "A quote as a PDF (base64) in the shop's brand: logo, accent color, license number, lines, options, the written scope of work when the version has notes, and total. The date is in the shop's time zone (priv.shop_time_zone: the shop's own zone, otherwise its state's). The file is named Q-10.pdf from doc_no, or quote- plus the id when there is no number. An unsent draft's footer says Draft instead of Sent with Doing Work. Financing links use the signed total once the customer has signed, and the lowest option until then. The latest version unless version is given. Attach it to email or save it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id"
            ],
            "properties": {
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "quote_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "quote_id",
              "version",
              "filename",
              "content_type",
              "bytes",
              "base64"
            ],
            "properties": {
              "bytes": {
                "type": "integer"
              },
              "base64": {
                "type": "string"
              },
              "version": {
                "type": "integer"
              },
              "filename": {
                "type": "string"
              },
              "quote_id": {
                "type": "string",
                "format": "uuid"
              },
              "content_type": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "cards_setupLink",
          "description": "Get a secure page where the customer saves a card with the shop's payment processor (owner or office). Send the link to the customer; Doing Work never sees the card number. Saving a new card replaces the old one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "cards_get",
          "description": "The card a customer has on file (brand, last 4, expiry) and whether auto-pay is on (owner or office).",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "cards_remove",
          "description": "Remove a customer's saved card (owner or office). Auto-pay turns off with it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id"
            ],
            "properties": {
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "customers_setAutopay",
          "description": "Turn auto-pay on or off for a customer (owner or office). On needs a saved card. With auto-pay on, each invoice sent to them is charged to the card on its due date (or the day it is sent if it has none). A failed charge is not retried; you get an email and the pay link still works.",
          "inputSchema": {
            "type": "object",
            "required": [
              "customer_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "maintenance_createPlan",
          "description": "Start a maintenance plan for a job's customer (owner or office). AI can draft the priced lines for one term; the owner approves them before the plan is sent. The first term's invoice is created now (and sent if send_first is true). When a term ends, the next term's invoice is created automatically and sent if auto_send is on. With visits_per_term, each term also gets that many service due dates (see services.listDue), so the shop knows when each covered visit is due; schedule the actual visit with visits.create as usual.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "name",
              "term_months",
              "lines"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description",
                    "quantity",
                    "unit_price_minor"
                  ],
                  "properties": {
                    "kind": {
                      "enum": [
                        "item",
                        "fee",
                        "discount"
                      ],
                      "type": "string",
                      "description": "item (default), fee (trip charge, disposal, card fee) or discount. For a discount, enter the amount off as a positive unit_price_minor."
                    },
                    "taxable": {
                      "type": "boolean",
                      "description": "Counts toward tax when the quote or invoice has a tax rate. Default true."
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "unit_price_minor": {
                      "type": "integer"
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "auto_send": {
                "type": "boolean"
              },
              "starts_on": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "send_first": {
                "type": "boolean"
              },
              "tax_rate_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Tax rate each term charges. Leave out for the shop default rate; null for no tax."
              },
              "term_months": {
                "type": "integer"
              },
              "visit_title": {
                "type": "string",
                "maxLength": 190,
                "minLength": 1,
                "description": "What each visit is called, for example \"Furnace tune-up\". Default: the plan name and \"visit\"."
              },
              "visits_per_term": {
                "type": "integer",
                "maximum": 12,
                "minimum": 0,
                "description": "Visits the plan covers each term, for example 2 for two tune-ups a year. Each term gets that many service due dates, spread evenly from the term's start. Default 0."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "maintenance_getPlan",
          "description": "One maintenance plan: price per term, current term, renewal date, each term's invoice, and this term's covered visits with the next one due.",
          "inputSchema": {
            "type": "object",
            "required": [
              "plan_id"
            ],
            "properties": {
              "plan_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "maintenance_listPlans",
          "description": "A shop's maintenance plans, optionally for one customer or by status, soonest renewal first.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "status": {
                "enum": [
                  "active",
                  "cancelled"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "maintenance_setPrice",
          "description": "Replace a plan's priced lines (owner or office), and optionally its tax rate. An agent can only propose the lines: they wait until the owner or office confirms them with maintenance.confirmPrice. A person who is the owner or office writes them now. Applies from the next term's invoice; invoices already made keep their price.",
          "inputSchema": {
            "type": "object",
            "required": [
              "plan_id",
              "lines"
            ],
            "properties": {
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description",
                    "quantity",
                    "unit_price_minor"
                  ],
                  "properties": {
                    "kind": {
                      "enum": [
                        "item",
                        "fee",
                        "discount"
                      ],
                      "type": "string",
                      "description": "item (default), fee (trip charge, disposal, card fee) or discount. For a discount, enter the amount off as a positive unit_price_minor."
                    },
                    "taxable": {
                      "type": "boolean",
                      "description": "Counts toward tax when the quote or invoice has a tax rate. Default true."
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "unit_price_minor": {
                      "type": "integer"
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "plan_id": {
                "type": "string",
                "format": "uuid"
              },
              "tax_rate_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Tax rate each term charges. Leave out to keep the plan's current rate; null for no tax."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "maintenance_setVisits",
          "description": "Change how many visits a plan covers each term, and what they are called (owner or office). Applies from the next term. Pass this_term true to also add them now to the current term when it has none yet.",
          "inputSchema": {
            "type": "object",
            "required": [
              "plan_id",
              "visits_per_term"
            ],
            "properties": {
              "plan_id": {
                "type": "string",
                "format": "uuid"
              },
              "this_term": {
                "type": "boolean"
              },
              "visit_title": {
                "type": "string",
                "maxLength": 190,
                "minLength": 1,
                "description": "What each visit is called, for example \"Furnace tune-up\". Default: the plan name and \"visit\"."
              },
              "visits_per_term": {
                "type": "integer",
                "maximum": 12,
                "minimum": 0,
                "description": "Visits the plan covers each term, for example 2 for two tune-ups a year. Each term gets that many service due dates, spread evenly from the term's start. Default 0."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "plan_id",
                  "visits_per_term",
                  "visit_title",
                  "next_visit",
                  "term_visits"
                ],
                "properties": {
                  "plan_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "next_visit": {
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "term_visits": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "service_due_id",
                        "title",
                        "due_on",
                        "status"
                      ],
                      "properties": {
                        "title": {
                          "type": "string"
                        },
                        "due_on": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "service_due_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  },
                  "visit_title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visits_per_term": {
                    "type": "integer"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "maintenance_cancelPlan",
          "description": "Cancel a maintenance plan (owner or office). No more renewal invoices. Invoices already sent stay as they are. The plan's open visit due dates are cancelled.",
          "inputSchema": {
            "type": "object",
            "required": [
              "plan_id"
            ],
            "properties": {
              "plan_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "taxes_saveRate",
          "description": "Add or change a sales tax rate the shop charges in one jurisdiction (owner or office). You enter the rate; Doing Work never looks it up. rate_bps is hundredths of a percent (600 = 6%). Changing a rate applies to new quotes and invoices only. is_default makes it the rate used when a quote or invoice does not name one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "name",
              "jurisdiction",
              "rate_bps"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 80
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "rate_bps": {
                "type": "integer"
              },
              "is_default": {
                "type": "boolean"
              },
              "tax_rate_id": {
                "type": "string",
                "format": "uuid"
              },
              "jurisdiction": {
                "type": "string",
                "maxLength": 80,
                "description": "Where it applies, as you name it, for example \"ID Kootenai County\""
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "taxes_listRates",
          "description": "The shop's tax rates. Archived (replaced or removed) rates are left out unless include_archived is true.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "taxes_archiveRate",
          "description": "Stop using a tax rate (owner or office). Quotes and invoices that already used it keep it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "tax_rate_id"
            ],
            "properties": {
              "tax_rate_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "shops_setTaxReportBasis",
          "description": "Choose how the sales tax report counts a period (owner only). accrual (default): invoices sent in the period. cash: money collected in the period, after refunds. Pick the one your state files on.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "basis"
            ],
            "properties": {
              "basis": {
                "enum": [
                  "accrual",
                  "cash"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "taxes_salesReport",
          "description": "Sales tax report for a period (owner or office), shop local dates, from and to inclusive. Uses the shop's basis (shops.setTaxReportBasis) unless basis is given. accrual: invoices sent in the period, with sales, taxable sales, tax billed, and tax collected so far. cash: money collected in the period through Doing Work (payments minus refunds, tips left out), with the tax share of it. Grouped by the tax name, jurisdiction and rate on each invoice. Untaxed sales are one row with no rate. Void invoices are left out. For filing, check the numbers against your own records.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "from",
              "to"
            ],
            "properties": {
              "to": {
                "type": "string",
                "format": "date"
              },
              "from": {
                "type": "string",
                "format": "date"
              },
              "basis": {
                "enum": [
                  "accrual",
                  "cash"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "quotes_addAttachment",
          "description": "Show an uploaded photo or file of the same job with a quote, with an optional caption. Upload it first with the media ops. The customer sees it on the quote page.",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id",
              "media_id"
            ],
            "properties": {
              "caption": {
                "type": "string",
                "maxLength": 300
              },
              "media_id": {
                "type": "string"
              },
              "quote_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "quotes_removeAttachment",
          "description": "Take a photo or file off a quote. The media item itself stays on the job.",
          "inputSchema": {
            "type": "object",
            "required": [
              "attachment_id"
            ],
            "properties": {
              "attachment_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "quotes_listAttachments",
          "description": "Photos and files shown with a quote, in order.",
          "inputSchema": {
            "type": "object",
            "required": [
              "quote_id"
            ],
            "properties": {
              "quote_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_tag",
          "description": "Add or remove tags on a photo (for example: leak, panel, permit). Tags are lower case; returns the photo's tags.",
          "inputSchema": {
            "type": "object",
            "required": [
              "media_id"
            ],
            "properties": {
              "add": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 40
                },
                "maxItems": 20
              },
              "remove": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 40
                },
                "maxItems": 20
              },
              "media_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "tags_list",
          "description": "Every tag used in the shop, with how many photos and jobs carry it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_search",
          "description": "Find photos across the shop that carry all the given tags. Narrow by job, stage, or upload dates (shop time zone). Newest first, up to 200.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "to": {
                "type": "string",
                "description": "YYYY-MM-DD, inclusive"
              },
              "from": {
                "type": "string",
                "description": "YYYY-MM-DD"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 40
                },
                "maxItems": 20
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1
              },
              "stage": {
                "enum": [
                  "before",
                  "during",
                  "after",
                  "other"
                ],
                "type": "string"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "jobs_findByTag",
          "description": "Jobs in the shop that carry all the given tags (set with jobs.setTags), newest first, up to 200.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "tags"
            ],
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 40
                },
                "maxItems": 20
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "media_saveMarkup",
          "description": "Save markup over a photo as a new layer version: arrows, lines, boxes, circles, text and freehand strokes in 0..1 photo coordinates (0,0 is top left). The photo is never changed; earlier versions are kept. An empty list clears the markup.",
          "inputSchema": {
            "type": "object",
            "required": [
              "media_id",
              "shapes"
            ],
            "properties": {
              "shapes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "type",
                    "points"
                  ],
                  "properties": {
                    "text": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "type": {
                      "enum": [
                        "arrow",
                        "line",
                        "rect",
                        "ellipse",
                        "text",
                        "freehand"
                      ],
                      "type": "string"
                    },
                    "color": {
                      "type": "string",
                      "description": "#rrggbb, default #ff3b30"
                    },
                    "width": {
                      "type": "integer",
                      "maximum": 20,
                      "minimum": 1
                    },
                    "points": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "number"
                        }
                      },
                      "description": "[x, y] pairs from 0 to 1. Text: 1 point. Freehand: 2 to 500. Others: 2 (start and end, or two corners)."
                    }
                  }
                },
                "maxItems": 200
              },
              "media_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "media_getMarkup",
          "description": "A photo's markup: the latest version unless one is named, with an SVG overlay to lay over the original photo. Also lists all versions.",
          "inputSchema": {
            "type": "object",
            "required": [
              "media_id"
            ],
            "properties": {
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "media_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shares_create",
          "description": "Make a link to a gallery of a job's photos that anyone with the link can open without signing in. Name the photos, or leave media_ids out to share every photo on the job (including ones added later). When object storage is configured, videos on the job can be included too. Expires after days (1 to 90, default 14); revoke it any time. Markup shows over the photos unless include_markup is false. Set include_daily_log to also show the job's daily log entries (off by default; names of who wrote them are not shown). The url is shown once.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "maximum": 90,
                "minimum": 1
              },
              "title": {
                "type": "string",
                "maxLength": 120
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "media_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 200,
                "minItems": 1
              },
              "include_markup": {
                "type": "boolean"
              },
              "include_daily_log": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shares_list",
          "description": "Photo share links on a job, newest first, with whether each is still active and how often it was opened. The link itself is not shown again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shares_revoke",
          "description": "Turn a photo share link off now. Anyone opening it after this sees that it is no longer available.",
          "inputSchema": {
            "type": "object",
            "required": [
              "share_id"
            ],
            "properties": {
              "share_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "logs_add",
          "description": "Write a daily log entry on a job: what happened on site that day, in the worker's own words. Any shop member can add one. log_date defaults to today in the shop's time zone. Attach photos already on the job with media_ids.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "body"
            ],
            "properties": {
              "body": {
                "type": "string",
                "maxLength": 5000,
                "minLength": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "log_date": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "media_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 50
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "logs_list",
          "description": "Daily log entries on a job, oldest first, optionally between two dates (inclusive). Removed entries are left out.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "to": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "from": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "logs_remove",
          "description": "Take a daily log entry out of the log. Only the worker who wrote it or the owner can. It stays in history and in any PDF already made.",
          "inputSchema": {
            "type": "object",
            "required": [
              "entry_id"
            ],
            "properties": {
              "entry_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "documents_photoReport",
          "description": "Render a photo report PDF for a job: a title and the worker's own notes, then the job's photos in time order with stage and tags. Name photos with media_ids or leave it out for every photo on the job. Core stores the PDF with its sha256 and returns it (base64).",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "notes": {
                "type": "string",
                "maxLength": 10000
              },
              "title": {
                "type": "string",
                "maxLength": 120
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "media_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 200,
                "minItems": 1
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "documents_dailyLog",
          "description": "Render the daily log for a job as a PDF: each day's entries in the workers' own words with who wrote them, and the photos they attached. Optional from and to dates (inclusive). Core stores the PDF with its sha256 and returns it (base64).",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "to": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "from": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_photos": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "documents_list",
          "description": "PDF documents core made for a job (photo reports, daily logs and submitted forms), newest first, with each file's sha256.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "documents_get",
          "description": "One stored job PDF (base64) with its sha256, byte for byte as it was made.",
          "inputSchema": {
            "type": "object",
            "required": [
              "document_id"
            ],
            "properties": {
              "document_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "expenses_add",
          "description": "Record money a worker spent on a job, with the receipt photo. Parts received on a purchase order are already job cost; when the vendor matches a received purchase order on the job, possible_po_duplicates lists it so you can ask before keeping both. The worker types the amount and tax from the receipt; core never reads or fills in amounts. spent_on defaults to today in the shop's time zone.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "amount_minor"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 1000
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "vendor": {
                "type": "string",
                "maxLength": 120
              },
              "category": {
                "enum": [
                  "materials",
                  "equipment",
                  "subcontractor",
                  "permit",
                  "fuel",
                  "disposal",
                  "other"
                ],
                "type": "string"
              },
              "spent_on": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "tax_minor": {
                "type": "integer",
                "minimum": 0,
                "description": "Tax part of amount_minor, typed by the worker. Default 0."
              },
              "amount_minor": {
                "type": "integer",
                "minimum": 1,
                "description": "Total paid in cents, typed by the worker from the receipt."
              },
              "receipt_media_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "expenses_update",
          "description": "Change an expense: date, vendor, category, amount, tax, receipt photo or note. Amounts are still typed by a worker. The worker who entered it, the owner or office can change it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "expense_id"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 1000
              },
              "vendor": {
                "type": "string",
                "maxLength": 120
              },
              "category": {
                "enum": [
                  "materials",
                  "equipment",
                  "subcontractor",
                  "permit",
                  "fuel",
                  "disposal",
                  "other"
                ],
                "type": "string"
              },
              "spent_on": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "tax_minor": {
                "type": "integer",
                "minimum": 0,
                "description": "Tax part of amount_minor, typed by the worker. Default 0."
              },
              "expense_id": {
                "type": "string",
                "format": "uuid"
              },
              "amount_minor": {
                "type": "integer",
                "minimum": 1,
                "description": "Total paid in cents, typed by the worker from the receipt."
              },
              "receipt_media_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "expenses_remove",
          "description": "Take an expense off the books (kept in history). The worker who entered it, the owner or office can.",
          "inputSchema": {
            "type": "object",
            "required": [
              "expense_id"
            ],
            "properties": {
              "expense_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "expenses_list",
          "description": "Expenses on a job, or across the shop between dates, with totals by category. Owner and office see every expense; a field worker sees the ones they entered.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "to": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "from": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "category": {
                "enum": [
                  "materials",
                  "equipment",
                  "subcontractor",
                  "permit",
                  "fuel",
                  "disposal",
                  "other"
                ],
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "search_global",
          "description": "Search one shop for customers (name, email, phone), properties (address), equipment (kind, make, model, serial, notes), jobs (summary), requests (title), notes (words, on any record) and photos and videos (what the agent said they show, readable text such as serial numbers, video transcripts). Case-insensitive; you see only what your role can read.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "q"
            ],
            "properties": {
              "q": {
                "type": "string",
                "maxLength": 100,
                "minLength": 2
              },
              "limit": {
                "type": "integer",
                "maximum": 50,
                "minimum": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "customers",
              "properties",
              "equipment",
              "jobs",
              "requests",
              "notes",
              "media"
            ],
            "properties": {
              "jobs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "customer_id",
                    "status",
                    "summary"
                  ],
                  "properties": {
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              },
              "media": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "media_id",
                    "job_id",
                    "kind",
                    "stage",
                    "summary"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "stage": {
                      "type": "string"
                    },
                    "job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "note_id",
                    "target_kind",
                    "target_id",
                    "job_id",
                    "audience",
                    "snippet",
                    "created_at"
                  ],
                  "properties": {
                    "job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "note_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "snippet": {
                      "type": "string"
                    },
                    "audience": {
                      "type": "string"
                    },
                    "target_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "target_kind": {
                      "type": "string"
                    }
                  }
                }
              },
              "requests": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "customer_id",
                    "title"
                  ],
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "customer_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              },
              "customers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "customer_id",
                    "name",
                    "email",
                    "phone"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "equipment": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "equipment_id",
                    "property_id",
                    "customer_id",
                    "kind",
                    "make",
                    "model",
                    "serial",
                    "notes"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "make": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "model": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "notes": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "serial": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "property_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "equipment_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "properties": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "property_id",
                    "customer_id",
                    "label",
                    "address_line1"
                  ],
                  "properties": {
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "property_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "address_line1": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "events_catalog",
          "description": "Every event a webhook can receive, with its payload keys and types. Approved agent actions add requested_by_token_id to any event.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "webhooks_deliveries",
          "description": "List deliveries to one webhook endpoint, newest first, with event, status, attempts and last HTTP status.",
          "inputSchema": {
            "type": "object",
            "required": [
              "endpoint_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1
              },
              "status": {
                "enum": [
                  "pending",
                  "succeeded",
                  "failed",
                  "dead"
                ],
                "type": "string"
              },
              "before_id": {
                "type": "integer"
              },
              "endpoint_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "webhooks_retry",
          "description": "Send a failed or dead delivery again from attempt 0 (owner or office).",
          "inputSchema": {
            "type": "object",
            "required": [
              "delivery_id"
            ],
            "properties": {
              "delivery_id": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "imports_fields",
          "description": "The customer import fields and the built-in presets (jobber, housecall_pro, servicetitan, companycam) with the export column each reads.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "imports_preview",
          "description": "Dry run of a customer CSV import. Writes nothing. Returns the headers, a suggested mapping (from a preset or the header names), and for every row the customer it would create or the problems found. Show the mapping to the owner before imports.run. next_actions says what to do next.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "csv"
            ],
            "properties": {
              "csv": {
                "type": "string",
                "minLength": 1
              },
              "preset": {
                "enum": [
                  "jobber",
                  "housecall_pro",
                  "servicetitan",
                  "companycam"
                ],
                "type": "string"
              },
              "source": {
                "type": "string",
                "pattern": "^[a-z0-9_]{1,40}$",
                "description": "Where the file came from (jobber, housecall_pro, ...). Old ids are remembered per source. Defaults to the preset, or csv."
              },
              "mapping": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "column",
                    "field"
                  ],
                  "properties": {
                    "field": {
                      "enum": [
                        "name",
                        "first_name",
                        "last_name",
                        "is_company",
                        "company_name",
                        "email",
                        "phone",
                        "lead_source",
                        "tags",
                        "notes",
                        "external_id",
                        "property.line1",
                        "property.line2",
                        "property.locality",
                        "property.region",
                        "property.postal_code",
                        "property.full_address",
                        "billing.line1",
                        "billing.line2",
                        "billing.locality",
                        "billing.region",
                        "billing.postal_code",
                        "billing.country",
                        "skip"
                      ],
                      "type": "string"
                    },
                    "column": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "maxItems": 300
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "on_match": {
                "enum": [
                  "skip",
                  "update"
                ],
                "type": "string",
                "description": "A row that matches a customer already in Doing Work (by old id, then email, then phone): skip (default) leaves it; update fills blanks, adds tags and a new service address, and never replaces an email or phone."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "imports_run",
          "description": "Owner only: import customers (and one service address each) from a CSV with the mapping the owner confirmed. mode all_or_nothing (default) writes nothing if any row fails; per_row writes the good rows and reports the rest. dry_run true checks without writing.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "csv",
              "mapping"
            ],
            "properties": {
              "csv": {
                "type": "string",
                "minLength": 1
              },
              "mode": {
                "enum": [
                  "all_or_nothing",
                  "per_row"
                ],
                "type": "string"
              },
              "source": {
                "type": "string",
                "pattern": "^[a-z0-9_]{1,40}$",
                "description": "Where the file came from (jobber, housecall_pro, ...). Old ids are remembered per source. Defaults to the preset, or csv."
              },
              "dry_run": {
                "type": "boolean"
              },
              "mapping": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "column",
                    "field"
                  ],
                  "properties": {
                    "field": {
                      "enum": [
                        "name",
                        "first_name",
                        "last_name",
                        "is_company",
                        "company_name",
                        "email",
                        "phone",
                        "lead_source",
                        "tags",
                        "notes",
                        "external_id",
                        "property.line1",
                        "property.line2",
                        "property.locality",
                        "property.region",
                        "property.postal_code",
                        "property.full_address",
                        "billing.line1",
                        "billing.line2",
                        "billing.locality",
                        "billing.region",
                        "billing.postal_code",
                        "billing.country",
                        "skip"
                      ],
                      "type": "string"
                    },
                    "column": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "maxItems": 300
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "on_match": {
                "enum": [
                  "skip",
                  "update"
                ],
                "type": "string",
                "description": "A row that matches a customer already in Doing Work (by old id, then email, then phone): skip (default) leaves it; update fills blanks, adds tags and a new service address, and never replaces an email or phone."
              },
              "preview_hash": {
                "type": "string",
                "format": "sha256",
                "pattern": "^[0-9a-fA-F]{64}$",
                "description": "The preview_hash from imports.preview, 64 hex characters. When sent, the run is refused if the file or mapping changed since that preview."
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "imports_historyFields",
          "description": "Fields for importing history from another system (jobs with visit history, open quotes, unpaid invoices, price book, equipment, maintenance plans as service-due reminders, payment history as read-only records) and the jobber and housecall_pro presets per kind. imports.historyPreview include_won also keeps won and declined quotes as history for pricing. Quote files may add a size: a Unit or UOM column with quantity, or a column whose header is the unit (Sq Ft, Square Feet, Linear Feet, LF). The preview shows that size. The description is used only when no size column is mapped. The Jobber preset is beta: its column names may not match a real export. We import what we can and skip the rest.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "kinds",
              "fields",
              "presets",
              "beta",
              "note"
            ],
            "properties": {
              "beta": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "note": {
                "type": "string"
              },
              "kinds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "fields": {
                "type": "object"
              },
              "presets": {
                "type": "object"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "imports_historyPreview",
          "description": "Dry run of a history import (kind jobs, quotes, invoices, pricebook, equipment, maintenance_plans, payments or flat_rate). Writes no shop data. Returns a suggested mapping, what each record would do (create, update, skip, skip_blank, skip_closed or error) with how its customer matched, and a preview_hash. Show it to the owner; imports.historyRun needs the same hash. include_won true (quotes only) imports won and declined quotes as history instead of skip_closed. History prices later drafts and is never sent or billed. Quote rows with a size column include sizes (400 sq ft) so the owner can confirm. A column header that is a unit supplies that unit. The description is used only when no size column is mapped. The Jobber preset is beta. Columns it cannot map are skipped, the summary says what would be skipped and why, and that skip is logged (column names and a short reason only).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "kind",
              "csv"
            ],
            "properties": {
              "csv": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "enum": [
                  "jobs",
                  "quotes",
                  "invoices",
                  "pricebook",
                  "equipment",
                  "maintenance_plans",
                  "payments",
                  "flat_rate"
                ],
                "type": "string"
              },
              "preset": {
                "enum": [
                  "jobber",
                  "housecall_pro"
                ],
                "type": "string"
              },
              "source": {
                "type": "string",
                "pattern": "^[a-z0-9_]{1,40}$",
                "description": "Where the file came from, like jobber or housecall_pro. Old ids are remembered per source. Defaults to the preset, or csv."
              },
              "mapping": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "column",
                    "field"
                  ],
                  "properties": {
                    "field": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "column": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "maxItems": 300
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "on_match": {
                "enum": [
                  "skip",
                  "update"
                ],
                "type": "string",
                "description": "What to do with a record already imported (same old id) or already in Doing Work. skip (default) leaves it as it is; update refreshes jobs (summary, status, new visits) and price book items. Quotes and invoices are never changed after import."
              },
              "plans_as": {
                "enum": [
                  "reminders",
                  "billed"
                ],
                "type": "string",
                "description": "maintenance_plans only. reminders (default): service due reminders, no money. billed: real maintenance plans at the price per term in the file, which the owner confirms in the preview. Each plan's next invoice is made on its next due date and is not sent on its own (auto_send off)."
              },
              "include_won": {
                "type": "boolean",
                "description": "Quotes only. true imports won quotes (approved, accepted, signed, won, converted) as signed history and declined quotes as declined history. History prices new drafts. It is never sent, invoiced, followed up, or listed as work to bill. Default false skips those rows. Expired, archived, and cancelled quotes stay skipped."
              },
              "equipment_kind": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "equipment kind only: the type for every row when the file has no type column, like Furnace for a Jobber custom field \"Furnace Model\". Guessed from the column names when left out; the preview returns it."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "kind",
              "source",
              "on_match",
              "include_won",
              "equipment_kind",
              "headers",
              "mapping",
              "preview_hash",
              "records",
              "create",
              "update",
              "skip",
              "skip_closed",
              "failed",
              "row_errors",
              "items"
            ],
            "properties": {
              "kind": {
                "type": "string"
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "skip": {
                "type": "integer"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "create": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              },
              "source": {
                "type": "string"
              },
              "update": {
                "type": "integer"
              },
              "headers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "mapping": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "records": {
                "type": "integer"
              },
              "summary": {
                "type": "string"
              },
              "on_match": {
                "type": "string"
              },
              "row_errors": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "include_won": {
                "type": "boolean"
              },
              "skip_closed": {
                "type": "integer"
              },
              "preview_hash": {
                "type": "string"
              },
              "equipment_kind": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "skipped_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "imports_historyRun",
          "description": "Owner only: write a history import the owner confirmed in imports.historyPreview (send its preview_hash, plus the same csv, kind, source, on_match, include_won and mapping). Records already imported are matched by old id and skipped or updated, never duplicated. Imported open quotes and invoices are drafts and are not sent. With include_won, won and declined quotes are imported as history: they price later drafts, and they are never sent, invoiced, followed up, or shown as signed work to bill. Maintenance plans become service-due reminders (no invoice, no charge), or with plans_as billed, maintenance plans at the confirmed price with auto_send off and no invoice until the next due date; payments become read-only history records (no charge, no fee, no invoice change). flat_rate rows become price book tasks, matched by old id, then task code, then name. mode all_or_nothing (default) or per_row. The Jobber preset is beta: a row or column it cannot map is skipped, the rest are imported, and the summary says what was skipped and why.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "kind",
              "csv",
              "mapping",
              "preview_hash"
            ],
            "properties": {
              "csv": {
                "type": "string",
                "minLength": 1
              },
              "kind": {
                "enum": [
                  "jobs",
                  "quotes",
                  "invoices",
                  "pricebook",
                  "equipment",
                  "maintenance_plans",
                  "payments",
                  "flat_rate"
                ],
                "type": "string"
              },
              "mode": {
                "enum": [
                  "all_or_nothing",
                  "per_row"
                ],
                "type": "string"
              },
              "source": {
                "type": "string",
                "pattern": "^[a-z0-9_]{1,40}$",
                "description": "Where the file came from, like jobber or housecall_pro. Old ids are remembered per source. Defaults to the preset, or csv."
              },
              "mapping": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "column",
                    "field"
                  ],
                  "properties": {
                    "field": {
                      "type": "string",
                      "maxLength": 60
                    },
                    "column": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "maxItems": 300
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "on_match": {
                "enum": [
                  "skip",
                  "update"
                ],
                "type": "string",
                "description": "What to do with a record already imported (same old id) or already in Doing Work. skip (default) leaves it as it is; update refreshes jobs (summary, status, new visits) and price book items. Quotes and invoices are never changed after import."
              },
              "plans_as": {
                "enum": [
                  "reminders",
                  "billed"
                ],
                "type": "string",
                "description": "maintenance_plans only. reminders (default): service due reminders, no money. billed: real maintenance plans at the price per term in the file, which the owner confirms in the preview. Each plan's next invoice is made on its next due date and is not sent on its own (auto_send off)."
              },
              "include_won": {
                "type": "boolean",
                "description": "Quotes only. true imports won quotes (approved, accepted, signed, won, converted) as signed history and declined quotes as declined history. History prices new drafts. It is never sent, invoiced, followed up, or listed as work to bill. Default false skips those rows. Expired, archived, and cancelled quotes stay skipped."
              },
              "preview_hash": {
                "type": "string",
                "format": "sha256",
                "pattern": "^[0-9a-fA-F]{64}$",
                "description": "The preview_hash from imports.historyPreview, 64 hex characters."
              },
              "equipment_kind": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "equipment kind only: the type for every row when the file has no type column, like Furnace for a Jobber custom field \"Furnace Model\". Guessed from the column names when left out; the preview returns it."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "mode",
                  "written",
                  "failed",
                  "results"
                ],
                "properties": {
                  "mode": {
                    "type": "string"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "failed": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "created": {
                    "type": "integer"
                  },
                  "results": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "skipped": {
                    "type": "integer"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "updated": {
                    "type": "integer"
                  },
                  "written": {
                    "type": "integer"
                  },
                  "skipped_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "imports_paymentHistory",
          "description": "Owner or office: payments imported from another system (read-only history; never charged, never counted toward Doing Work fees). Filter by customer_id.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 500,
                "minimum": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "payments",
              "total_minor"
            ],
            "properties": {
              "payments": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "total_minor": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shops_export",
          "description": "Owner only: everything the shop holds as one ZIP: data/<table>.csv and data/<table>.json for every shop table, files/ with job photos (and the original HEIC or TIFF file next to its JPEG copy) and PDFs, and manifest.json. Signing secrets and token hashes are left out. By default you get download_url, a link that works for 60 minutes and up to 5 downloads; anyone with the link can download, so do not share it. delivery \"inline\" returns zip_base64 instead, only for exports up to 10 MB. Large shops: pass include_files false for data only.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "delivery": {
                "enum": [
                  "link",
                  "inline"
                ],
                "type": "string",
                "description": "link (default): a short-lived download_url. inline: zip_base64 in the response, up to 10 MB."
              },
              "link_minutes": {
                "type": "integer",
                "maximum": 1440,
                "minimum": 5,
                "description": "How long the download link works. Default 60."
              },
              "include_files": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "filename",
              "content_type",
              "bytes",
              "sha256",
              "delivery",
              "tables",
              "skipped_tables",
              "files"
            ],
            "properties": {
              "bytes": {
                "type": "integer"
              },
              "files": {
                "type": "integer"
              },
              "sha256": {
                "type": "string"
              },
              "tables": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "delivery": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "export_id": {
                "type": "string",
                "format": "uuid"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "zip_base64": {
                "type": "string"
              },
              "content_type": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              },
              "max_downloads": {
                "type": "integer"
              },
              "skipped_tables": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "keys_list",
          "description": "List a shop's named agent keys (owner only): label, scopes, audience, when made, last used (last_used_at, to the minute; null and never_used true if the key was never used) and revoked. Keys don't expire; revoke a key the shop no longer uses. The key itself is never returned. Filter by audience (any or mcp) or include revoked keys.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string"
              },
              "audience": {
                "enum": [
                  "any",
                  "mcp"
                ],
                "type": "string"
              },
              "include_revoked": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "keys"
            ],
            "properties": {
              "keys": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key_id",
                    "label",
                    "last_used_at",
                    "never_used"
                  ],
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "key_id": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "used_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Same as last_used_at (kept for older agents)."
                    },
                    "audience": {
                      "enum": [
                        "any",
                        "mcp"
                      ],
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "never_used": {
                      "type": "boolean"
                    },
                    "revoked_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "accepted_at": {
                      "type": "string"
                    },
                    "last_used_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the key last signed a request, to the minute. Null if never used."
                    },
                    "terms_version": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "keys_revoke",
          "description": "Revoke a named agent key (owner only). It stops working at once and cannot be turned back on; make a new key instead.",
          "inputSchema": {
            "type": "object",
            "required": [
              "key_id"
            ],
            "properties": {
              "key_id": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "keys_connections",
          "description": "List every outside agent connected to the shop through OAuth (owner only): which worker connected it, the client name, whether it reaches only this shop or all of that worker's shops, scopes, when connected, last used and revoked. Any worker can connect an agent that acts as themselves; the owner sees all of them.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string"
              },
              "include_revoked": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "connections"
            ],
            "properties": {
              "connections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string"
                    },
                    "shops": {
                      "enum": [
                        "this_shop",
                        "all_my_shops"
                      ],
                      "type": "string"
                    },
                    "client": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "scopes": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      }
                    },
                    "worker": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "worker_id": {
                      "type": "string"
                    },
                    "revoked_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "connected_at": {
                      "type": "string"
                    },
                    "last_used_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "worker_email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "connection_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "keys_revokeConnection",
          "description": "Revoke an outside agent a worker connected through OAuth (owner only). Its access and refresh tokens stop at once. A connection that reaches all of that worker's shops ends everywhere.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "connection_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string"
              },
              "connection_id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "revoked"
                ],
                "properties": {
                  "revoked": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "agents_register",
          "description": "Preferred when you know the owner's email: type service_auth and login_hint. The reply's short fields come first: claim_attempt_token, user_code, claim_token, claim_page, then verification_uri. Use verification_uri only when its length matches verification_uri_length. If it was cut, build the link from claim_page and claim_attempt_token. Do not invent the host. Do not open claim_url alone. Do not register again when complete is missing and claim_token is present; call the claim endpoint once only if claim_attempt_token is missing. Omitted scope means full `agent`. On an OAuth person grant (no shop_id) that can create a shop. A key from agents.register is bound to the shop the owner picks and cannot create another shop. read_only cannot. type anonymous only when you do not yet have the email. identity_assertion is not accepted.",
          "inputSchema": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "enum": [
                  "anonymous",
                  "service_auth",
                  "identity_assertion"
                ],
                "type": "string"
              },
              "scope": {
                "type": "string"
              },
              "assertion": {
                "type": "string"
              },
              "login_hint": {
                "type": "string"
              },
              "client_name": {
                "type": "string"
              },
              "assertion_type": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "registration_id",
              "registration_type",
              "pre_claim_scopes",
              "claim_url",
              "claim_token",
              "claim_token_expires",
              "post_claim_scopes"
            ],
            "properties": {
              "claim": {
                "type": "object",
                "required": [
                  "approval",
                  "authenticated",
                  "persistence",
                  "next_step",
                  "claim_attempt_token",
                  "user_code",
                  "expires_in",
                  "interval",
                  "claim_page",
                  "verification_uri_length",
                  "verification_uri"
                ],
                "properties": {
                  "approval": {
                    "type": "string"
                  },
                  "interval": {
                    "type": "integer"
                  },
                  "next_step": {
                    "type": "string"
                  },
                  "user_code": {
                    "type": "string",
                    "description": "6 digit code. Show it to the person; they type it on the claim page. Never put it in a URL."
                  },
                  "claim_page": {
                    "type": "string",
                    "description": "Page with no token. Not an approval link by itself."
                  },
                  "expires_in": {
                    "type": "integer"
                  },
                  "persistence": {
                    "type": "string"
                  },
                  "authenticated": {
                    "type": "string"
                  },
                  "verification_uri": {
                    "type": "string",
                    "description": "Full approval link. Use it only when its length equals verification_uri_length."
                  },
                  "claim_attempt_token": {
                    "type": "string",
                    "description": "Short token. With claim_page it is the approval link. Never put user_code in that link."
                  },
                  "verification_uri_length": {
                    "type": "integer"
                  }
                }
              },
              "claim_url": {
                "type": "string"
              },
              "claim_token": {
                "type": "string",
                "description": "Secret. Keep it; you poll the token endpoint with it."
              },
              "registration_id": {
                "type": "string"
              },
              "pre_claim_scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "post_claim_scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "registration_type": {
                "enum": [
                  "anonymous",
                  "service_auth"
                ],
                "type": "string"
              },
              "claim_token_expires": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "agents_claim",
          "description": "auth.md claim. Pass your claim_token and the email of the shop owner who should claim you. You get a 6 digit user_code and a verification_uri: tell the person to open the link, sign in with that email and type the code. Then poll the token endpoint with grant_type urn:workos:agent-auth:grant-type:claim. Calling again with the same claim_token starts a fresh code and cancels the old one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "claim_token",
              "email"
            ],
            "properties": {
              "email": {
                "type": "string"
              },
              "claim_token": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "registration_id",
              "claim_attempt_id",
              "status",
              "expires_at",
              "claim_attempt"
            ],
            "properties": {
              "status": {
                "enum": [
                  "initiated"
                ],
                "type": "string"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "claim_attempt": {
                "type": "object",
                "required": [
                  "approval",
                  "authenticated",
                  "persistence",
                  "next_step",
                  "claim_attempt_token",
                  "user_code",
                  "expires_in",
                  "interval",
                  "claim_page",
                  "verification_uri_length",
                  "verification_uri"
                ],
                "properties": {
                  "approval": {
                    "type": "string"
                  },
                  "interval": {
                    "type": "integer"
                  },
                  "next_step": {
                    "type": "string"
                  },
                  "user_code": {
                    "type": "string",
                    "description": "6 digit code. Show it to the person; they type it on the claim page. Never put it in a URL."
                  },
                  "claim_page": {
                    "type": "string",
                    "description": "Page with no token. Not an approval link by itself."
                  },
                  "expires_in": {
                    "type": "integer"
                  },
                  "persistence": {
                    "type": "string"
                  },
                  "authenticated": {
                    "type": "string"
                  },
                  "verification_uri": {
                    "type": "string",
                    "description": "Full approval link. Use it only when its length equals verification_uri_length."
                  },
                  "claim_attempt_token": {
                    "type": "string",
                    "description": "Short token. With claim_page it is the approval link. Never put user_code in that link."
                  },
                  "verification_uri_length": {
                    "type": "integer"
                  }
                }
              },
              "registration_id": {
                "type": "string"
              },
              "claim_attempt_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reports_revenue",
          "description": "Money collected between two dates (inclusive, UTC), by month: card and bank payments through Doing Work less refunds, and payments recorded as taken outside Doing Work, shown apart.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "from",
              "to"
            ],
            "properties": {
              "to": {
                "type": "string",
                "example": "2026-11-10",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "from": {
                "type": "string",
                "example": "2026-11-10",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "months",
              "total",
              "summary",
              "display"
            ],
            "properties": {
              "total": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "currency",
                    "collected_minor",
                    "refunded_minor",
                    "outside_minor"
                  ]
                }
              },
              "months": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "month",
                    "currency",
                    "collected_minor",
                    "refunded_minor",
                    "outside_minor"
                  ]
                }
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reports_owed",
          "description": "Money customers still owe on sent invoices, grouped by how long ago each invoice went out: 0 to 30, 31 to 60, 61 to 90 and over 90 days.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "buckets",
              "invoices",
              "summary",
              "display"
            ],
            "properties": {
              "buckets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "currency",
                    "d0_30_minor",
                    "d31_60_minor",
                    "d61_90_minor",
                    "over_90_minor",
                    "total_minor"
                  ]
                }
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "invoices": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reports_quoteWinRate",
          "description": "Of the quotes made between two dates (inclusive, UTC) and sent, how many were signed, declined, or are still waiting. Win rate is signed over signed plus declined; null when none are decided yet.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "from",
              "to"
            ],
            "properties": {
              "to": {
                "type": "string",
                "example": "2026-11-10",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "from": {
                "type": "string",
                "example": "2026-11-10",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "sent",
              "signed",
              "declined",
              "waiting",
              "win_rate",
              "summary",
              "display"
            ],
            "properties": {
              "sent": {
                "type": "integer"
              },
              "signed": {
                "type": "integer"
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "waiting": {
                "type": "integer"
              },
              "declined": {
                "type": "integer"
              },
              "win_rate": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "members_permissions",
          "description": "What each current worker in a shop may do beyond their role: see_prices, see_costs, take_money, delete and manage_schedule. Roles are owner, office, lead and field. The owner sees everyone; anyone else sees only themselves. The owner always has every permission. A new field worker starts with see_prices off. A new lead starts with see_prices, see_costs, take_money and delete off, and manage_schedule on.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "members"
            ],
            "properties": {
              "members": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "membership_id",
                    "person_id",
                    "role",
                    "permissions",
                    "customized"
                  ],
                  "properties": {
                    "role": {
                      "enum": [
                        "owner",
                        "office",
                        "lead",
                        "field"
                      ],
                      "type": "string"
                    },
                    "person_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "customized": {
                      "type": "boolean",
                      "description": "false when the worker has the role defaults"
                    },
                    "permissions": {
                      "type": "object",
                      "required": [
                        "see_prices",
                        "see_costs",
                        "take_money",
                        "delete",
                        "manage_schedule"
                      ],
                      "properties": {
                        "delete": {
                          "type": "boolean"
                        },
                        "see_costs": {
                          "type": "boolean"
                        },
                        "see_prices": {
                          "type": "boolean"
                        },
                        "take_money": {
                          "type": "boolean"
                        },
                        "manage_schedule": {
                          "type": "boolean"
                        }
                      }
                    },
                    "display_name": {
                      "type": "string",
                      "nullable": true
                    },
                    "membership_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shops_sendPermissions",
          "description": "What each role may send to a customer: quotes, invoices and visit recaps. The owner always may, for every job, and is not listed. Office starts able to send all three for any job. A lead starts able to send all three for jobs on their crew. A field worker starts able to send all three for jobs assigned to them. The owner can turn any of these off. A missing row means the default, which is on.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "owner",
              "roles"
            ],
            "properties": {
              "owner": {
                "type": "string"
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "role",
                    "send_quotes",
                    "send_invoices",
                    "send_recaps",
                    "scope",
                    "customized"
                  ],
                  "properties": {
                    "role": {
                      "enum": [
                        "office",
                        "lead",
                        "field"
                      ],
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "customized": {
                      "type": "boolean"
                    },
                    "send_quotes": {
                      "type": "boolean"
                    },
                    "send_recaps": {
                      "type": "boolean"
                    },
                    "send_invoices": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "legal_documents",
          "description": "The legal documents Doing Work asks people to accept, with the current version and a link to the text. A document marked placeholder has no text yet and cannot be accepted.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "documents"
            ],
            "properties": {
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "document",
                    "title",
                    "version",
                    "placeholder",
                    "accepted_by",
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "document": {
                      "type": "string"
                    },
                    "accepted_by": {
                      "type": "string"
                    },
                    "placeholder": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "legal_status",
          "description": "What the signed-in person has accepted: for each document that is accepted here, the current version, the versions accepted and when, and whether the current version still needs accepting.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "documents"
            ],
            "properties": {
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "document",
                    "current_version",
                    "placeholder",
                    "accepted",
                    "needs_acceptance"
                  ],
                  "properties": {
                    "accepted": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "version",
                          "accepted_at"
                        ],
                        "properties": {
                          "version": {
                            "type": "string"
                          },
                          "accepted_at": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "document": {
                      "type": "string"
                    },
                    "placeholder": {
                      "type": "boolean"
                    },
                    "current_version": {
                      "type": "string"
                    },
                    "needs_acceptance": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "legal_shopTerms",
          "description": "For one shop: the current Terms of Service version, whether the owner accepted it for the shop, when we emailed the owner the terms (shops an agent signed up), and the section 19 arbitration opt-out window, deadline and status. Any member of the shop can read it. The owner accepts and opts out on the page in page_url.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "shop",
              "current_version",
              "terms_url",
              "owner_accepted_current",
              "owner_accepted_at",
              "terms_emailed_at",
              "opt_out_window_start",
              "opt_out_deadline",
              "opt_out_open",
              "opted_out",
              "opted_out_at",
              "opted_out_by",
              "page_url"
            ],
            "properties": {
              "shop": {
                "type": "string"
              },
              "shop_id": {
                "type": "string"
              },
              "page_url": {
                "type": "string"
              },
              "opted_out": {
                "type": "boolean"
              },
              "terms_url": {
                "type": "string"
              },
              "opt_out_open": {
                "type": "boolean"
              },
              "opted_out_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "opted_out_by": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "current_version": {
                "type": "string"
              },
              "opt_out_deadline": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "terms_emailed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_accepted_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "opt_out_window_start": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_accepted_current": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "shops_signUp",
          "description": "Create a shop for an owner who has already accepted the current Terms and Privacy. That acceptance is for the person and covers every shop they own or join. Send accept_terms true, the shop name, the jurisdiction and the owner's name and email. This does not accept for the owner and it does not email the Terms. If the owner has not accepted yet, the call is refused and names the missing document and /p/legal. The reply has an agent key for the new shop, shown once.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_name",
              "jurisdiction",
              "owner_name",
              "owner_email",
              "accept_terms"
            ],
            "properties": {
              "lead_code": {
                "type": "string",
                "description": "Optional internal acquisition or campaign tracking code for this shop."
              },
              "shop_name": {
                "type": "string"
              },
              "agent_name": {
                "type": "string",
                "description": "Your name, used as the key label"
              },
              "owner_name": {
                "type": "string"
              },
              "owner_email": {
                "type": "string"
              },
              "accept_terms": {
                "type": "boolean",
                "description": "true: the owner already accepted the current Terms and Privacy. One acceptance covers every shop."
              },
              "jurisdiction": {
                "type": "string",
                "description": "For example US-ID"
              },
              "partner_code": {
                "type": "string",
                "description": "Optional affiliate partner or referral code for this shop."
              },
              "referral_code": {
                "type": "string",
                "description": "Optional alias for partner_code."
              },
              "accept_terms_version": {
                "type": "string",
                "description": "Optional: the Terms version you reviewed (now terms-2026-11-21a). Refused if it is not the current one."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "key_id",
              "key",
              "shown_once",
              "scopes",
              "terms_version",
              "terms_url"
            ],
            "properties": {
              "key": {
                "type": "string"
              },
              "key_id": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "shop_id": {
                "type": "string"
              },
              "lead_code": {
                "type": "string"
              },
              "terms_url": {
                "type": "string"
              },
              "shown_once": {
                "type": "boolean"
              },
              "partner_code": {
                "type": "string"
              },
              "terms_version": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "signatures_request",
          "description": "Ask someone to sign a document on a hosted page, and get the signing link to give them. kind contract: text is the agreement exactly as the shop wrote it (Doing Work never writes contract or legal wording). kind job_document: a stored job PDF (documents.list). The signer signs in, reads it, types their name and agrees to sign electronically. Agents can never sign.",
          "inputSchema": {
            "type": "object",
            "required": [
              "kind",
              "title"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "contract",
                  "job_document"
                ],
                "type": "string"
              },
              "text": {
                "type": "string",
                "maxLength": 200000,
                "minLength": 1,
                "description": "kind contract: the full text to sign, written by the shop."
              },
              "title": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "What the signer sees as the heading, for example Service agreement."
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "link_days": {
                "type": "integer",
                "maximum": 90,
                "minimum": 1,
                "description": "Days the signing link works (default 14)."
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              },
              "document_id": {
                "type": "string",
                "format": "uuid",
                "description": "kind job_document: the stored PDF to sign."
              },
              "signer_role": {
                "enum": [
                  "customer",
                  "member"
                ],
                "type": "string",
                "description": "customer (default): someone outside the shop; a shop member cannot sign it for them. member: a worker in the shop signs."
              },
              "signer_email": {
                "type": "string",
                "maxLength": 320,
                "description": "Only this signed-in email may sign. Leave out to let whoever opens the link and signs in sign."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "signature_request_id",
                  "document_sha256",
                  "sign_url",
                  "link_expires_at"
                ],
                "properties": {
                  "sign_url": {
                    "type": "string"
                  },
                  "document_sha256": {
                    "type": "string"
                  },
                  "link_expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "signature_request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "signatures_newLink",
          "description": "A new signing link for an open signature request. Earlier links for it stop working.",
          "inputSchema": {
            "type": "object",
            "required": [
              "signature_request_id"
            ],
            "properties": {
              "link_days": {
                "type": "integer",
                "maximum": 90,
                "minimum": 1,
                "description": "Days the signing link works (default 14)."
              },
              "signature_request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "signature_request_id",
                  "sign_url",
                  "link_expires_at"
                ],
                "properties": {
                  "sign_url": {
                    "type": "string"
                  },
                  "link_expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "signature_request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "signatures_cancel",
          "description": "Cancel an open signature request. Its links stop working. A signed document stays signed.",
          "inputSchema": {
            "type": "object",
            "required": [
              "signature_request_id"
            ],
            "properties": {
              "signature_request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "signature_request_id",
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "signature_request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "signatures_get",
          "description": "One signature request: the document text (or stored PDF id) and its sha256, and the signature when signed (who, typed name, consent text and its sha256, surface, time).",
          "inputSchema": {
            "type": "object",
            "required": [
              "signature_request_id"
            ],
            "properties": {
              "signature_request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "signature_request_id",
              "shop_id",
              "job_id",
              "customer_id",
              "kind",
              "subject_id",
              "title",
              "job_document_id",
              "document_sha256",
              "signer_role",
              "signer_email",
              "status",
              "created_by",
              "created_at",
              "cancelled_at",
              "text",
              "signature"
            ],
            "properties": {
              "kind": {
                "type": "string"
              },
              "text": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": "string"
              },
              "job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "status": {
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "signature": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "signature_id",
                      "signer_person_id",
                      "signer_name",
                      "signer_email",
                      "signer_role",
                      "consent_text",
                      "consent_sha256",
                      "document_sha256",
                      "surface",
                      "signed_at"
                    ],
                    "properties": {
                      "surface": {
                        "type": "string"
                      },
                      "signed_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "signer_name": {
                        "type": "string"
                      },
                      "signer_role": {
                        "type": "string"
                      },
                      "consent_text": {
                        "type": "string"
                      },
                      "signature_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "signer_email": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "consent_sha256": {
                        "type": "string"
                      },
                      "document_sha256": {
                        "type": "string"
                      },
                      "signer_person_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "subject_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "customer_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "signer_role": {
                "type": "string"
              },
              "cancelled_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "signer_email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "document_sha256": {
                "type": "string"
              },
              "job_document_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "signature_request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "signatures_list",
          "description": "Signature requests for a job, a customer or a whole shop, newest first, with status and who signed. Filter by kind, status or subject_id.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "enum": [
                  "open",
                  "signed",
                  "cancelled"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "subject_id": {
                "type": "string",
                "format": "uuid"
              },
              "customer_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "signature_request_id",
                    "shop_id",
                    "job_id",
                    "customer_id",
                    "kind",
                    "subject_id",
                    "title",
                    "job_document_id",
                    "document_sha256",
                    "signer_role",
                    "signer_email",
                    "status",
                    "created_by",
                    "created_at",
                    "cancelled_at",
                    "signature_id",
                    "signer_name",
                    "signed_at"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "signed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "subject_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "customer_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "signer_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "signer_role": {
                      "type": "string"
                    },
                    "cancelled_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "signature_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "signer_email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "document_sha256": {
                      "type": "string"
                    },
                    "job_document_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "signature_request_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "checklists_saveTemplate",
          "description": "Create a checklist template, or replace one (give checklist_template_id). Items are in order; required items (the default) must be ticked before the visit or job can be marked done. Checklists already made from it keep their own copy.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "name",
              "items"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "label"
                  ],
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 500,
                      "minLength": 1
                    },
                    "required": {
                      "type": "boolean",
                      "description": "true (default): the visit or job cannot be marked done until it is ticked."
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "signoff_required": {
                "type": "boolean",
                "description": "Checklists from this template need a signed sign-off (checklists.requestSignOff) before done."
              },
              "checklist_template_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "checklist_template_id",
                  "shop_id",
                  "name",
                  "description",
                  "signoff_required",
                  "archived_at",
                  "updated_at",
                  "items"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "position",
                        "label",
                        "required"
                      ],
                      "properties": {
                        "label": {
                          "type": "string"
                        },
                        "position": {
                          "type": "integer"
                        },
                        "required": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "archived_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "signoff_required": {
                    "type": "boolean"
                  },
                  "checklist_template_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "checklists_listTemplates",
          "description": "The shop's checklist templates with their items. Archived ones only with include_archived.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "checklist_template_id",
                    "shop_id",
                    "name",
                    "description",
                    "signoff_required",
                    "archived_at",
                    "updated_at",
                    "items"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "position",
                          "label",
                          "required"
                        ],
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "position": {
                            "type": "integer"
                          },
                          "required": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "signoff_required": {
                      "type": "boolean"
                    },
                    "checklist_template_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "checklists_archiveTemplate",
          "description": "Archive a checklist template so it is no longer offered. Checklists made from it are unchanged.",
          "inputSchema": {
            "type": "object",
            "required": [
              "checklist_template_id"
            ],
            "properties": {
              "checklist_template_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "checklist_template_id",
                  "archived_at"
                ],
                "properties": {
                  "archived_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "checklist_template_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "checklists_create",
          "description": "Put a checklist on a job, or on one visit of the job (visit_id). Copy a template (checklist_template_id) or give items. A visit checklist gates that visit's done; a job checklist gates the job's done (jobs.complete), and the job also waits on checklists of visits not yet done.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "label"
                  ],
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 500,
                      "minLength": 1
                    },
                    "required": {
                      "type": "boolean",
                      "description": "true (default): the visit or job cannot be marked done until it is ticked."
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "signoff_required": {
                "type": "boolean",
                "description": "Needs a signed sign-off before done. Default: the template's setting, else false."
              },
              "checklist_template_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "checklist_id",
                  "shop_id",
                  "job_id",
                  "visit_id",
                  "checklist_template_id",
                  "name",
                  "signoff_required",
                  "open_required",
                  "done_items",
                  "total_items",
                  "signature_id",
                  "signoff_request_id",
                  "locked",
                  "created_at",
                  "items"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "checklist_item_id",
                        "position",
                        "label",
                        "required",
                        "done",
                        "done_at",
                        "done_by",
                        "note",
                        "removed"
                      ],
                      "properties": {
                        "done": {
                          "type": "boolean"
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "label": {
                          "type": "string"
                        },
                        "done_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "done_by": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "removed": {
                          "type": "boolean"
                        },
                        "position": {
                          "type": "integer"
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "checklist_item_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "locked": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "done_items": {
                    "type": "integer"
                  },
                  "total_items": {
                    "type": "integer"
                  },
                  "checklist_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "signature_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "open_required": {
                    "type": "integer"
                  },
                  "signoff_required": {
                    "type": "boolean"
                  },
                  "signoff_request_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "checklist_template_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "checklists_list",
          "description": "Checklists on a job (all of them, job-level and per visit) or on one visit, with counts of open required items and sign-off state. Workers see the checklists of the jobs they can see.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "checklist_id",
                    "shop_id",
                    "job_id",
                    "visit_id",
                    "checklist_template_id",
                    "name",
                    "signoff_required",
                    "open_required",
                    "done_items",
                    "total_items",
                    "signature_id",
                    "signoff_request_id",
                    "locked",
                    "created_at"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "locked": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "visit_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "done_items": {
                      "type": "integer"
                    },
                    "total_items": {
                      "type": "integer"
                    },
                    "checklist_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "signature_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "open_required": {
                      "type": "integer"
                    },
                    "signoff_required": {
                      "type": "boolean"
                    },
                    "signoff_request_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "checklist_template_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "checklists_get",
          "description": "One checklist with every item (removed items included and marked), who ticked what and when, and its sign-off.",
          "inputSchema": {
            "type": "object",
            "required": [
              "checklist_id"
            ],
            "properties": {
              "checklist_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "checklist_id",
              "shop_id",
              "job_id",
              "visit_id",
              "checklist_template_id",
              "name",
              "signoff_required",
              "open_required",
              "done_items",
              "total_items",
              "signature_id",
              "signoff_request_id",
              "locked",
              "created_at",
              "items"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "checklist_item_id",
                    "position",
                    "label",
                    "required",
                    "done",
                    "done_at",
                    "done_by",
                    "note",
                    "removed"
                  ],
                  "properties": {
                    "done": {
                      "type": "boolean"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "done_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "done_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "removed": {
                      "type": "boolean"
                    },
                    "position": {
                      "type": "integer"
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "checklist_item_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "locked": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "done_items": {
                "type": "integer"
              },
              "total_items": {
                "type": "integer"
              },
              "checklist_id": {
                "type": "string",
                "format": "uuid"
              },
              "signature_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "open_required": {
                "type": "integer"
              },
              "signoff_required": {
                "type": "boolean"
              },
              "signoff_request_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "checklist_template_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "checklists_checkItem",
          "description": "Tick (done true) or untick an item, with an optional note. The worker on the visit (for a job checklist, on any visit of the job) or the office can do this. Locked once the visit or job is done, while a sign-off is waiting, and after sign-off.",
          "inputSchema": {
            "type": "object",
            "required": [
              "checklist_item_id",
              "done"
            ],
            "properties": {
              "done": {
                "type": "boolean"
              },
              "note": {
                "type": "string",
                "maxLength": 2000,
                "description": "Replaces the note; an empty string clears it."
              },
              "checklist_item_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "checklist_id",
                  "checklist_item_id",
                  "done",
                  "open_required",
                  "next_actions"
                ],
                "properties": {
                  "done": {
                    "type": "boolean"
                  },
                  "checklist_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "open_required": {
                    "type": "integer"
                  },
                  "checklist_item_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "checklists_addItems",
          "description": "Add items to the end of a checklist (owner or office). Same locks as ticking.",
          "inputSchema": {
            "type": "object",
            "required": [
              "checklist_id",
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "label"
                  ],
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 500,
                      "minLength": 1
                    },
                    "required": {
                      "type": "boolean",
                      "description": "true (default): the visit or job cannot be marked done until it is ticked."
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "checklist_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "checklist_id",
                  "shop_id",
                  "job_id",
                  "visit_id",
                  "checklist_template_id",
                  "name",
                  "signoff_required",
                  "open_required",
                  "done_items",
                  "total_items",
                  "signature_id",
                  "signoff_request_id",
                  "locked",
                  "created_at",
                  "items"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "checklist_item_id",
                        "position",
                        "label",
                        "required",
                        "done",
                        "done_at",
                        "done_by",
                        "note",
                        "removed"
                      ],
                      "properties": {
                        "done": {
                          "type": "boolean"
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "label": {
                          "type": "string"
                        },
                        "done_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "done_by": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "removed": {
                          "type": "boolean"
                        },
                        "position": {
                          "type": "integer"
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "checklist_item_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "locked": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "done_items": {
                    "type": "integer"
                  },
                  "total_items": {
                    "type": "integer"
                  },
                  "checklist_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "signature_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "open_required": {
                    "type": "integer"
                  },
                  "signoff_required": {
                    "type": "boolean"
                  },
                  "signoff_request_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "checklist_template_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "checklists_removeItem",
          "description": "Remove an item from a checklist (it stays in the history, marked removed). Owner or office; a required item only by the owner. Audited.",
          "inputSchema": {
            "type": "object",
            "required": [
              "checklist_item_id"
            ],
            "properties": {
              "checklist_item_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "checklist_id",
                  "checklist_item_id",
                  "open_required"
                ],
                "properties": {
                  "checklist_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "open_required": {
                    "type": "integer"
                  },
                  "checklist_item_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "checklists_requestSignOff",
          "description": "Ask for a sign-off on a finished checklist and get the signing link. Every required item must be ticked. The signer (the customer by default, or a shop member) signs the checklist exactly as it stands; items lock while the sign-off waits (signatures.cancel unlocks).",
          "inputSchema": {
            "type": "object",
            "required": [
              "checklist_id"
            ],
            "properties": {
              "link_days": {
                "type": "integer",
                "maximum": 90,
                "minimum": 1,
                "description": "Days the signing link works (default 14)."
              },
              "signer_role": {
                "enum": [
                  "customer",
                  "member"
                ],
                "type": "string"
              },
              "checklist_id": {
                "type": "string",
                "format": "uuid"
              },
              "signer_email": {
                "type": "string",
                "maxLength": 320,
                "description": "Only this signed-in email may sign."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "checklist_id",
                  "signature_request_id",
                  "document_sha256",
                  "sign_url",
                  "link_expires_at"
                ],
                "properties": {
                  "sign_url": {
                    "type": "string"
                  },
                  "checklist_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "document_sha256": {
                    "type": "string"
                  },
                  "link_expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "signature_request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "jobs_complete",
          "description": "Mark a job done (owner or office). Refused with checklist_open while a job checklist, a checklist on a visit not yet done, or a sign-off checklist on a cancelled visit, has required items open or a sign-off missing; the owner, signed in on the hosted override page (/p/checklist/override), may pass override_reason to mark it done anyway (recorded and audited). Agents, keys and office staff cannot override.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "override_reason": {
                "type": "string",
                "maxLength": 1000,
                "minLength": 1,
                "description": "Owner in person only (hosted override page): why the job is done with checklist work left."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "job_id",
                  "status",
                  "override_id",
                  "next_actions"
                ],
                "properties": {
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "override_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "forms_saveTemplate",
          "description": "Create a form template (an inspection, a safety sheet, a start-up report), or replace one (give form_template_id). Fields are in order; types: heading, text, long_text, number, yes_no, choice, multi_choice, date, photos. Forms already started keep their own copy. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "name",
              "fields"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "label",
                    "type"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9_]{0,39}$",
                      "description": "Stable answer key, unique in the form (lowercase, digits, _)."
                    },
                    "help": {
                      "type": "string",
                      "maxLength": 1000
                    },
                    "type": {
                      "enum": [
                        "heading",
                        "text",
                        "long_text",
                        "number",
                        "yes_no",
                        "choice",
                        "multi_choice",
                        "date",
                        "photos"
                      ],
                      "type": "string",
                      "description": "heading is a section title with no answer; photos takes media ids already on the job."
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 500,
                      "minLength": 1
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 200,
                        "minLength": 1
                      },
                      "maxItems": 50,
                      "minItems": 1,
                      "description": "choice and multi_choice only."
                    },
                    "required": {
                      "type": "boolean",
                      "description": "true: forms.submit refuses until this is answered. Default false."
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "form_template_id": {
                "type": "string",
                "format": "uuid"
              },
              "signoff_required": {
                "type": "boolean",
                "description": "The shop wants a signature on this form after it is submitted (forms.requestSignOff). Shown on forms; not a gate."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "form_template_id",
                  "shop_id",
                  "name",
                  "description",
                  "signoff_required",
                  "fields",
                  "archived_at",
                  "updated_at"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label",
                        "type",
                        "required"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "help": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "required": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "archived_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "form_template_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "signoff_required": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "forms_listTemplates",
          "description": "The shop's form templates with their fields. Archived ones only with include_archived.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "form_template_id",
                    "shop_id",
                    "name",
                    "description",
                    "signoff_required",
                    "fields",
                    "archived_at",
                    "updated_at"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "label",
                          "type",
                          "required"
                        ],
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "help": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "required": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "archived_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "form_template_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "signoff_required": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "forms_archiveTemplate",
          "description": "Archive a form template so it is no longer offered. Forms made from it are unchanged.",
          "inputSchema": {
            "type": "object",
            "required": [
              "form_template_id"
            ],
            "properties": {
              "form_template_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "form_template_id",
                  "archived_at"
                ],
                "properties": {
                  "archived_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "form_template_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "forms_start",
          "description": "Start a form on a job, or on one visit of the job (visit_id). Copy a template (form_template_id), copy an earlier form with its answers (copy_from_form_id: the way to correct a submitted form), or give name and fields. The owner, office, or a worker assigned on the job can start one. It starts as a draft.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "label",
                    "type"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9_]{0,39}$",
                      "description": "Stable answer key, unique in the form (lowercase, digits, _)."
                    },
                    "help": {
                      "type": "string",
                      "maxLength": 1000
                    },
                    "type": {
                      "enum": [
                        "heading",
                        "text",
                        "long_text",
                        "number",
                        "yes_no",
                        "choice",
                        "multi_choice",
                        "date",
                        "photos"
                      ],
                      "type": "string",
                      "description": "heading is a section title with no answer; photos takes media ids already on the job."
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 500,
                      "minLength": 1
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 200,
                        "minLength": 1
                      },
                      "maxItems": 50,
                      "minItems": 1,
                      "description": "choice and multi_choice only."
                    },
                    "required": {
                      "type": "boolean",
                      "description": "true: forms.submit refuses until this is answered. Default false."
                    }
                  }
                },
                "maxItems": 200,
                "minItems": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "form_template_id": {
                "type": "string",
                "format": "uuid"
              },
              "signoff_required": {
                "type": "boolean"
              },
              "copy_from_form_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "form_id",
                  "shop_id",
                  "job_id",
                  "visit_id",
                  "form_template_id",
                  "copied_from_form_id",
                  "name",
                  "status",
                  "signoff_required",
                  "missing",
                  "created_by",
                  "created_at",
                  "updated_at",
                  "submitted_by",
                  "submitted_at",
                  "document_id",
                  "document_sha256",
                  "cancelled_at",
                  "signature_id",
                  "signoff_request_id",
                  "fields",
                  "answers"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label",
                        "type",
                        "required"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "help": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "required": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "answers": {
                    "type": "object",
                    "description": "Answers by field key."
                  },
                  "form_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "missing": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "document_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "cancelled_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "signature_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "submitted_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "submitted_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "document_sha256": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "form_template_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "signoff_required": {
                    "type": "boolean"
                  },
                  "signoff_request_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "copied_from_form_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "forms_fill",
          "description": "Save answers on a draft form. answers is an object by field key; only the keys given change, and null clears one. Values: text for text/long_text, a number, true/false for yes_no, one option for choice, a list of options for multi_choice, YYYY-MM-DD for date, photo ids already on the job for photos.",
          "inputSchema": {
            "type": "object",
            "required": [
              "form_id",
              "answers"
            ],
            "properties": {
              "answers": {
                "type": "object",
                "description": "Answers by field key; null clears one.",
                "additionalProperties": true
              },
              "form_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "form_id",
                  "shop_id",
                  "job_id",
                  "visit_id",
                  "form_template_id",
                  "copied_from_form_id",
                  "name",
                  "status",
                  "signoff_required",
                  "missing",
                  "created_by",
                  "created_at",
                  "updated_at",
                  "submitted_by",
                  "submitted_at",
                  "document_id",
                  "document_sha256",
                  "cancelled_at",
                  "signature_id",
                  "signoff_request_id",
                  "fields",
                  "answers"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label",
                        "type",
                        "required"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "help": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "required": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "answers": {
                    "type": "object",
                    "description": "Answers by field key."
                  },
                  "form_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "missing": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "document_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "cancelled_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "signature_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "submitted_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "submitted_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "document_sha256": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "form_template_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "signoff_required": {
                    "type": "boolean"
                  },
                  "signoff_request_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "copied_from_form_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "forms_submit",
          "description": "Submit a draft form: every required field must be answered (forms.get lists what is missing). Core renders the PDF, stores it on the job (a document of kind form, with its sha256) and freezes the form. Returns the form with the PDF (base64).",
          "inputSchema": {
            "type": "object",
            "required": [
              "form_id"
            ],
            "properties": {
              "form_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "form_id",
                  "shop_id",
                  "job_id",
                  "visit_id",
                  "form_template_id",
                  "copied_from_form_id",
                  "name",
                  "status",
                  "signoff_required",
                  "missing",
                  "created_by",
                  "created_at",
                  "updated_at",
                  "submitted_by",
                  "submitted_at",
                  "document_id",
                  "document_sha256",
                  "cancelled_at",
                  "signature_id",
                  "signoff_request_id",
                  "fields",
                  "answers",
                  "content_type",
                  "base64",
                  "next_actions"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "base64": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label",
                        "type",
                        "required"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "help": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "required": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "answers": {
                    "type": "object"
                  },
                  "form_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "missing": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "document_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "cancelled_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "content_type": {
                    "type": "string"
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "signature_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "submitted_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "submitted_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "document_sha256": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "form_template_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "signoff_required": {
                    "type": "boolean"
                  },
                  "signoff_request_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "copied_from_form_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "forms_cancel",
          "description": "Cancel a draft form (kept in history). A submitted form cannot be cancelled; start a corrected copy with forms.start copy_from_form_id.",
          "inputSchema": {
            "type": "object",
            "required": [
              "form_id"
            ],
            "properties": {
              "form_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "form_id",
                  "status",
                  "cancelled_at"
                ],
                "properties": {
                  "status": {
                    "type": "string"
                  },
                  "form_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "cancelled_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "forms_get",
          "description": "One form with its fields, answers, the required fields still missing, its stored PDF id and hash once submitted, and its sign-off.",
          "inputSchema": {
            "type": "object",
            "required": [
              "form_id"
            ],
            "properties": {
              "form_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "form_id",
              "shop_id",
              "job_id",
              "visit_id",
              "form_template_id",
              "copied_from_form_id",
              "name",
              "status",
              "signoff_required",
              "missing",
              "created_by",
              "created_at",
              "updated_at",
              "submitted_by",
              "submitted_at",
              "document_id",
              "document_sha256",
              "cancelled_at",
              "signature_id",
              "signoff_request_id",
              "fields",
              "answers"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "label",
                    "type",
                    "required"
                  ],
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "help": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "required": {
                      "type": "boolean"
                    }
                  }
                }
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string"
              },
              "answers": {
                "type": "object",
                "description": "Answers by field key."
              },
              "form_id": {
                "type": "string",
                "format": "uuid"
              },
              "missing": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "document_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "cancelled_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "signature_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "submitted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "submitted_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "document_sha256": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "form_template_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "signoff_required": {
                "type": "boolean"
              },
              "signoff_request_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "copied_from_form_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "forms_list",
          "description": "Forms on a job (job-level and per visit), or on one visit, newest first, without fields and answers. Filter by status.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "enum": [
                  "draft",
                  "submitted",
                  "cancelled"
                ],
                "type": "string"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "form_id",
                    "shop_id",
                    "job_id",
                    "visit_id",
                    "form_template_id",
                    "copied_from_form_id",
                    "name",
                    "status",
                    "signoff_required",
                    "missing",
                    "created_by",
                    "created_at",
                    "updated_at",
                    "submitted_by",
                    "submitted_at",
                    "document_id",
                    "document_sha256",
                    "cancelled_at",
                    "signature_id",
                    "signoff_request_id"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "form_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "missing": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "visit_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "updated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "document_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "cancelled_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "signature_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "submitted_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "submitted_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "document_sha256": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "form_template_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "signoff_required": {
                      "type": "boolean"
                    },
                    "signoff_request_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "copied_from_form_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "forms_requestSignOff",
          "description": "Ask for a signature on a submitted form and get the signing link (owner or office). The signer (the customer by default, or a shop member) signs the stored PDF exactly as submitted.",
          "inputSchema": {
            "type": "object",
            "required": [
              "form_id"
            ],
            "properties": {
              "form_id": {
                "type": "string",
                "format": "uuid"
              },
              "link_days": {
                "type": "integer",
                "maximum": 90,
                "minimum": 1,
                "description": "Days the signing link works (default 14)."
              },
              "signer_role": {
                "enum": [
                  "customer",
                  "member"
                ],
                "type": "string"
              },
              "signer_email": {
                "type": "string",
                "maxLength": 320,
                "description": "Only this signed-in email may sign."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "form_id",
                  "signature_request_id",
                  "document_sha256",
                  "sign_url",
                  "link_expires_at"
                ],
                "properties": {
                  "form_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sign_url": {
                    "type": "string"
                  },
                  "document_sha256": {
                    "type": "string"
                  },
                  "link_expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "signature_request_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "notes_add",
          "description": "Write a note on any shop record: a job, visit, photo or video, customer, property, equipment, quote, invoice, request, worker, payment, price book item, maintenance plan or the shop (target_kind and target_id; job_id or visit_id alone also work). Any shop member can. Notes are internal to the shop and never shown to the customer. Set audience office to keep it to owner and office (owner or office only); notes on a worker or payment are always office. pinned keeps it at the top (owner or office only). Attach photos or videos already on the job with media_ids. Mention members to notify them; say what you need from them in the note. Write down what the worker tells you about a record here so the next person sees it. Pass channel when the words came from a text, an email, a call, or the visit (typed, email, call, text, visit). It is stored on the note.",
          "inputSchema": {
            "type": "object",
            "required": [
              "body"
            ],
            "properties": {
              "body": {
                "type": "string",
                "maxLength": 20000,
                "minLength": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "pinned": {
                "type": "boolean"
              },
              "channel": {
                "enum": [
                  "typed",
                  "email",
                  "call",
                  "text",
                  "visit"
                ],
                "type": "string",
                "description": "Where the words came from: typed, email, call, text, or visit."
              },
              "audience": {
                "enum": [
                  "team",
                  "office"
                ],
                "type": "string",
                "description": "team (default): every shop member sees it. office: owner, office and the managing platform only."
              },
              "mentions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "description": "Person ids of shop members to notify (team.list). They get an email unless they turned it off. Office notes can mention only owner and office. Customers are never notified."
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "media_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "description": "Photos or videos already on the job."
              },
              "target_id": {
                "type": "string",
                "format": "uuid"
              },
              "agent_name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Your agent's name, shown next to the writer, when an agent wrote the note for the worker."
              },
              "target_kind": {
                "enum": [
                  "job",
                  "visit",
                  "media",
                  "customer",
                  "property",
                  "equipment",
                  "quote",
                  "invoice",
                  "request",
                  "worker",
                  "payment",
                  "pricebook_item",
                  "maintenance_plan",
                  "shop"
                ],
                "type": "string",
                "description": "What the note is on. worker is a membership id, payment a charge id, media a photo or video id, shop the shop id. Notes on a worker or a payment are office only."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "note_id",
                  "shop_id",
                  "target_kind",
                  "target_id",
                  "job_id",
                  "visit_id",
                  "mentions",
                  "agent_name",
                  "source",
                  "channel",
                  "body",
                  "audience",
                  "pinned",
                  "media_ids",
                  "recorded_at",
                  "duration_seconds",
                  "transcribed_with",
                  "language",
                  "revisions",
                  "written_by",
                  "written_by_name",
                  "created_at",
                  "edited_at",
                  "removed_at",
                  "removed_by",
                  "remove_reason"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  },
                  "job_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "pinned": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "string"
                  },
                  "channel": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "note_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "audience": {
                    "type": "string"
                  },
                  "language": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "mentions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "edited_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "media_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "revisions": {
                    "type": "integer"
                  },
                  "target_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "agent_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "removed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "removed_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "written_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "recorded_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "target_kind": {
                    "type": "string"
                  },
                  "remove_reason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "written_by_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "duration_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "transcribed_with": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "notes_addVoiceMemo",
          "description": "Save a voice memo as a note: send the transcript your agent made, the memo's length in seconds, when it was recorded, and what transcribed it. Core runs no speech-to-text and does not keep the audio. Same rules as notes.add for who sees and pins it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "transcript",
              "duration_seconds"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "pinned": {
                "type": "boolean"
              },
              "audience": {
                "enum": [
                  "team",
                  "office"
                ],
                "type": "string",
                "description": "team (default): every shop member sees it. office: owner, office and the managing platform only."
              },
              "language": {
                "type": "string",
                "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8}){0,3}$",
                "description": "Spoken language as a BCP 47 tag, for example en or es-MX."
              },
              "mentions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "description": "Person ids of shop members to notify (team.list). They get an email unless they turned it off. Office notes can mention only owner and office. Customers are never notified."
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "media_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "description": "Photos or videos already on the job."
              },
              "target_id": {
                "type": "string",
                "format": "uuid"
              },
              "agent_name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Your agent's name, shown next to the writer, when an agent wrote the note for the worker."
              },
              "transcript": {
                "type": "string",
                "maxLength": 20000,
                "minLength": 1
              },
              "recorded_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the memo was recorded. Not in the future."
              },
              "target_kind": {
                "enum": [
                  "job",
                  "visit",
                  "media",
                  "customer",
                  "property",
                  "equipment",
                  "quote",
                  "invoice",
                  "request",
                  "worker",
                  "payment",
                  "pricebook_item",
                  "maintenance_plan",
                  "shop"
                ],
                "type": "string",
                "description": "What the note is on. worker is a membership id, payment a charge id, media a photo or video id, shop the shop id. Notes on a worker or a payment are office only."
              },
              "duration_seconds": {
                "type": "integer",
                "maximum": 14400,
                "minimum": 1
              },
              "transcribed_with": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "What made the transcript, for example the speech model or app."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "note_id",
                  "shop_id",
                  "target_kind",
                  "target_id",
                  "job_id",
                  "visit_id",
                  "mentions",
                  "agent_name",
                  "source",
                  "channel",
                  "body",
                  "audience",
                  "pinned",
                  "media_ids",
                  "recorded_at",
                  "duration_seconds",
                  "transcribed_with",
                  "language",
                  "revisions",
                  "written_by",
                  "written_by_name",
                  "created_at",
                  "edited_at",
                  "removed_at",
                  "removed_by",
                  "remove_reason"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  },
                  "job_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "pinned": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "string"
                  },
                  "channel": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "note_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "audience": {
                    "type": "string"
                  },
                  "language": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "mentions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "edited_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "media_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "revisions": {
                    "type": "integer"
                  },
                  "target_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "agent_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "removed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "removed_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "written_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "recorded_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "target_kind": {
                    "type": "string"
                  },
                  "remove_reason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "written_by_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "duration_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "transcribed_with": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "notes_update",
          "description": "Change a note. Only the writer changes body, media_ids or mentions (each earlier wording is kept, up to 50 edits; newly mentioned members are notified). Owner or office can pin or unpin it and change audience. A removed note cannot change.",
          "inputSchema": {
            "type": "object",
            "required": [
              "note_id"
            ],
            "properties": {
              "body": {
                "type": "string",
                "maxLength": 20000,
                "minLength": 1
              },
              "pinned": {
                "type": "boolean"
              },
              "note_id": {
                "type": "string",
                "format": "uuid"
              },
              "audience": {
                "enum": [
                  "team",
                  "office"
                ],
                "type": "string",
                "description": "team (default): every shop member sees it. office: owner, office and the managing platform only."
              },
              "mentions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "description": "Person ids of shop members to notify (team.list). They get an email unless they turned it off. Office notes can mention only owner and office. Customers are never notified."
              },
              "media_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "description": "Photos or videos already on the job."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "note_id",
                  "shop_id",
                  "target_kind",
                  "target_id",
                  "job_id",
                  "visit_id",
                  "mentions",
                  "agent_name",
                  "source",
                  "channel",
                  "body",
                  "audience",
                  "pinned",
                  "media_ids",
                  "recorded_at",
                  "duration_seconds",
                  "transcribed_with",
                  "language",
                  "revisions",
                  "written_by",
                  "written_by_name",
                  "created_at",
                  "edited_at",
                  "removed_at",
                  "removed_by",
                  "remove_reason"
                ],
                "properties": {
                  "body": {
                    "type": "string"
                  },
                  "job_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "pinned": {
                    "type": "boolean"
                  },
                  "source": {
                    "type": "string"
                  },
                  "channel": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "note_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "audience": {
                    "type": "string"
                  },
                  "language": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "mentions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "edited_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "media_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "revisions": {
                    "type": "integer"
                  },
                  "target_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "agent_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "removed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "removed_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "written_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "recorded_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "target_kind": {
                    "type": "string"
                  },
                  "remove_reason": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "written_by_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "duration_seconds": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "transcribed_with": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "notes_remove",
          "description": "Take a note off its record. The writer, owner or office can. It stays in history with who removed it and why.",
          "inputSchema": {
            "type": "object",
            "required": [
              "note_id"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "maxLength": 500
              },
              "note_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "note_id",
                  "removed",
                  "removed_at"
                ],
                "properties": {
                  "note_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "removed": {
                    "type": "boolean"
                  },
                  "removed_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "notes_get",
          "description": "One note you may see, with every earlier wording (history, oldest first).",
          "inputSchema": {
            "type": "object",
            "required": [
              "note_id"
            ],
            "properties": {
              "note_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "note_id",
              "shop_id",
              "target_kind",
              "target_id",
              "job_id",
              "visit_id",
              "mentions",
              "agent_name",
              "source",
              "channel",
              "body",
              "audience",
              "pinned",
              "media_ids",
              "recorded_at",
              "duration_seconds",
              "transcribed_with",
              "language",
              "revisions",
              "written_by",
              "written_by_name",
              "created_at",
              "edited_at",
              "removed_at",
              "removed_by",
              "remove_reason",
              "history"
            ],
            "properties": {
              "body": {
                "type": "string"
              },
              "job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "pinned": {
                "type": "boolean"
              },
              "source": {
                "type": "string"
              },
              "channel": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "body",
                    "until"
                  ],
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "until": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              },
              "note_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "audience": {
                "type": "string"
              },
              "language": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mentions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "visit_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "edited_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "media_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "revisions": {
                "type": "integer"
              },
              "target_id": {
                "type": "string",
                "format": "uuid"
              },
              "agent_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "removed_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "written_by": {
                "type": "string",
                "format": "uuid"
              },
              "recorded_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "target_kind": {
                "type": "string"
              },
              "remove_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "written_by_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "duration_seconds": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "transcribed_with": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "notes_list",
          "description": "Notes you may see on one record (target_kind and target_id), on a job (job_id: the job, its visits and anything on it such as its photos, quotes and invoices), on one visit, or the notes that mention you (mentioning_me). Pinned first, then newest first. Filter by source (typed or voice_memo); removed notes are left out unless include_removed is true. Read the notes on a record before you work on it.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "source": {
                "enum": [
                  "typed",
                  "voice_memo"
                ],
                "type": "string"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "target_id": {
                "type": "string",
                "format": "uuid"
              },
              "target_kind": {
                "enum": [
                  "job",
                  "visit",
                  "media",
                  "customer",
                  "property",
                  "equipment",
                  "quote",
                  "invoice",
                  "request",
                  "worker",
                  "payment",
                  "pricebook_item",
                  "maintenance_plan",
                  "shop"
                ],
                "type": "string",
                "description": "What the note is on. worker is a membership id, payment a charge id, media a photo or video id, shop the shop id. Notes on a worker or a payment are office only."
              },
              "mentioning_me": {
                "enum": [
                  "true",
                  "false"
                ],
                "type": "string"
              },
              "include_removed": {
                "enum": [
                  "true",
                  "false"
                ],
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "note_id",
                    "shop_id",
                    "target_kind",
                    "target_id",
                    "job_id",
                    "visit_id",
                    "mentions",
                    "agent_name",
                    "source",
                    "channel",
                    "body",
                    "audience",
                    "pinned",
                    "media_ids",
                    "recorded_at",
                    "duration_seconds",
                    "transcribed_with",
                    "language",
                    "revisions",
                    "written_by",
                    "written_by_name",
                    "created_at",
                    "edited_at",
                    "removed_at",
                    "removed_by",
                    "remove_reason"
                  ],
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "pinned": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string"
                    },
                    "channel": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "audience": {
                      "type": "string"
                    },
                    "language": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "visit_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "edited_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "media_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "revisions": {
                      "type": "integer"
                    },
                    "target_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "agent_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "removed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "removed_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "written_by": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "recorded_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "target_kind": {
                      "type": "string"
                    },
                    "remove_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "written_by_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "duration_seconds": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "transcribed_with": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "notes_search",
          "description": "Find notes you may see by their words, across every record in a shop. Optional target_kind narrows it. Newest first among the best matches. Search here before you ask the worker something the team may already have written down.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "q"
            ],
            "properties": {
              "q": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "target_kind": {
                "enum": [
                  "job",
                  "visit",
                  "media",
                  "customer",
                  "property",
                  "equipment",
                  "quote",
                  "invoice",
                  "request",
                  "worker",
                  "payment",
                  "pricebook_item",
                  "maintenance_plan",
                  "shop"
                ],
                "type": "string",
                "description": "What the note is on. worker is a membership id, payment a charge id, media a photo or video id, shop the shop id. Notes on a worker or a payment are office only."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "items"
            ],
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "note_id",
                    "shop_id",
                    "target_kind",
                    "target_id",
                    "job_id",
                    "visit_id",
                    "mentions",
                    "agent_name",
                    "source",
                    "channel",
                    "body",
                    "audience",
                    "pinned",
                    "media_ids",
                    "recorded_at",
                    "duration_seconds",
                    "transcribed_with",
                    "language",
                    "revisions",
                    "written_by",
                    "written_by_name",
                    "created_at",
                    "edited_at",
                    "removed_at",
                    "removed_by",
                    "remove_reason",
                    "rank"
                  ],
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "rank": {
                      "type": "number"
                    },
                    "job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "pinned": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string"
                    },
                    "channel": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "audience": {
                      "type": "string"
                    },
                    "language": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mentions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "visit_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "edited_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "media_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "revisions": {
                      "type": "integer"
                    },
                    "target_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "agent_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "removed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "removed_by": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "written_by": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "recorded_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "target_kind": {
                      "type": "string"
                    },
                    "remove_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "written_by_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "duration_seconds": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "transcribed_with": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "notifications_getPrefs",
          "description": "How you hear about notes that mention you in a shop: email (on unless you turned it off) and text (off by default; texts are not sent yet). Your own settings only.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "mention_email",
              "mention_text",
              "kit_list_email",
              "texts_sending"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "mention_text": {
                "type": "boolean"
              },
              "mention_email": {
                "type": "boolean"
              },
              "texts_sending": {
                "type": "boolean"
              },
              "kit_list_email": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "notifications_setPrefs",
          "description": "Turn mention emails or texts, or the night-before kit list email, on or off for yourself in one shop. Ask the worker before you change these. Texts stay held and unsent until the shop's texting registration is done.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "mention_text": {
                "type": "boolean"
              },
              "mention_email": {
                "type": "boolean"
              },
              "kit_list_email": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "mention_email",
                  "mention_text",
                  "kit_list_email",
                  "texts_sending"
                ],
                "properties": {
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "mention_text": {
                    "type": "boolean"
                  },
                  "mention_email": {
                    "type": "boolean"
                  },
                  "texts_sending": {
                    "type": "boolean"
                  },
                  "kit_list_email": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "costs_job",
          "description": "Job costing for one job: contract, invoiced, collected and revenue against labor (approved and pending time at each entry's cost rate), materials at cost, expenses and Doing Work fees, with profit and margin. Owner or office; needs seeing costs and prices.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "job_id",
              "kind",
              "status",
              "summary",
              "customer_id",
              "occurred_at",
              "currency",
              "contract_minor",
              "invoiced_minor",
              "tax_minor",
              "draft_invoices_minor",
              "refunded_minor",
              "collected_minor",
              "revenue_minor",
              "labor_minutes",
              "labor_pending_minutes",
              "labor_cost_minor",
              "labor_pending_cost_minor",
              "uncosted_minutes",
              "running_clocks",
              "materials_cost_minor",
              "materials_price_minor",
              "uncosted_materials",
              "expenses_minor",
              "expenses_by_category",
              "fees_minor",
              "cost_minor",
              "profit_minor",
              "margin",
              "unbilled_minor"
            ],
            "properties": {
              "kind": {
                "type": "string"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "margin": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "profit / revenue, 4 decimals; null while revenue is 0."
              },
              "status": {
                "type": "string"
              },
              "summary": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "type": "string"
              },
              "tax_minor": {
                "type": "integer",
                "description": "Sales tax on those invoices; it is not the shop's money, so revenue leaves it out."
              },
              "cost_minor": {
                "type": "integer",
                "description": "labor + materials + expenses + fees."
              },
              "fees_minor": {
                "type": "integer",
                "description": "Doing Work fees taken from the job's payments."
              },
              "customer_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "profit_minor": {
                "type": "integer",
                "description": "revenue - cost. Can be below 0."
              },
              "labor_minutes": {
                "type": "integer",
                "description": "Approved and pending minutes on the job (running clocks not counted)."
              },
              "revenue_minor": {
                "type": "integer",
                "description": "invoiced - tax - refunded. What the job earned so far."
              },
              "contract_minor": {
                "type": "integer",
                "description": "Signed quote totals (tax included) plus approved change orders."
              },
              "expenses_minor": {
                "type": "integer",
                "description": "Expenses on the job in the shop's currency, as entered (receipt totals)."
              },
              "invoiced_minor": {
                "type": "integer",
                "description": "Sent and later invoices, tax included; drafts and voided invoices left out."
              },
              "refunded_minor": {
                "type": "integer",
                "description": "Refunds and lost disputes on the job's payments."
              },
              "running_clocks": {
                "type": "integer"
              },
              "unbilled_minor": {
                "type": "integer",
                "description": "contract - invoiced: signed work not yet invoiced (tax included both sides)."
              },
              "collected_minor": {
                "type": "integer",
                "description": "Paid through Doing Work, net of refunds, lost disputes and tips, plus invoices recorded as paid outside."
              },
              "labor_cost_minor": {
                "type": "integer",
                "description": "Approved and pending minutes at each entry's copied cost rate, rounded half up."
              },
              "uncosted_minutes": {
                "type": "integer",
                "description": "Minutes with no labor cost rate set; they count as zero cost. Set rates with timesheets.setRate."
              },
              "uncosted_materials": {
                "type": "integer",
                "description": "Material lines with no unit cost; they count as zero cost."
              },
              "draft_invoices_minor": {
                "type": "integer",
                "description": "Amount in minor units of the currency (cents)."
              },
              "expenses_by_category": {
                "type": "object",
                "description": "category -> minor units.",
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "materials_cost_minor": {
                "type": "integer",
                "description": "Materials used, quantity x unit cost, rounded half up per line."
              },
              "labor_pending_minutes": {
                "type": "integer"
              },
              "materials_price_minor": {
                "type": "integer",
                "description": "The same materials at their recorded prices (what they would bill at)."
              },
              "labor_pending_cost_minor": {
                "type": "integer",
                "description": "Amount in minor units of the currency (cents)."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "costs_jobs",
          "description": "Job costing across jobs dated between two days (inclusive, in the shop's time zone), with totals. Sort by profit (lowest first, to find the losers), margin, or date. Up to 500 jobs; truncated says when more matched.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "from",
              "to"
            ],
            "properties": {
              "to": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "from": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "sort": {
                "enum": [
                  "profit",
                  "margin",
                  "date"
                ],
                "type": "string",
                "description": "Default profit (lowest first)."
              },
              "limit": {
                "type": "integer",
                "maximum": 500,
                "minimum": 1,
                "description": "Default 200."
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "open",
                    "quoted",
                    "scheduled",
                    "in_progress",
                    "done",
                    "cancelled"
                  ],
                  "type": "string"
                },
                "maxItems": 6,
                "description": "Only these job statuses. Default: every status except cancelled."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "jobs",
              "totals",
              "truncated"
            ],
            "properties": {
              "jobs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "kind",
                    "status",
                    "summary",
                    "customer_id",
                    "occurred_at",
                    "currency",
                    "contract_minor",
                    "invoiced_minor",
                    "tax_minor",
                    "draft_invoices_minor",
                    "refunded_minor",
                    "collected_minor",
                    "revenue_minor",
                    "labor_minutes",
                    "labor_pending_minutes",
                    "labor_cost_minor",
                    "labor_pending_cost_minor",
                    "uncosted_minutes",
                    "running_clocks",
                    "materials_cost_minor",
                    "materials_price_minor",
                    "uncosted_materials",
                    "expenses_minor",
                    "expenses_by_category",
                    "fees_minor",
                    "cost_minor",
                    "profit_minor",
                    "margin",
                    "unbilled_minor"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "margin": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "profit / revenue, 4 decimals; null while revenue is 0."
                    },
                    "status": {
                      "type": "string"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "currency": {
                      "type": "string"
                    },
                    "tax_minor": {
                      "type": "integer",
                      "description": "Sales tax on those invoices; it is not the shop's money, so revenue leaves it out."
                    },
                    "cost_minor": {
                      "type": "integer",
                      "description": "labor + materials + expenses + fees."
                    },
                    "fees_minor": {
                      "type": "integer",
                      "description": "Doing Work fees taken from the job's payments."
                    },
                    "customer_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "profit_minor": {
                      "type": "integer",
                      "description": "revenue - cost. Can be below 0."
                    },
                    "labor_minutes": {
                      "type": "integer",
                      "description": "Approved and pending minutes on the job (running clocks not counted)."
                    },
                    "revenue_minor": {
                      "type": "integer",
                      "description": "invoiced - tax - refunded. What the job earned so far."
                    },
                    "contract_minor": {
                      "type": "integer",
                      "description": "Signed quote totals (tax included) plus approved change orders."
                    },
                    "expenses_minor": {
                      "type": "integer",
                      "description": "Expenses on the job in the shop's currency, as entered (receipt totals)."
                    },
                    "invoiced_minor": {
                      "type": "integer",
                      "description": "Sent and later invoices, tax included; drafts and voided invoices left out."
                    },
                    "refunded_minor": {
                      "type": "integer",
                      "description": "Refunds and lost disputes on the job's payments."
                    },
                    "running_clocks": {
                      "type": "integer"
                    },
                    "unbilled_minor": {
                      "type": "integer",
                      "description": "contract - invoiced: signed work not yet invoiced (tax included both sides)."
                    },
                    "collected_minor": {
                      "type": "integer",
                      "description": "Paid through Doing Work, net of refunds, lost disputes and tips, plus invoices recorded as paid outside."
                    },
                    "labor_cost_minor": {
                      "type": "integer",
                      "description": "Approved and pending minutes at each entry's copied cost rate, rounded half up."
                    },
                    "uncosted_minutes": {
                      "type": "integer",
                      "description": "Minutes with no labor cost rate set; they count as zero cost. Set rates with timesheets.setRate."
                    },
                    "uncosted_materials": {
                      "type": "integer",
                      "description": "Material lines with no unit cost; they count as zero cost."
                    },
                    "draft_invoices_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    },
                    "expenses_by_category": {
                      "type": "object",
                      "description": "category -> minor units.",
                      "additionalProperties": {
                        "type": "integer"
                      }
                    },
                    "materials_cost_minor": {
                      "type": "integer",
                      "description": "Materials used, quantity x unit cost, rounded half up per line."
                    },
                    "labor_pending_minutes": {
                      "type": "integer"
                    },
                    "materials_price_minor": {
                      "type": "integer",
                      "description": "The same materials at their recorded prices (what they would bill at)."
                    },
                    "labor_pending_cost_minor": {
                      "type": "integer",
                      "description": "Amount in minor units of the currency (cents)."
                    }
                  }
                }
              },
              "totals": {
                "type": "object",
                "required": [
                  "jobs",
                  "currency",
                  "margin",
                  "contract_minor",
                  "invoiced_minor",
                  "tax_minor",
                  "draft_invoices_minor",
                  "refunded_minor",
                  "collected_minor",
                  "revenue_minor",
                  "labor_minutes",
                  "labor_pending_minutes",
                  "labor_cost_minor",
                  "labor_pending_cost_minor",
                  "uncosted_minutes",
                  "materials_cost_minor",
                  "materials_price_minor",
                  "uncosted_materials",
                  "expenses_minor",
                  "fees_minor",
                  "cost_minor",
                  "profit_minor",
                  "unbilled_minor"
                ],
                "properties": {
                  "jobs": {
                    "type": "integer"
                  },
                  "margin": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "currency": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tax_minor": {
                    "type": "integer"
                  },
                  "cost_minor": {
                    "type": "integer"
                  },
                  "fees_minor": {
                    "type": "integer"
                  },
                  "profit_minor": {
                    "type": "integer"
                  },
                  "labor_minutes": {
                    "type": "integer"
                  },
                  "revenue_minor": {
                    "type": "integer"
                  },
                  "contract_minor": {
                    "type": "integer"
                  },
                  "expenses_minor": {
                    "type": "integer"
                  },
                  "invoiced_minor": {
                    "type": "integer"
                  },
                  "refunded_minor": {
                    "type": "integer"
                  },
                  "unbilled_minor": {
                    "type": "integer"
                  },
                  "collected_minor": {
                    "type": "integer"
                  },
                  "labor_cost_minor": {
                    "type": "integer"
                  },
                  "uncosted_minutes": {
                    "type": "integer"
                  },
                  "uncosted_materials": {
                    "type": "integer"
                  },
                  "draft_invoices_minor": {
                    "type": "integer"
                  },
                  "materials_cost_minor": {
                    "type": "integer"
                  },
                  "labor_pending_minutes": {
                    "type": "integer"
                  },
                  "materials_price_minor": {
                    "type": "integer"
                  },
                  "labor_pending_cost_minor": {
                    "type": "integer"
                  }
                }
              },
              "truncated": {
                "type": "boolean"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "costs_marginAlert",
          "description": "The shop's profit alert: the margin floor in percent, or null when off. Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "below_percent"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "below_percent": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "costs_setMarginAlert",
          "description": "Set a profit alert (owner only): when an invoiced job's margin drops under below_percent, the job.margin_low event fires once for it (subscribe with a webhook). It fires again only after the margin climbs back and drops again. The check reads job costing as you see it. null turns it off.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "below_percent"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "below_percent": {
                "type": [
                  "number",
                  "null"
                ],
                "maximum": 100,
                "minimum": 0
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "below_percent"
                ],
                "properties": {
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "below_percent": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "crews_save",
          "description": "Save a named crew of workers to book together (owner or office). Give crew_id to rename it or replace its workers. lead_person_id marks the crew lead (a current member; they do not have to be in person_ids). Use the crew_id on visits.create, visits.assign or schedule.findTime. Shop roles are owner, office, lead and field.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "name",
              "person_ids"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 80,
                "minLength": 1
              },
              "crew_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 20,
                "minItems": 1,
                "uniqueItems": true
              },
              "lead_person_id": {
                "type": "string",
                "format": "uuid",
                "description": "The crew lead. Omit to leave the current lead unchanged on an update, or none on a new crew. Null clears it."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "crew_id",
                  "name",
                  "person_ids",
                  "lead_person_id",
                  "archived"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "crew_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "archived": {
                    "type": "boolean"
                  },
                  "person_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "lead_person_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "crews_list",
          "description": "The shop's crews and their current workers. Any worker in the shop can read it. Archived crews only with include_archived.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "crews"
            ],
            "properties": {
              "crews": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "crew_id",
                    "name",
                    "person_ids",
                    "lead_person_id",
                    "archived"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "crew_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "person_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "lead_person_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "crews_archive",
          "description": "Archive a crew (owner or office). Visits already booked keep their workers.",
          "inputSchema": {
            "type": "object",
            "required": [
              "crew_id"
            ],
            "properties": {
              "crew_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "crew_id",
                  "archived"
                ],
                "properties": {
                  "crew_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "archived": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "financing_save",
          "description": "Save a financing link the shop works with, shown on quotes at or above its minimum (owner or office). Up to 3 live links. Doing Work does not process financing or charge any fee for it. The link goes to the shop's own financing company.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "label",
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "maxLength": 500,
                "minLength": 12,
                "description": "An https address at the financing company. Placeholder and reserved names (example.com, example.net, example.org, .example, .test, .invalid, localhost) and raw IP addresses are refused. Doing Work does not open it."
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200,
                "description": "Optional short note under the button. Null clears it."
              },
              "label": {
                "type": "string",
                "maxLength": 60,
                "minLength": 1,
                "description": "What the customer sees on the button, such as Goodleap or Synchrony."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "position": {
                "type": "integer",
                "maximum": 3,
                "minimum": 1,
                "description": "1, 2 or 3. Leave out to take the next open spot."
              },
              "min_total_minor": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0,
                "description": "Show this link only when the quote total (or the chosen option) is at least this many cents. Null means no minimum."
              },
              "financing_link_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "financing_link_id",
                  "label",
                  "url",
                  "note",
                  "min_total_minor",
                  "position",
                  "archived"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label": {
                    "type": "string"
                  },
                  "archived": {
                    "type": "boolean"
                  },
                  "position": {
                    "type": "integer"
                  },
                  "min_total_minor": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Show this link when the quote total is at least this many cents. Null means no minimum. Doing Work does not charge this."
                  },
                  "financing_link_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "financing_list",
          "description": "The shop's financing links. Any worker in the shop can read them. Archived links only with include_archived. Doing Work does not process financing or charge any fee for it. Each link goes to the shop's own financing company.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "include_archived": {
                "type": "boolean"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "links"
            ],
            "properties": {
              "links": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "financing_link_id",
                    "label",
                    "url",
                    "note",
                    "min_total_minor",
                    "position",
                    "archived"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "archived": {
                      "type": "boolean"
                    },
                    "position": {
                      "type": "integer"
                    },
                    "min_total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Show this link when the quote total is at least this many cents. Null means no minimum. Doing Work does not charge this."
                    },
                    "financing_link_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "financing_archive",
          "description": "Archive a financing link so it no longer shows on quotes (owner or office). Doing Work does not process financing or charge any fee for it. The link goes to the shop's own financing company.",
          "inputSchema": {
            "type": "object",
            "required": [
              "financing_link_id"
            ],
            "properties": {
              "financing_link_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "financing_link_id",
                  "archived"
                ],
                "properties": {
                  "archived": {
                    "type": "boolean"
                  },
                  "financing_link_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "reports_today",
          "description": "The shop's today queues in one call: visits today, visits in the next 7 days with nobody assigned, new requests, quotes and change orders waiting on the customer, overdue and draft invoices, done jobs not invoiced, time waiting for approval, approvals waiting on the owner, open tasks due by today and done visits with no quote sent yet. Each list shows the first 25 with the full count.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "date": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "description": "The day to read, in the shop's time zone. Default: today there."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "date",
              "time_zone",
              "currency",
              "visits_today",
              "unassigned_visits",
              "new_requests",
              "quotes_waiting",
              "change_orders_waiting",
              "invoices_overdue",
              "draft_invoices",
              "jobs_to_invoice",
              "time_to_approve",
              "approvals_pending",
              "open_tasks",
              "capacity",
              "quote_queue",
              "summary",
              "display",
              "next_steps"
            ],
            "properties": {
              "date": {
                "type": "string"
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "capacity": {
                "type": "object",
                "required": [
                  "time_zone",
                  "hours_source",
                  "visit_minutes",
                  "days",
                  "next_actions"
                ],
                "properties": {
                  "days": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "date",
                        "weekday",
                        "open_minutes",
                        "booked_minutes",
                        "free_minutes",
                        "percent_booked",
                        "fits",
                        "workers"
                      ],
                      "properties": {
                        "date": {
                          "type": "string"
                        },
                        "fits": {
                          "type": "integer"
                        },
                        "weekday": {
                          "type": "string"
                        },
                        "workers": {
                          "type": "integer"
                        },
                        "free_minutes": {
                          "type": "integer"
                        },
                        "open_minutes": {
                          "type": "integer"
                        },
                        "booked_minutes": {
                          "type": "integer"
                        },
                        "percent_booked": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "time_zone": {
                    "type": "string"
                  },
                  "hours_source": {
                    "type": "string"
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "visit_minutes": {
                    "type": "integer"
                  }
                },
                "description": "F5: the next 5 working days from this day, how booked each is and how many 2 hour visits still fit."
              },
              "currency": {
                "type": "string"
              },
              "time_zone": {
                "type": "string"
              },
              "next_steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 5,
                "description": "Up to 5 next steps. Today's queues come first: new requests, quotes waiting for a reply, invoices due, draft invoices, change orders waiting, and jobs to invoice. One recap is one step. Checkup items fill any slots left, with duplicates removed."
              },
              "open_tasks": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "task_id",
                        "title",
                        "job_id",
                        "job_summary",
                        "assignee_id",
                        "due_at",
                        "overdue"
                      ],
                      "properties": {
                        "title": {
                          "type": "string"
                        },
                        "due_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "job_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "overdue": {
                          "type": "boolean"
                        },
                        "task_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "assignee_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "job_summary": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                },
                "description": "H1: open tasks overdue or due by the end of the day, overdue first, then by job."
              },
              "quote_queue": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "visit_id",
                        "job_id",
                        "job_summary",
                        "customer_name",
                        "done_at"
                      ],
                      "properties": {
                        "job_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "done_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "visit_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "job_summary": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "customer_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                },
                "description": "J6: visits done a day or more ago (last 14 days) on open jobs with no quote sent yet."
              },
              "new_requests": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "request_id",
                        "title",
                        "source",
                        "customer_id",
                        "created_at"
                      ],
                      "properties": {
                        "title": {
                          "type": "string"
                        },
                        "source": {
                          "type": "string"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "request_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "customer_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              },
              "visits_today": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "visit_id",
                        "job_id",
                        "job_summary",
                        "customer_name",
                        "title",
                        "starts_at",
                        "ends_at",
                        "status",
                        "assignees"
                      ],
                      "properties": {
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "job_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string"
                        },
                        "ends_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "visit_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "assignees": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "starts_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "job_summary": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "customer_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "draft_invoices": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "invoice_id",
                        "job_id",
                        "customer_name",
                        "doc_no",
                        "doc_label",
                        "total_minor",
                        "total_text",
                        "created_at"
                      ],
                      "properties": {
                        "doc_no": {
                          "type": "integer"
                        },
                        "job_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "doc_label": {
                          "type": "string"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "invoice_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "total_text": {
                          "type": "string"
                        },
                        "total_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "customer_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "quotes_waiting": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "quote_id",
                        "job_id",
                        "customer_name",
                        "doc_no",
                        "doc_label",
                        "total_minor",
                        "total_text",
                        "sent_at",
                        "days_waiting"
                      ],
                      "properties": {
                        "doc_no": {
                          "type": "integer"
                        },
                        "job_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "sent_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "quote_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "doc_label": {
                          "type": "string"
                        },
                        "total_text": {
                          "type": "string"
                        },
                        "total_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "days_waiting": {
                          "type": "integer"
                        },
                        "customer_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                },
                "description": "Sent, not yet signed or declined; oldest first."
              },
              "jobs_to_invoice": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "job_id",
                        "summary",
                        "customer_name",
                        "occurred_at"
                      ],
                      "properties": {
                        "job_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "summary": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "occurred_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "customer_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                },
                "description": "Done jobs with no invoice (voided ones do not count)."
              },
              "time_to_approve": {
                "type": "object",
                "required": [
                  "entries",
                  "minutes",
                  "people",
                  "oldest_started_at"
                ],
                "properties": {
                  "people": {
                    "type": "integer"
                  },
                  "entries": {
                    "type": "integer"
                  },
                  "minutes": {
                    "type": "integer"
                  },
                  "oldest_started_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  }
                }
              },
              "invoices_overdue": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "invoice_id",
                        "job_id",
                        "customer_name",
                        "doc_no",
                        "doc_label",
                        "owed_minor",
                        "owed_text",
                        "due_on",
                        "days_overdue"
                      ],
                      "properties": {
                        "doc_no": {
                          "type": "integer"
                        },
                        "due_on": {
                          "type": "string"
                        },
                        "job_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "doc_label": {
                          "type": "string"
                        },
                        "owed_text": {
                          "type": "string"
                        },
                        "invoice_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "owed_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "days_overdue": {
                          "type": "integer"
                        },
                        "customer_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "approvals_pending": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "approval_id",
                        "op_id",
                        "amount_minor",
                        "requested_by",
                        "expires_at"
                      ],
                      "properties": {
                        "op_id": {
                          "type": "string"
                        },
                        "expires_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "approval_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "amount_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "requested_by": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              },
              "unassigned_visits": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "visit_id",
                        "job_id",
                        "job_summary",
                        "customer_name",
                        "title",
                        "starts_at",
                        "ends_at",
                        "status",
                        "assignees"
                      ],
                      "properties": {
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "job_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string"
                        },
                        "ends_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "visit_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "assignees": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        },
                        "starts_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "job_summary": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "customer_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                },
                "description": "Scheduled visits from the start of the day through the next 7 days with nobody assigned."
              },
              "change_orders_waiting": {
                "type": "object",
                "required": [
                  "count",
                  "items"
                ],
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "change_order_id",
                        "job_id",
                        "number",
                        "total_minor",
                        "sent_at"
                      ],
                      "properties": {
                        "job_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "number": {
                          "type": "integer"
                        },
                        "sent_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "total_minor": {
                          "type": "integer",
                          "description": "Amount in minor units of the currency (cents)."
                        },
                        "change_order_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reports_week",
          "description": "How the shop did in one week (Monday to Sunday in the shop's time zone) against the week before: money collected, refunded, paid outside and invoiced; quotes sent and signed; jobs, visits, customers and requests; time logged and expenses.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "week_of": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "description": "Any day in the week to read. Default: today in the shop's time zone (this week so far)."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "from",
              "to",
              "time_zone",
              "currency",
              "this_week",
              "last_week",
              "change",
              "summary",
              "display",
              "next_steps"
            ],
            "properties": {
              "to": {
                "type": "string"
              },
              "from": {
                "type": "string"
              },
              "change": {
                "type": "object",
                "required": [
                  "collected_minor",
                  "refunded_minor",
                  "outside_minor",
                  "invoiced_minor",
                  "invoices_issued",
                  "quotes_sent",
                  "quotes_signed",
                  "quotes_signed_minor",
                  "jobs_created",
                  "jobs_done",
                  "visits_scheduled",
                  "visits_done",
                  "new_customers",
                  "new_requests",
                  "minutes_logged",
                  "expenses_minor"
                ],
                "properties": {
                  "jobs_done": {
                    "type": "integer"
                  },
                  "quotes_sent": {
                    "type": "integer"
                  },
                  "visits_done": {
                    "type": "integer"
                  },
                  "jobs_created": {
                    "type": "integer"
                  },
                  "new_requests": {
                    "type": "integer"
                  },
                  "new_customers": {
                    "type": "integer"
                  },
                  "outside_minor": {
                    "type": "integer"
                  },
                  "quotes_signed": {
                    "type": "integer"
                  },
                  "expenses_minor": {
                    "type": "integer"
                  },
                  "invoiced_minor": {
                    "type": "integer"
                  },
                  "minutes_logged": {
                    "type": "integer"
                  },
                  "refunded_minor": {
                    "type": "integer"
                  },
                  "collected_minor": {
                    "type": "integer"
                  },
                  "invoices_issued": {
                    "type": "integer"
                  },
                  "visits_scheduled": {
                    "type": "integer"
                  },
                  "quotes_signed_minor": {
                    "type": "integer"
                  }
                },
                "description": "this week minus last week."
              },
              "display": {
                "type": "object",
                "required": [
                  "kind",
                  "title"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "table",
                      "cards",
                      "timeline",
                      "checklist",
                      "map",
                      "calendar",
                      "chart"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "key",
                        "label"
                      ],
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "summary": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "last_week": {
                "type": "object",
                "required": [
                  "collected_minor",
                  "refunded_minor",
                  "outside_minor",
                  "invoiced_minor",
                  "invoices_issued",
                  "quotes_sent",
                  "quotes_signed",
                  "quotes_signed_minor",
                  "jobs_created",
                  "jobs_done",
                  "visits_scheduled",
                  "visits_done",
                  "new_customers",
                  "new_requests",
                  "minutes_logged",
                  "expenses_minor"
                ],
                "properties": {
                  "jobs_done": {
                    "type": "integer",
                    "description": "Jobs that became done in the week and are done now."
                  },
                  "quotes_sent": {
                    "type": "integer",
                    "description": "Quotes last sent in the week."
                  },
                  "visits_done": {
                    "type": "integer"
                  },
                  "jobs_created": {
                    "type": "integer"
                  },
                  "new_requests": {
                    "type": "integer"
                  },
                  "new_customers": {
                    "type": "integer"
                  },
                  "outside_minor": {
                    "type": "integer",
                    "description": "Invoices recorded as paid outside Doing Work, by the paid-on date."
                  },
                  "quotes_signed": {
                    "type": "integer"
                  },
                  "expenses_minor": {
                    "type": "integer",
                    "description": "Expenses spent in the week, in the shop's currency."
                  },
                  "invoiced_minor": {
                    "type": "integer",
                    "description": "Invoices issued in the week (not voided), tax included."
                  },
                  "minutes_logged": {
                    "type": "integer",
                    "description": "Approved and pending time started in the week."
                  },
                  "refunded_minor": {
                    "type": "integer",
                    "description": "Amount in minor units of the currency (cents)."
                  },
                  "collected_minor": {
                    "type": "integer",
                    "description": "Card and bank payments through Doing Work that succeeded in the week, by the day they succeeded (tips included)."
                  },
                  "invoices_issued": {
                    "type": "integer"
                  },
                  "visits_scheduled": {
                    "type": "integer"
                  },
                  "quotes_signed_minor": {
                    "type": "integer",
                    "description": "Amount in minor units of the currency (cents)."
                  }
                }
              },
              "this_week": {
                "type": "object",
                "required": [
                  "collected_minor",
                  "refunded_minor",
                  "outside_minor",
                  "invoiced_minor",
                  "invoices_issued",
                  "quotes_sent",
                  "quotes_signed",
                  "quotes_signed_minor",
                  "jobs_created",
                  "jobs_done",
                  "visits_scheduled",
                  "visits_done",
                  "new_customers",
                  "new_requests",
                  "minutes_logged",
                  "expenses_minor"
                ],
                "properties": {
                  "jobs_done": {
                    "type": "integer",
                    "description": "Jobs that became done in the week and are done now."
                  },
                  "quotes_sent": {
                    "type": "integer",
                    "description": "Quotes last sent in the week."
                  },
                  "visits_done": {
                    "type": "integer"
                  },
                  "jobs_created": {
                    "type": "integer"
                  },
                  "new_requests": {
                    "type": "integer"
                  },
                  "new_customers": {
                    "type": "integer"
                  },
                  "outside_minor": {
                    "type": "integer",
                    "description": "Invoices recorded as paid outside Doing Work, by the paid-on date."
                  },
                  "quotes_signed": {
                    "type": "integer"
                  },
                  "expenses_minor": {
                    "type": "integer",
                    "description": "Expenses spent in the week, in the shop's currency."
                  },
                  "invoiced_minor": {
                    "type": "integer",
                    "description": "Invoices issued in the week (not voided), tax included."
                  },
                  "minutes_logged": {
                    "type": "integer",
                    "description": "Approved and pending time started in the week."
                  },
                  "refunded_minor": {
                    "type": "integer",
                    "description": "Amount in minor units of the currency (cents)."
                  },
                  "collected_minor": {
                    "type": "integer",
                    "description": "Card and bank payments through Doing Work that succeeded in the week, by the day they succeeded (tips included)."
                  },
                  "invoices_issued": {
                    "type": "integer"
                  },
                  "visits_scheduled": {
                    "type": "integer"
                  },
                  "quotes_signed_minor": {
                    "type": "integer",
                    "description": "Amount in minor units of the currency (cents)."
                  }
                }
              },
              "time_zone": {
                "type": "string"
              },
              "next_steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reports_morningEmail",
          "description": "Whether the owner's morning email is on. It comes at 7 AM shop time, only on days it has something to show (for example jobs under the margin floor). Owner or office.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "on"
            ],
            "properties": {
              "on": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reports_setMorningEmail",
          "description": "Turn the owner's morning email on or off (owner only).",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "on"
            ],
            "properties": {
              "on": {
                "type": "boolean"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "on"
                ],
                "properties": {
                  "on": {
                    "type": "boolean"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "schedule_kitList",
          "description": "The kit list for one worker and one day (tomorrow by default, shop time): each visit they are on with the address, map link, the work from the quote, materials on the job, open checklist items, pinned notes and the latest photos. Cancelled visits are left out. Quote prices show only to people who can see prices. A field worker gets only their own list.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "date": {
                "type": "string",
                "format": "date"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "date",
              "time_zone",
              "person_id",
              "visits",
              "email_hour"
            ],
            "properties": {
              "date": {
                "type": "string",
                "format": "date"
              },
              "visits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "visit_id",
                    "job_id",
                    "starts_at",
                    "ends_at",
                    "title",
                    "job_summary",
                    "customer_name",
                    "customer_phone",
                    "address",
                    "maps_url",
                    "crew_mates",
                    "scope",
                    "materials",
                    "checklist",
                    "pinned_notes",
                    "photos"
                  ],
                  "properties": {
                    "scope": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "description",
                          "quantity",
                          "unit_price_minor"
                        ],
                        "properties": {
                          "quantity": {
                            "type": "number"
                          },
                          "description": {
                            "type": "string"
                          },
                          "unit_price_minor": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "photos": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "media_id",
                          "stage",
                          "uploaded_at"
                        ],
                        "properties": {
                          "stage": {
                            "type": "string"
                          },
                          "media_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "uploaded_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "ends_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "maps_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "visit_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "checklist": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "checklist",
                          "label",
                          "required"
                        ],
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "required": {
                            "type": "boolean"
                          },
                          "checklist": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "materials": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "name",
                          "quantity",
                          "unit"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "unit": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "quantity": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "starts_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "crew_mates": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "job_summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pinned_notes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "note_id",
                          "body"
                        ],
                        "properties": {
                          "body": {
                            "type": "string"
                          },
                          "note_id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    },
                    "customer_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer_phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "person_id": {
                "type": "string",
                "format": "uuid"
              },
              "time_zone": {
                "type": "string"
              },
              "email_hour": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "schedule_setKitListEmail",
          "description": "Set the hour (0 to 23, shop time) the night-before kit list email goes to each worker with visits the next day, or turn it off with on false. Default 18 (6 PM). Owner only.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "on"
            ],
            "properties": {
              "on": {
                "type": "boolean"
              },
              "hour": {
                "type": "integer",
                "maximum": 23,
                "minimum": 0
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "on",
                  "hour"
                ],
                "properties": {
                  "on": {
                    "type": "boolean"
                  },
                  "hour": {
                    "type": "integer"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "tasks_create",
          "description": "Make a tracked task from a crew message or plain words: a title, and optionally the job, the worker it is for, the note it came from and when it is due (due_on is a day, 5 PM shop time; or due_at). Past due and still open, the worker gets one reminder email, then the owner is told once. Any worker on the shop can make one. for_agent true is the agent's own follow-up (recheck a quote, prompt the owner later): it is not emailed, and agent.due lists it when due_at has passed. op is the op to call then.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "title"
            ],
            "properties": {
              "op": {
                "type": "string",
                "maxLength": 80,
                "minLength": 1
              },
              "title": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              "due_at": {
                "type": "string",
                "format": "date-time"
              },
              "due_on": {
                "type": "string",
                "format": "date"
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "note_id": {
                "type": "string",
                "format": "uuid"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "for_agent": {
                "type": "boolean"
              },
              "assignee_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "task_id",
                  "shop_id",
                  "job_id",
                  "job_summary",
                  "note_id",
                  "title",
                  "assignee_id",
                  "assignee_name",
                  "due_at",
                  "status",
                  "overdue",
                  "created_by",
                  "created_at",
                  "closed_at",
                  "close_note",
                  "chased_at",
                  "for_agent",
                  "followup_op",
                  "next_actions"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "due_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "job_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "note_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "overdue": {
                    "type": "boolean"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "task_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "chased_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "closed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "for_agent": {
                    "type": "boolean"
                  },
                  "close_note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "assignee_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "followup_op": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "job_summary": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "assignee_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "tasks_list",
          "description": "Tasks you can see, filtered by worker, job, status (open by default; done, cancelled or all) and due (overdue, today in shop time, or all). Overdue first, then by due time. A field worker sees their own tasks, tasks they made and tasks on jobs they are booked on.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "due": {
                "enum": [
                  "overdue",
                  "today",
                  "all"
                ],
                "type": "string"
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "enum": [
                  "open",
                  "done",
                  "cancelled",
                  "all"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "for_agent": {
                "type": "boolean",
                "description": "true: only the agent's own follow-ups. false: only worker tasks. Leave out for both."
              },
              "assignee_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "tasks"
            ],
            "properties": {
              "tasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "task_id",
                    "shop_id",
                    "job_id",
                    "job_summary",
                    "note_id",
                    "title",
                    "assignee_id",
                    "assignee_name",
                    "due_at",
                    "status",
                    "overdue",
                    "created_by",
                    "created_at",
                    "closed_at",
                    "close_note",
                    "chased_at",
                    "for_agent",
                    "followup_op"
                  ],
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "job_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "note_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "overdue": {
                      "type": "boolean"
                    },
                    "shop_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "task_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "chased_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "closed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "for_agent": {
                      "type": "boolean"
                    },
                    "close_note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "created_by": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "assignee_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "followup_op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "job_summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assignee_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "tasks_update",
          "description": "Change a task's title, job, worker or due time (due_on or due_at; null clears it). A new due time re-arms the one reminder. The owner, office, the worker it is for or the person who made it can change it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "task_id"
            ],
            "properties": {
              "title": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              "due_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "due_on": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "job_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "task_id": {
                "type": "string",
                "format": "uuid"
              },
              "assignee_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "task_id",
                  "shop_id",
                  "job_id",
                  "job_summary",
                  "note_id",
                  "title",
                  "assignee_id",
                  "assignee_name",
                  "due_at",
                  "status",
                  "overdue",
                  "created_by",
                  "created_at",
                  "closed_at",
                  "close_note",
                  "chased_at",
                  "for_agent",
                  "followup_op"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "due_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "job_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "note_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "overdue": {
                    "type": "boolean"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "task_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "chased_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "closed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "for_agent": {
                    "type": "boolean"
                  },
                  "close_note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "assignee_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "followup_op": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "job_summary": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "assignee_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "tasks_close",
          "description": "Close a task as done (default) or cancelled, with an optional note. A closed task is never chased.",
          "inputSchema": {
            "type": "object",
            "required": [
              "task_id"
            ],
            "properties": {
              "note": {
                "type": "string",
                "maxLength": 2000
              },
              "status": {
                "enum": [
                  "done",
                  "cancelled"
                ],
                "type": "string"
              },
              "task_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "task_id",
                  "shop_id",
                  "job_id",
                  "job_summary",
                  "note_id",
                  "title",
                  "assignee_id",
                  "assignee_name",
                  "due_at",
                  "status",
                  "overdue",
                  "created_by",
                  "created_at",
                  "closed_at",
                  "close_note",
                  "chased_at",
                  "for_agent",
                  "followup_op"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "due_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "job_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "note_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "overdue": {
                    "type": "boolean"
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "task_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "chased_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "closed_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "for_agent": {
                    "type": "boolean"
                  },
                  "close_note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "assignee_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "followup_op": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "job_summary": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "assignee_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "schedule_capacity",
          "description": "How booked the next working days are: for each day, open worker minutes inside shop hours (and each worker's own hours) minus time off, booked minutes, percent booked, and how many visits of visit_minutes (default 120) still fit, counted the way schedule.findTime offers times. Give person_ids to check some workers. A field worker sees only themselves. Read only.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "days": {
                "type": "integer",
                "maximum": 14,
                "minimum": 1,
                "description": "Working days to read. Default 5."
              },
              "from": {
                "type": "string",
                "format": "date",
                "description": "First day, in the shop's time zone. Default today there."
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "person_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "maxItems": 50,
                "uniqueItems": true
              },
              "visit_minutes": {
                "type": "integer",
                "maximum": 720,
                "minimum": 15
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "time_zone",
              "hours_source",
              "visit_minutes",
              "days",
              "next_actions"
            ],
            "properties": {
              "days": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "date",
                    "weekday",
                    "open_minutes",
                    "booked_minutes",
                    "free_minutes",
                    "percent_booked",
                    "fits",
                    "workers"
                  ],
                  "properties": {
                    "date": {
                      "type": "string"
                    },
                    "fits": {
                      "type": "integer"
                    },
                    "weekday": {
                      "type": "string"
                    },
                    "workers": {
                      "type": "integer"
                    },
                    "free_minutes": {
                      "type": "integer"
                    },
                    "open_minutes": {
                      "type": "integer"
                    },
                    "booked_minutes": {
                      "type": "integer"
                    },
                    "percent_booked": {
                      "type": "integer"
                    }
                  }
                }
              },
              "time_zone": {
                "type": "string"
              },
              "hours_source": {
                "type": "string"
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "visit_minutes": {
                "type": "integer"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "requests_leadSettings",
          "description": "The shop's lead rules: reply to new requests within a minute (on or off), after hours (offer the first open time, or hold for the morning), and which lead types to flag or skip.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "auto_reply",
              "after_hours",
              "skip",
              "flag"
            ],
            "properties": {
              "flag": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "skip": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "auto_reply": {
                "type": "boolean"
              },
              "after_hours": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "requests_setLeadSettings",
          "description": "Change the shop's lead rules. Owner or office. auto_reply sends one first reply per new request: a text only where the customer already agreed to texts or texted the shop and the shop's number is approved, else an email, else nothing.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "flag": {
                "type": "array",
                "items": {
                  "enum": [
                    "commercial",
                    "landlord",
                    "property_manager",
                    "flipper"
                  ],
                  "type": "string"
                },
                "maxItems": 4,
                "uniqueItems": true
              },
              "skip": {
                "type": "array",
                "items": {
                  "enum": [
                    "commercial",
                    "landlord",
                    "property_manager",
                    "flipper"
                  ],
                  "type": "string"
                },
                "maxItems": 4,
                "uniqueItems": true
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "auto_reply": {
                "type": "boolean"
              },
              "after_hours": {
                "enum": [
                  "offer",
                  "hold"
                ],
                "type": "string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "shop_id",
                  "auto_reply",
                  "after_hours",
                  "skip",
                  "flag"
                ],
                "properties": {
                  "flag": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "skip": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "shop_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "auto_reply": {
                    "type": "boolean"
                  },
                  "after_hours": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "quotes_search",
          "description": "Search a shop's past quotes by scope words (for example \"water heater 50 gallon garage\"); AI can draft lines from a match and a person who can send quotes approves agent-drafted lines before the quote is sent. Matches the job summary and line items, most words matched first, signed quotes first at a tie, then newest. Read only. Prices show only to people who can see prices.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "q"
            ],
            "properties": {
              "q": {
                "type": "string",
                "maxLength": 300,
                "minLength": 2
              },
              "limit": {
                "type": "integer",
                "maximum": 25,
                "minimum": 1
              },
              "status": {
                "enum": [
                  "draft",
                  "sent",
                  "signed",
                  "declined",
                  "superseded",
                  "withdrawn"
                ],
                "type": "string"
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "exclude_job_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "words",
              "quotes",
              "next_actions"
            ],
            "properties": {
              "words": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "quotes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "quote_id",
                    "job_id",
                    "status",
                    "created_at",
                    "job_summary",
                    "customer_name",
                    "total_minor",
                    "matched",
                    "lines"
                  ],
                  "properties": {
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "description",
                          "quantity",
                          "unit_price_minor"
                        ],
                        "properties": {
                          "quantity": {
                            "type": "number"
                          },
                          "description": {
                            "type": "string"
                          },
                          "unit_price_minor": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Amount in minor units of the currency (cents), or null."
                          }
                        }
                      }
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "matched": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "job_summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    },
                    "customer_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_brief",
          "description": "One page brief before a visit: the visit and customer, the address, the request it came from, recent texts with the customer (customer words come wrapped as untrusted text) and calls (owner or office only), emails, notes with their full text and channel, recordings and private truck notes (marked internal), photos and videos with who provided each file (shop or customer) and the channel it arrived on, this job's quotes and invoices, other jobs at the same property, equipment, daily logs, open tasks, and similar past quotes. Notes and media are paged (notes_cursor, media_cursor). Read only. Prices show only to people who can see prices. next_actions suggests what to do at or after the visit.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "media_cursor": {
                "type": "string",
                "maxLength": 500
              },
              "notes_cursor": {
                "type": "string",
                "maxLength": 500
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "visit",
              "customer",
              "request",
              "messages",
              "calls",
              "notes",
              "notes_cursor",
              "media",
              "media_cursor",
              "recordings",
              "quotes",
              "invoices",
              "other_jobs",
              "equipment",
              "daily_logs",
              "emails",
              "open_tasks",
              "similar_quotes",
              "has_quote",
              "next_actions"
            ],
            "properties": {
              "calls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "at",
                    "direction",
                    "duration_s",
                    "summary"
                  ],
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "direction": {
                      "type": "string"
                    },
                    "duration_s": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "media": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "media_id",
                    "kind",
                    "stage",
                    "provided_by",
                    "channel",
                    "summary",
                    "measurements"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "stage": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "provided_by": {
                      "type": "string"
                    },
                    "measurements": {
                      "type": [
                        "array",
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "note_id",
                    "at",
                    "source",
                    "channel",
                    "pinned",
                    "body"
                  ],
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "body": {
                      "type": "string"
                    },
                    "pinned": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string"
                    },
                    "channel": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "visit": {
                "type": "object",
                "required": [
                  "visit_id",
                  "job_id",
                  "starts_at",
                  "ends_at",
                  "status",
                  "title",
                  "job_summary"
                ],
                "properties": {
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "ends_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "visit_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "starts_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "job_summary": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "emails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "at",
                    "channel",
                    "kind",
                    "subject",
                    "body"
                  ],
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "body": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "subject": {
                      "type": "string"
                    }
                  }
                }
              },
              "quotes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "quote_id",
                    "status",
                    "historical",
                    "total_minor"
                  ],
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "historical": {
                      "type": "boolean"
                    },
                    "total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    }
                  }
                }
              },
              "request": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "customer": {
                "type": "object",
                "required": [
                  "customer_id",
                  "name",
                  "phone",
                  "email",
                  "address"
                ],
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  }
                }
              },
              "invoices": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "invoice_id",
                    "status",
                    "total_minor"
                  ],
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "invoice_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    }
                  }
                }
              },
              "messages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "at",
                    "direction",
                    "channel",
                    "customer_text",
                    "shop_text"
                  ],
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "direction": {
                      "type": "string"
                    },
                    "shop_text": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer_text": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              },
              "equipment": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "equipment_id",
                    "kind",
                    "make",
                    "model",
                    "serial"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "make": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "model": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "serial": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "equipment_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "has_quote": {
                "type": "boolean"
              },
              "daily_logs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "log_id",
                    "log_date",
                    "body"
                  ],
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "log_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "log_date": {
                      "type": "string"
                    }
                  }
                }
              },
              "open_tasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "task_id",
                    "title",
                    "due_at"
                  ],
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "task_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "other_jobs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "summary",
                    "status"
                  ],
                  "properties": {
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "recordings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "recording_id",
                    "visit_id",
                    "described_as",
                    "clip_ref",
                    "transcript",
                    "worker_notes"
                  ],
                  "properties": {
                    "clip_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "visit_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "transcript": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "described_as": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "recording_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "worker_notes": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              },
              "media_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "notes_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "similar_quotes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "quote_id",
                    "job_id",
                    "status",
                    "created_at",
                    "job_summary",
                    "customer_name",
                    "total_minor",
                    "matched",
                    "lines"
                  ],
                  "properties": {
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "description",
                          "quantity",
                          "unit_price_minor"
                        ],
                        "properties": {
                          "quantity": {
                            "type": "number"
                          },
                          "description": {
                            "type": "string"
                          },
                          "unit_price_minor": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Amount in minor units of the currency (cents), or null."
                          }
                        }
                      }
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "matched": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "job_summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    },
                    "customer_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "jobs_brief",
          "description": "Everything already on a job, for a read before a visit or a proposal: notes (full text, paged), recordings and private truck notes (marked internal), photos and videos, this job's quotes and invoices, texts, calls (owner or office) and emails, other jobs at the same property, equipment, daily logs, open tasks, and similar past quotes. Pass visit_id when the read is for one visit. notes_cursor and media_cursor fetch the next page. Read only. Prices show only to people who can see prices. Nothing is sent.",
          "inputSchema": {
            "type": "object",
            "required": [
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "media_cursor": {
                "type": "string",
                "maxLength": 500
              },
              "notes_cursor": {
                "type": "string",
                "maxLength": 500
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "job",
              "visit",
              "notes",
              "notes_cursor",
              "media",
              "media_cursor",
              "recordings",
              "quotes",
              "invoices",
              "messages",
              "calls",
              "emails",
              "other_jobs",
              "equipment",
              "daily_logs",
              "open_tasks",
              "similar_quotes",
              "next_actions"
            ],
            "properties": {
              "job": {
                "type": "object",
                "required": [
                  "job_id",
                  "summary",
                  "status",
                  "customer_id",
                  "customer_name",
                  "address"
                ],
                "properties": {
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "summary": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "customer_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "customer_name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "calls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "at",
                    "direction",
                    "duration_s",
                    "summary"
                  ],
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "direction": {
                      "type": "string"
                    },
                    "duration_s": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  }
                }
              },
              "media": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "media_id",
                    "kind",
                    "stage",
                    "provided_by",
                    "channel",
                    "summary",
                    "measurements"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "stage": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "media_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "provided_by": {
                      "type": "string"
                    },
                    "measurements": {
                      "type": [
                        "array",
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "note_id",
                    "at",
                    "source",
                    "channel",
                    "pinned",
                    "body"
                  ],
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "body": {
                      "type": "string"
                    },
                    "pinned": {
                      "type": "boolean"
                    },
                    "source": {
                      "type": "string"
                    },
                    "channel": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "note_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "visit": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "emails": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "at",
                    "channel",
                    "kind",
                    "subject",
                    "body"
                  ],
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "body": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "subject": {
                      "type": "string"
                    }
                  }
                }
              },
              "quotes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "quote_id",
                    "status",
                    "historical",
                    "total_minor"
                  ],
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "historical": {
                      "type": "boolean"
                    },
                    "total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    }
                  }
                }
              },
              "invoices": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "invoice_id",
                    "status",
                    "total_minor"
                  ],
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "invoice_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    }
                  }
                }
              },
              "messages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "at",
                    "direction",
                    "channel",
                    "customer_text",
                    "shop_text"
                  ],
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "direction": {
                      "type": "string"
                    },
                    "shop_text": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "customer_text": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              },
              "equipment": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "equipment_id",
                    "kind",
                    "make",
                    "model",
                    "serial"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "make": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "model": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "serial": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "equipment_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "daily_logs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "log_id",
                    "log_date",
                    "body"
                  ],
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "log_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "log_date": {
                      "type": "string"
                    }
                  }
                }
              },
              "open_tasks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "task_id",
                    "title",
                    "due_at"
                  ],
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "task_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "other_jobs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "summary",
                    "status"
                  ],
                  "properties": {
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "recordings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "recording_id",
                    "visit_id",
                    "described_as",
                    "clip_ref",
                    "transcript",
                    "worker_notes"
                  ],
                  "properties": {
                    "clip_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "visit_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "transcript": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "described_as": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "recording_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "worker_notes": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  }
                }
              },
              "media_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "notes_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "similar_quotes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "quote_id",
                    "job_id",
                    "status",
                    "created_at",
                    "job_summary",
                    "customer_name",
                    "total_minor",
                    "matched",
                    "lines"
                  ],
                  "properties": {
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "description",
                          "quantity",
                          "unit_price_minor"
                        ],
                        "properties": {
                          "quantity": {
                            "type": "number"
                          },
                          "description": {
                            "type": "string"
                          },
                          "unit_price_minor": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Amount in minor units of the currency (cents), or null."
                          }
                        }
                      }
                    },
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "matched": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "quote_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "job_summary": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "total_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    },
                    "customer_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_addRecording",
          "description": "Add a walkthrough recording the worker sent you, during or after the visit. Listen to it yourself first: if it is clearly a different job or not a walkthrough, tell the worker and ask before you add it. Send what the worker said it is (described_as), your transcript, and recorded_at (when the clip was made, from the file) if you have it. Core keeps no audio: keep the clip on your side and send your clip_ref. The transcript and measurements become a voice memo note on the visit. worker_notes are private truck notes (things not said in front of the customer). They are stored on the recording only, not in that note, and are never fed into the recap. Do not put worker_notes in a recap, quote, scope of work, or anything the customer sees. Getting any consent the law requires to record is up to the worker and the shop.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id",
              "transcript"
            ],
            "properties": {
              "clip_ref": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1,
                "description": "Your own reference to the clip (file name or id). Core never stores audio."
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "transcript": {
                "type": "string",
                "maxLength": 100000,
                "minLength": 1
              },
              "recorded_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the clip was recorded, from the file. Default now."
              },
              "described_as": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1,
                "description": "What the worker said the clip is, in their words."
              },
              "measurements": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "label",
                    "value"
                  ],
                  "properties": {
                    "unit": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 200,
                      "minLength": 1
                    },
                    "value": {
                      "type": "number"
                    }
                  }
                },
                "maxItems": 100
              },
              "worker_notes": {
                "type": "string",
                "maxLength": 20000,
                "minLength": 1,
                "description": "Private truck notes: things not said in front of the customer. Stored on the recording, not in the transcript note. Never put these in a recap, quote, scope of work, or anything the customer sees."
              },
              "duration_seconds": {
                "type": "integer",
                "maximum": 14400,
                "minimum": 1
              },
              "transcribed_with": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "recording",
                  "next_actions"
                ],
                "properties": {
                  "recording": {
                    "type": "object",
                    "required": [
                      "recording_id",
                      "visit_id",
                      "job_id",
                      "status",
                      "recorded_at",
                      "added_at",
                      "described_as",
                      "clip_ref",
                      "note_id",
                      "measurements",
                      "worker_notes"
                    ],
                    "properties": {
                      "job_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "status": {
                        "type": "string"
                      },
                      "note_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      },
                      "added_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "clip_ref": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "visit_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "recorded_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "described_as": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "measurements": {
                        "type": "array"
                      },
                      "recording_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "worker_notes": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Private truck notes: things not said in front of the customer. Stored on the recording, not in the transcript note. Never put these in a recap, quote, scope of work, or anything the customer sees."
                      }
                    }
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_recordings",
          "description": "Recordings on a visit, newest first: when each was recorded, what the worker said it was, the note its transcript became, and private worker_notes. worker_notes are truck notes for the shop only. Never put them in a recap, quote, scope of work, or anything the customer sees.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "visit_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "recordings"
            ],
            "properties": {
              "recordings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "recording_id",
                    "visit_id",
                    "job_id",
                    "status",
                    "recorded_at",
                    "added_at",
                    "described_as",
                    "clip_ref",
                    "note_id",
                    "measurements",
                    "worker_notes"
                  ],
                  "properties": {
                    "job_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "status": {
                      "type": "string"
                    },
                    "note_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "added_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "clip_ref": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "visit_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "recorded_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "described_as": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "measurements": {
                      "type": "array"
                    },
                    "recording_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "worker_notes": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Private truck notes: things not said in front of the customer. Stored on the recording, not in the transcript note. Never put these in a recap, quote, scope of work, or anything the customer sees."
                    }
                  }
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_draftRecap",
          "description": "Draft the recap email for the customer after a visit. For a detailed recap, pass body (the full email) or what_happened, options_discussed and next_steps. Leave those out to use the short template: what_we_saw in the worker's own words (or measurements from a saved recording) and the next step. Private worker_notes from a recording are never included, and a draft that contains them is refused. Nothing is sent: show the worker the draft, edit it with visits.editRecap, and send only when they approve with visits.approveRecap. Drafting again replaces the open draft.",
          "inputSchema": {
            "type": "object",
            "required": [
              "visit_id"
            ],
            "properties": {
              "body": {
                "type": "string",
                "maxLength": 5000,
                "minLength": 1,
                "description": "The full recap email. When set, this is the email and the short template is not used."
              },
              "subject": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Email subject. Leave out for the usual subject."
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "next_step": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              "next_steps": {
                "type": "string",
                "maxLength": 2000,
                "minLength": 1,
                "description": "What happens next, in sentences. Used when body is left out. next_step is the one line fallback for the short template."
              },
              "what_we_saw": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 500,
                  "minLength": 1
                },
                "maxItems": 20
              },
              "what_happened": {
                "type": "string",
                "maxLength": 3500,
                "minLength": 1,
                "description": "What you and the customer went over, in sentences. Used when body is left out."
              },
              "options_discussed": {
                "type": "string",
                "maxLength": 3500,
                "minLength": 1,
                "description": "Options you talked through with the customer. Used when body is left out."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "recap",
                  "next_actions"
                ],
                "properties": {
                  "recap": {
                    "type": "object",
                    "required": [
                      "recap_id",
                      "visit_id",
                      "job_id",
                      "status",
                      "subject",
                      "body",
                      "to_email",
                      "drafted_at",
                      "approved_at",
                      "email_id"
                    ],
                    "properties": {
                      "body": {
                        "type": "string"
                      },
                      "job_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "status": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "email_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      },
                      "recap_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "to_email": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "visit_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "drafted_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "approved_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      }
                    }
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "visits_editRecap",
          "description": "Change the subject or words of a recap draft before the worker approves it. A draft that includes private worker notes from the visit is refused.",
          "inputSchema": {
            "type": "object",
            "required": [
              "recap_id"
            ],
            "properties": {
              "body": {
                "type": "string",
                "maxLength": 5000,
                "minLength": 1
              },
              "reason": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1,
                "description": "Why the worker changed it, in their words. Kept in the shop's corrections log for the next recap."
              },
              "subject": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              "recap_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "recap"
                ],
                "properties": {
                  "recap": {
                    "type": "object",
                    "required": [
                      "recap_id",
                      "visit_id",
                      "job_id",
                      "status",
                      "subject",
                      "body",
                      "to_email",
                      "drafted_at",
                      "approved_at",
                      "email_id"
                    ],
                    "properties": {
                      "body": {
                        "type": "string"
                      },
                      "job_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "status": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "email_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      },
                      "recap_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "to_email": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "visit_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "drafted_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "approved_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "visits_approveRecap",
          "description": "Send the recap: it goes to the customer by email from the shop, with replies to the shop owner. Who may send is shops.sendPermissions: the owner always may, office for any job, a lead for jobs on their crew, and a field worker for jobs assigned to them, until the owner turns that off. Call only after that person says send it. Never call on your own. A recap that includes private worker notes is refused and is not sent.",
          "inputSchema": {
            "type": "object",
            "required": [
              "recap_id"
            ],
            "properties": {
              "recap_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "recap",
                  "next_actions"
                ],
                "properties": {
                  "recap": {
                    "type": "object",
                    "required": [
                      "recap_id",
                      "visit_id",
                      "job_id",
                      "status",
                      "subject",
                      "body",
                      "to_email",
                      "drafted_at",
                      "approved_at",
                      "email_id"
                    ],
                    "properties": {
                      "body": {
                        "type": "string"
                      },
                      "job_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "status": {
                        "type": "string"
                      },
                      "subject": {
                        "type": "string"
                      },
                      "email_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      },
                      "recap_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "to_email": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "visit_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "drafted_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "approved_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      }
                    }
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "corrections_record",
          "description": "Save a correction when the worker edits, rejects, or says you got something wrong in a draft you made (a quote line, a recap, a task, a reply). Keep the before, the after and the worker's reason in their words. You read these before your next draft for the shop.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id",
              "kind",
              "action"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "recap",
                  "quote_line",
                  "quote",
                  "task",
                  "reply",
                  "other"
                ],
                "type": "string"
              },
              "after": {
                "type": "string",
                "maxLength": 5000,
                "description": "The words as they were, or as the worker left them."
              },
              "action": {
                "enum": [
                  "edited",
                  "rejected",
                  "wrong"
                ],
                "type": "string"
              },
              "before": {
                "type": "string",
                "maxLength": 5000,
                "description": "The words as they were, or as the worker left them."
              },
              "reason": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              },
              "subject_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "correction_id",
                  "next_actions"
                ],
                "properties": {
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "correction_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "corrections_recent",
          "description": "The shop's recent corrections to drafts you made, newest first: what was changed or rejected and why. Read these before you draft a quote, a recap or a reply for this shop, and follow them. A field worker sees the full rows of their own; recap and quote drafts already carry the whole shop's lessons, with no names.",
          "inputSchema": {
            "type": "object",
            "required": [
              "shop_id"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "recap",
                  "quote_line",
                  "quote",
                  "task",
                  "reply",
                  "other"
                ],
                "type": "string"
              },
              "limit": {
                "type": "integer",
                "maximum": 50,
                "minimum": 1
              },
              "shop_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "data",
              "lessons"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "correction_id",
                    "kind",
                    "action",
                    "subject_id",
                    "before",
                    "after",
                    "reason",
                    "created_at"
                  ],
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "after": {
                      "type": [
                        "object",
                        "string",
                        "null"
                      ]
                    },
                    "action": {
                      "type": "string"
                    },
                    "before": {
                      "type": [
                        "object",
                        "string",
                        "null"
                      ]
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "subject_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "correction_id": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              },
              "lessons": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "quotes_draftFromVisit",
          "description": "Draft quote lines from a visit, in the worker's words and what you saw and heard. You set the price: read comparables and pricing_rules on the result (or call quotes.comparables), apply the shop's rules, and pass unit_price_minor or total_minor plus basis, a short note of how you got the price. That note is stored and read to the owner. Leave the price out and Doing Work fills a default from the closest signed quote, then the price book, then a past quote. The note says it is a default suggestion, not a scaled estimate. Comparables list every matching line (signed, sent, draft, declined, including imported history) with size, unit rate, total, customer, discounts and notes. Every line stays a draft until the worker approves, changes or rejects it (quotes.decideDraftLine). Optional scope_of_work (notes is the same field) is the written scope of work. It stays on the draft and quotes.finishDraft copies it onto the quote so the customer page and PDF show it. Do not put private worker notes in it. Nothing is sent. Read the returned lessons first and follow them.",
          "inputSchema": {
            "type": "object",
            "required": [
              "lines"
            ],
            "properties": {
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description"
                  ],
                  "properties": {
                    "unit": {
                      "type": "string",
                      "maxLength": 40,
                      "description": "Measurement you took: sq ft, lf, each, hour, or a count such as window. Stored in the description you write. Comparables still parse size from the description."
                    },
                    "basis": {
                      "type": "string",
                      "maxLength": 300,
                      "description": "Why this price, in a sentence the owner will hear. Required in spirit whenever you set a price."
                    },
                    "quantity": {
                      "type": "number",
                      "description": "How many. With unit, this is the measurement (600 with sq ft is 600 sq ft). Default 1."
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 500,
                      "minLength": 1
                    },
                    "total_minor": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Your price for the whole line, in cents. Used when unit_price_minor is left out: unit price is total divided by quantity, rounded to the cent."
                    },
                    "unit_price_minor": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Your price per quantity, in cents. Leave out, with total_minor, for a default suggestion."
                    }
                  }
                },
                "maxItems": 60,
                "minItems": 1
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 8000,
                "minLength": 1,
                "description": "Written scope of work for the customer quote page and PDF. notes is the same field. Null clears it. Do not include private worker notes."
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "visit_id": {
                "type": "string",
                "format": "uuid"
              },
              "scope_of_work": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 8000,
                "minLength": 1,
                "description": "Written scope of work for the customer quote page and PDF. notes is the same field. Null clears it. Do not include private worker notes."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "draft_id",
                  "job_id",
                  "visit_id",
                  "status",
                  "quote_id",
                  "scope_of_work",
                  "pricing_rules",
                  "instruction",
                  "lines",
                  "open_lines",
                  "lessons",
                  "next_actions"
                ],
                "properties": {
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "position",
                        "description",
                        "quantity",
                        "unit_price_minor",
                        "source",
                        "source_note",
                        "state",
                        "comparables",
                        "comparables_cursor",
                        "price_book"
                      ],
                      "properties": {
                        "state": {
                          "type": "string"
                        },
                        "source": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "position": {
                          "type": "integer"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "price_book": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "item_id",
                              "name",
                              "unit",
                              "unit_price_minor"
                            ],
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "unit": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "item_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "unit_price_minor": {
                                "type": "integer",
                                "description": "Amount in minor units of the currency (cents)."
                              }
                            }
                          }
                        },
                        "comparables": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "quote_id",
                              "status",
                              "historical",
                              "quoted_at",
                              "customer_id",
                              "customer_name",
                              "repeat_customer",
                              "description",
                              "quantity",
                              "unit_price_minor",
                              "line_total_minor",
                              "size_quantity",
                              "size_unit",
                              "unit_rate_minor",
                              "notes",
                              "discounts",
                              "match_reason"
                            ],
                            "properties": {
                              "notes": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "quantity": {
                                "type": "number"
                              },
                              "quote_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "discounts": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "description",
                                    "quantity",
                                    "unit_price_minor",
                                    "line_total_minor"
                                  ],
                                  "properties": {
                                    "quantity": {
                                      "type": "number"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "line_total_minor": {
                                      "type": "integer",
                                      "description": "Amount in minor units of the currency (cents)."
                                    },
                                    "unit_price_minor": {
                                      "type": "integer",
                                      "description": "Amount in minor units of the currency (cents)."
                                    }
                                  }
                                }
                              },
                              "quoted_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "size_unit": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "historical": {
                                "type": "boolean"
                              },
                              "customer_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "description": {
                                "type": "string"
                              },
                              "match_reason": {
                                "type": "string"
                              },
                              "customer_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "size_quantity": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "repeat_customer": {
                                "type": "boolean"
                              },
                              "unit_rate_minor": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Amount in minor units of the currency (cents), or null."
                              },
                              "line_total_minor": {
                                "type": "integer",
                                "description": "Amount in minor units of the currency (cents)."
                              },
                              "unit_price_minor": {
                                "type": "integer",
                                "description": "Amount in minor units of the currency (cents)."
                              }
                            }
                          }
                        },
                        "description": {
                          "type": "string"
                        },
                        "source_note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "comparables_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "lessons": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "draft_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "quote_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "open_lines": {
                    "type": "integer"
                  },
                  "instruction": {
                    "type": "string"
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "pricing_rules": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scope_of_work": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Written scope of work the customer will see on the quote page and PDF. Null until one is set. Private worker notes do not belong here."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "quotes_draft",
          "description": "Read one AI line draft from quotes.draftFromVisit, not a customer quote. Each line's state (draft, approved or rejected), where the price came from, the basis in source_note, comparables, the shop's pricing rules, the written scope_of_work, the shop's lessons, and the next line to read to the worker. For a customer quote, use quotes.get.",
          "inputSchema": {
            "type": "object",
            "required": [
              "draft_id"
            ],
            "properties": {
              "draft_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "draft_id",
              "job_id",
              "visit_id",
              "status",
              "quote_id",
              "scope_of_work",
              "pricing_rules",
              "instruction",
              "lines",
              "open_lines",
              "lessons",
              "next_actions"
            ],
            "properties": {
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "line_id",
                    "position",
                    "description",
                    "quantity",
                    "unit_price_minor",
                    "source",
                    "source_note",
                    "state",
                    "comparables",
                    "comparables_cursor",
                    "price_book"
                  ],
                  "properties": {
                    "state": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "line_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "position": {
                      "type": "integer"
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "price_book": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "item_id",
                          "name",
                          "unit",
                          "unit_price_minor"
                        ],
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "unit": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "item_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "unit_price_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          }
                        }
                      }
                    },
                    "comparables": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "quote_id",
                          "status",
                          "historical",
                          "quoted_at",
                          "customer_id",
                          "customer_name",
                          "repeat_customer",
                          "description",
                          "quantity",
                          "unit_price_minor",
                          "line_total_minor",
                          "size_quantity",
                          "size_unit",
                          "unit_rate_minor",
                          "notes",
                          "discounts",
                          "match_reason"
                        ],
                        "properties": {
                          "notes": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string"
                          },
                          "quantity": {
                            "type": "number"
                          },
                          "quote_id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "discounts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "description",
                                "quantity",
                                "unit_price_minor",
                                "line_total_minor"
                              ],
                              "properties": {
                                "quantity": {
                                  "type": "number"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "line_total_minor": {
                                  "type": "integer",
                                  "description": "Amount in minor units of the currency (cents)."
                                },
                                "unit_price_minor": {
                                  "type": "integer",
                                  "description": "Amount in minor units of the currency (cents)."
                                }
                              }
                            }
                          },
                          "quoted_at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "size_unit": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "historical": {
                            "type": "boolean"
                          },
                          "customer_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "uuid"
                          },
                          "description": {
                            "type": "string"
                          },
                          "match_reason": {
                            "type": "string"
                          },
                          "customer_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "size_quantity": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "repeat_customer": {
                            "type": "boolean"
                          },
                          "unit_rate_minor": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Amount in minor units of the currency (cents), or null."
                          },
                          "line_total_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          },
                          "unit_price_minor": {
                            "type": "integer",
                            "description": "Amount in minor units of the currency (cents)."
                          }
                        }
                      }
                    },
                    "description": {
                      "type": "string"
                    },
                    "source_note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "unit_price_minor": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Amount in minor units of the currency (cents), or null."
                    },
                    "comparables_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              "job_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string"
              },
              "lessons": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "draft_id": {
                "type": "string",
                "format": "uuid"
              },
              "quote_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "visit_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "open_lines": {
                "type": "integer"
              },
              "instruction": {
                "type": "string"
              },
              "next_actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "say",
                    "op",
                    "when"
                  ],
                  "properties": {
                    "op": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "say": {
                      "type": "string"
                    },
                    "when": {
                      "enum": [
                        "now",
                        "later",
                        "check",
                        "tell_human"
                      ],
                      "type": "string"
                    },
                    "due_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "args_hint": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 3,
                "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
              },
              "pricing_rules": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scope_of_work": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Written scope of work the customer will see on the quote page and PDF. Null until one is set. Private worker notes do not belong here."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "quotes_decideDraftLine",
          "description": "Record the worker's call on one drafted line: approve it (with any change they made to the words, quantity, price or basis) or reject it. basis is the short note of how the price was chosen, stored on the line and read to the owner. Call only with the worker's own answer, one line at a time. Changes and rejections are kept with the reason so the next draft gets it right.",
          "inputSchema": {
            "type": "object",
            "required": [
              "draft_line_id",
              "decision"
            ],
            "properties": {
              "basis": {
                "type": "string",
                "maxLength": 300,
                "description": "Why this price, in a sentence the owner will hear."
              },
              "reason": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1,
                "description": "Why, in the worker's words."
              },
              "decision": {
                "enum": [
                  "approve",
                  "reject"
                ],
                "type": "string"
              },
              "quantity": {
                "type": "number"
              },
              "description": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              "draft_line_id": {
                "type": "string",
                "format": "uuid"
              },
              "unit_price_minor": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "draft_id",
                  "job_id",
                  "visit_id",
                  "status",
                  "quote_id",
                  "scope_of_work",
                  "pricing_rules",
                  "instruction",
                  "lines",
                  "open_lines",
                  "lessons",
                  "next_actions"
                ],
                "properties": {
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "line_id",
                        "position",
                        "description",
                        "quantity",
                        "unit_price_minor",
                        "source",
                        "source_note",
                        "state",
                        "comparables",
                        "comparables_cursor",
                        "price_book"
                      ],
                      "properties": {
                        "state": {
                          "type": "string"
                        },
                        "source": {
                          "type": "string"
                        },
                        "line_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "position": {
                          "type": "integer"
                        },
                        "quantity": {
                          "type": "number"
                        },
                        "price_book": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "item_id",
                              "name",
                              "unit",
                              "unit_price_minor"
                            ],
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "unit": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "item_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "unit_price_minor": {
                                "type": "integer",
                                "description": "Amount in minor units of the currency (cents)."
                              }
                            }
                          }
                        },
                        "comparables": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "quote_id",
                              "status",
                              "historical",
                              "quoted_at",
                              "customer_id",
                              "customer_name",
                              "repeat_customer",
                              "description",
                              "quantity",
                              "unit_price_minor",
                              "line_total_minor",
                              "size_quantity",
                              "size_unit",
                              "unit_rate_minor",
                              "notes",
                              "discounts",
                              "match_reason"
                            ],
                            "properties": {
                              "notes": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "quantity": {
                                "type": "number"
                              },
                              "quote_id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "discounts": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "description",
                                    "quantity",
                                    "unit_price_minor",
                                    "line_total_minor"
                                  ],
                                  "properties": {
                                    "quantity": {
                                      "type": "number"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "line_total_minor": {
                                      "type": "integer",
                                      "description": "Amount in minor units of the currency (cents)."
                                    },
                                    "unit_price_minor": {
                                      "type": "integer",
                                      "description": "Amount in minor units of the currency (cents)."
                                    }
                                  }
                                }
                              },
                              "quoted_at": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "size_unit": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "historical": {
                                "type": "boolean"
                              },
                              "customer_id": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid"
                              },
                              "description": {
                                "type": "string"
                              },
                              "match_reason": {
                                "type": "string"
                              },
                              "customer_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "size_quantity": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "repeat_customer": {
                                "type": "boolean"
                              },
                              "unit_rate_minor": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Amount in minor units of the currency (cents), or null."
                              },
                              "line_total_minor": {
                                "type": "integer",
                                "description": "Amount in minor units of the currency (cents)."
                              },
                              "unit_price_minor": {
                                "type": "integer",
                                "description": "Amount in minor units of the currency (cents)."
                              }
                            }
                          }
                        },
                        "description": {
                          "type": "string"
                        },
                        "source_note": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "unit_price_minor": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Amount in minor units of the currency (cents), or null."
                        },
                        "comparables_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  },
                  "job_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "status": {
                    "type": "string"
                  },
                  "lessons": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "draft_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "quote_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "visit_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "open_lines": {
                    "type": "integer"
                  },
                  "instruction": {
                    "type": "string"
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "pricing_rules": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scope_of_work": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Written scope of work the customer will see on the quote page and PDF. Null until one is set. Private worker notes do not belong here."
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "quotes_finishDraft",
          "description": "Make the quote from a draft once the worker decided every line. Only approved lines go on it, entered as the worker's. scope_of_work or notes on the draft is copied onto the quote as the written scope. Pass either here to set or replace it. The customer quote page and PDF show it. Do not include private worker notes. The quote is a draft: send it with quotes.send only when the worker says so.",
          "inputSchema": {
            "type": "object",
            "required": [
              "draft_id"
            ],
            "properties": {
              "notes": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 8000,
                "minLength": 1,
                "description": "Written scope of work for the customer quote page and PDF. notes is the same field. Null clears it. Do not include private worker notes."
              },
              "draft_id": {
                "type": "string",
                "format": "uuid"
              },
              "tax_rate_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "Tax rate (taxes.listRates). Leave out for the shop default; null for no tax."
              },
              "scope_of_work": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 8000,
                "minLength": 1,
                "description": "Written scope of work for the customer quote page and PDF. notes is the same field. Null clears it. Do not include private worker notes."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "quote_id",
                  "quote_version_id",
                  "total_minor",
                  "draft",
                  "next_actions"
                ],
                "properties": {
                  "draft": {
                    "type": "object",
                    "required": [
                      "draft_id",
                      "job_id",
                      "visit_id",
                      "status",
                      "quote_id",
                      "scope_of_work",
                      "pricing_rules",
                      "instruction",
                      "lines",
                      "open_lines",
                      "lessons",
                      "next_actions"
                    ],
                    "properties": {
                      "lines": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "line_id",
                            "position",
                            "description",
                            "quantity",
                            "unit_price_minor",
                            "source",
                            "source_note",
                            "state",
                            "comparables",
                            "comparables_cursor",
                            "price_book"
                          ],
                          "properties": {
                            "state": {
                              "type": "string"
                            },
                            "source": {
                              "type": "string"
                            },
                            "line_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "position": {
                              "type": "integer"
                            },
                            "quantity": {
                              "type": "number"
                            },
                            "price_book": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "item_id",
                                  "name",
                                  "unit",
                                  "unit_price_minor"
                                ],
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "unit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "item_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "unit_price_minor": {
                                    "type": "integer",
                                    "description": "Amount in minor units of the currency (cents)."
                                  }
                                }
                              }
                            },
                            "comparables": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "required": [
                                  "quote_id",
                                  "status",
                                  "historical",
                                  "quoted_at",
                                  "customer_id",
                                  "customer_name",
                                  "repeat_customer",
                                  "description",
                                  "quantity",
                                  "unit_price_minor",
                                  "line_total_minor",
                                  "size_quantity",
                                  "size_unit",
                                  "unit_rate_minor",
                                  "notes",
                                  "discounts",
                                  "match_reason"
                                ],
                                "properties": {
                                  "notes": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "status": {
                                    "type": "string"
                                  },
                                  "quantity": {
                                    "type": "number"
                                  },
                                  "quote_id": {
                                    "type": "string",
                                    "format": "uuid"
                                  },
                                  "discounts": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "required": [
                                        "description",
                                        "quantity",
                                        "unit_price_minor",
                                        "line_total_minor"
                                      ],
                                      "properties": {
                                        "quantity": {
                                          "type": "number"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "line_total_minor": {
                                          "type": "integer",
                                          "description": "Amount in minor units of the currency (cents)."
                                        },
                                        "unit_price_minor": {
                                          "type": "integer",
                                          "description": "Amount in minor units of the currency (cents)."
                                        }
                                      }
                                    }
                                  },
                                  "quoted_at": {
                                    "type": "string",
                                    "format": "date-time"
                                  },
                                  "size_unit": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "historical": {
                                    "type": "boolean"
                                  },
                                  "customer_id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "uuid"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "match_reason": {
                                    "type": "string"
                                  },
                                  "customer_name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "size_quantity": {
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "repeat_customer": {
                                    "type": "boolean"
                                  },
                                  "unit_rate_minor": {
                                    "type": [
                                      "integer",
                                      "null"
                                    ],
                                    "description": "Amount in minor units of the currency (cents), or null."
                                  },
                                  "line_total_minor": {
                                    "type": "integer",
                                    "description": "Amount in minor units of the currency (cents)."
                                  },
                                  "unit_price_minor": {
                                    "type": "integer",
                                    "description": "Amount in minor units of the currency (cents)."
                                  }
                                }
                              }
                            },
                            "description": {
                              "type": "string"
                            },
                            "source_note": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "unit_price_minor": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Amount in minor units of the currency (cents), or null."
                            },
                            "comparables_cursor": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        }
                      },
                      "job_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "status": {
                        "type": "string"
                      },
                      "lessons": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "draft_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "quote_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      },
                      "visit_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uuid"
                      },
                      "open_lines": {
                        "type": "integer"
                      },
                      "instruction": {
                        "type": "string"
                      },
                      "next_actions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "say",
                            "op",
                            "when"
                          ],
                          "properties": {
                            "op": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "say": {
                              "type": "string"
                            },
                            "when": {
                              "enum": [
                                "now",
                                "later",
                                "check",
                                "tell_human"
                              ],
                              "type": "string"
                            },
                            "due_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time"
                            },
                            "args_hint": {
                              "type": "string"
                            }
                          }
                        },
                        "maxItems": 3,
                        "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                      },
                      "pricing_rules": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "scope_of_work": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Written scope of work the customer will see on the quote page and PDF. Null until one is set. Private worker notes do not belong here."
                      }
                    }
                  },
                  "quote_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "total_minor": {
                    "type": "integer",
                    "description": "Amount in minor units of the currency (cents)."
                  },
                  "next_actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "say",
                        "op",
                        "when"
                      ],
                      "properties": {
                        "op": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "say": {
                          "type": "string"
                        },
                        "when": {
                          "enum": [
                            "now",
                            "later",
                            "check",
                            "tell_human"
                          ],
                          "type": "string"
                        },
                        "due_at": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "args_hint": {
                          "type": "string"
                        }
                      }
                    },
                    "maxItems": 3,
                    "description": "Up to 3 useful next steps, best first, in plain words. op names the op to call, when there is one. when is now, later, check, or tell_human. due_at is set for later and check when there is a natural time. A send is tell_human: show the owner the draft, then send only when they say so."
                  },
                  "quote_version_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "approval_required",
                  "approval_id",
                  "status",
                  "expires_at",
                  "message"
                ],
                "properties": {
                  "status": {
                    "enum": [
                      "pending"
                    ],
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "approval_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "approval_required": {
                    "enum": [
                      true
                    ],
                    "type": "boolean"
                  }
                }
              }
            ]
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "destructiveHint": true
          }
        }
      ],
      "tools_omitted": 140,
      "resources": [],
      "prompts": []
    },
    "instructions": "Start with me_start. It lists your shops, what this connection can and can't do, and the first tasks with the tool name for each. Doing Work keeps a field service shop's jobs, customers, quotes, invoices, photos and notes. Before you upload a photo or video, look at it and send what it shows in media.requestUpload summary: plain words, findings, text you can read such as model and serial plates, measurements, and for video a transcript, key moments and the length. If you cannot see it, send summary.unable_to_analyze with a reason. Doing Work doesn't run its own AI. Your agent does the work. Doing Work transcribes nothing, so your summary is all the shop will know about a file until someone opens it. New leads get one first reply by the shop's lead rules. A lead from Angi, Angie's List, HomeAdvisor or Modernize gets one transactional first text when the shop's own 10DLC approved number is connected, and later texts need the customer to reply first; otherwise it gets an email. Leads from Thumbtack, Networx, Google and Yelp get email. When the worker tells you something about a job, customer, property, equipment, quote, invoice or anything else, save it with notes.add on that record. Read notes.list on a record before you work on it, and use notes.search and search.global before asking the worker something the team may have written down. Mention a team member in a note only when you need them; they get an email. Customers never see notes and are never notified. On a visit, read visits.brief first and walk the worker through visits.steps in conversation. Add a walkthrough recording with visits.addRecording after you listen to it; Doing Work does not check recording consent, the shop is responsible for it under the Terms. Read corrections.recent before you draft a quote, recap or reply, and save every edit or rejection the worker makes with corrections.record. You price quote lines: call quotes.comparables (or read them on quotes.draftFromVisit), apply the shop's pricing rules, do the math, and pass unit_price_minor and basis. A blank price is only a default suggestion. The owner approves every line. Nothing is sent until they say so. Customer-facing sends (visits.approveRecap, quotes.send, invoices.send) happen only after a person whose role may send them tells you to. You cannot send a quote or invoice whose lines you drafted; that person sends it from their own sign-in. The owner sets each role with shops.setSendPermissions. media.needsSummary lists older photos and videos with no summary. When you have a moment, look at them and fill them in with media.setSummary. Creating a shop and changing shop data need the owner to have accepted the current Terms and Privacy. One acceptance covers every shop they create or join. Until then those calls are refused and the error names the missing document and /p/legal. Reads such as me.get still work. A token issued earlier is not revoked."
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}