Title85/100
Compute Connection to Existing (drainage) BoQ
Shorten the title to an action and subject; move usage details into the description.
Description95/100
Paid tier only. Calling this without an authenticated CivilQuants account returns TIER_INSUFFICIENT — sign up at https://civilquants.com/pricing or use the free-tier alternative compute_manhole. Enumerated extra-over connection of a new drainage carrier pipe into an existing asset: existing manhole / inspection chamber, existing sewer or drain (via saddle / wye / cut-in junction), or existing outfall / watercourse / surface system. Routes via CESMM4 I.7.1/2/3 (Class I §I.7 Pipework Ancillaries — Connections), NRM2 33.6.1/2/3, MMHW 500.5.1/2/3 (SHW Cl. 506 Connections to existing sewers, drains and service runs), SMM7 R12.4.1/2/3, with a bore-size digit suffix appended in all four. The connection_type attribute is the discriminator that routes to the right sub-code; the bore digit refines within. Six variant presets cover all three connection types × two characteristic bores. Unit: Nr. Opens the new `drainage_ancillaries` L2 leaf (reserved for ditch, hard-material extra-over, CCTV testing, etc. in future sessions). Sibling assembly: carrier_pipe_run — the S32 pair that delivers a complete tender drainage line. Example params: diameter_mm=225 mm (100–2400). Example call: {"params": {"diameter_mm": 225}, "standard": "MMHW"}. Omitted parameters use sensible engineering defaults. Pass deliverables=["xlsx","dxf","pdf"] (any subset) to also receive one-shot download URLs in the same call: Excel BoQ (both tiers, watermarked free) plus the dimensioned DXF (CAD) and PDF drawing sheets (paid tier).
The description explains the capability, when to use it, and what to expect.
Inputs25/100
2 of 7 inputs have descriptions. Add descriptions to the missing inputs, including where to obtain IDs and how to supply values.
params › connection_type
The type of existing asset the new pipe run connects to. The discriminator that routes through to the four standards' sub-codes: existing_manhole → CESMM4 I.7.1 / NRM2 33.6.1 / MMHW 500.5.1 / SMM7 R12.4.1 existing_pipeline → CESMM4 I.7.2 / NRM2 33.6.2 / MMHW 500.5.2 / SMM7 R12.4.2 existing_outfall → CESMM4 I.7.3 / NRM2 33.6.3 / MMHW 500.5.3 / SMM7 R12.4.3
Remove validation rules already expressed in this field’s schema; describe its meaning and usage instead.
params › method
How the physical connection is made — informs the description but does not change the BoQ code (the code is governed by the connection_type discriminator + bore digit).
Clear enough to supply this argument.
params › diameter_mm
Not provided
Missing description. Explain what this value means and how to supply it.
params › existing_asset_id
Not provided
Missing description. Explain what this value means and how to supply it.
standard
Not provided
Missing description. Explain what this value means and how to supply it.
deliverables
Not provided
Missing description. Explain what this value means and how to supply it.
output_mode
Not provided
Missing description. Explain what this value means and how to supply it.
Annotations25/100
Declare destructiveHint, idempotentHint, openWorldHint based on the tool’s actual behavior.
{
"readOnlyHint": true
}Output schema85/100
The output schema explains the structured result.
View output schema
{
"type": "object",
"required": [
"result"
],
"properties": {
"result": {
"anyOf": [
{
"type": "object",
"required": [
"_meta"
],
"properties": {
"data": {
"anyOf": [
{
"type": "object",
"required": [
"assembly_slug",
"standard",
"parameters_used",
"boq_rows",
"totals_summary",
"text_summary"
],
"properties": {
"drawing": {
"anyOf": [
{
"type": "object",
"required": [
"svg_b64",
"viewbox_x",
"viewbox_y",
"viewbox_width",
"viewbox_height",
"entity_count"
],
"properties": {
"svg_b64": {
"type": "string",
"minLength": 1
},
"viewbox_x": {
"type": "number"
},
"viewbox_y": {
"type": "number"
},
"entity_count": {
"type": "integer",
"minimum": 0
},
"viewbox_width": {
"type": "number",
"exclusiveMinimum": 0
},
"viewbox_height": {
"type": "number",
"exclusiveMinimum": 0
},
"unit_of_drawing": {
"type": "string",
"const": "m",
"default": "m"
}
},
"description": "Schema § 1.6a — inline server-rendered SVG preview of the geometry.\n\nThe MCP mirror of the web ``/compute`` response's ``drawing`` field\n(``api.schemas.compute.DrawingRef``): the same on-screen dimensioned\ndrawing both tiers see in the workspace, surfaced on the MCP compute\nresponse so a chat client can render it inline (60th-fire item C). This\nis the on-screen preview — present on BOTH tiers per the free/paid\nboundary; the downloadable CAD artefacts (DXF / dimensioned PDF) remain\nthe paid differentiator via the export tools.\n\nDefined here rather than importing ``DrawingRef`` because the web\n``schemas`` package imports back into this module (``schemas.render``),\nso reusing it would create an import cycle — the MCP wire contract keeps\nits own copy, the same pattern as ``BoQRow`` / ``DrawingReference``.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"boq_rows": {
"type": "array",
"items": {
"type": "object",
"required": [
"work_section",
"description",
"quantity",
"unit",
"attribution"
],
"properties": {
"rate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null
},
"unit": {
"type": "string",
"minLength": 1
},
"amount": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null
},
"audit_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"quantity": {
"type": "number",
"minimum": 0
},
"attribution": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string",
"minLength": 1
},
"work_section": {
"type": "string",
"minLength": 1
}
},
"description": "Schema § 1.3 — a single bill row in the requested standard's format.\n\n`description` is the non-verbatim functional description per spec § 13.9 /\n§ 15 invariant — NEVER reproduces a standard's verbatim clause text.\n`rate` / `amount` ship null because rates are commodity data the customer\nowns; the engine's job is the measurement, not the pricing.",
"additionalProperties": false
}
},
"drawings": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"drawing_type",
"format",
"url",
"sheet_size",
"scale"
],
"properties": {
"url": {
"type": "string",
"minLength": 1
},
"scale": {
"type": "string",
"minLength": 1
},
"format": {
"enum": [
"DXF",
"PDF",
"SVG"
],
"type": "string"
},
"layers": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"default": null
},
"sheet_size": {
"enum": [
"A1",
"A2",
"A3",
"A4"
],
"type": "string"
},
"drawing_type": {
"enum": [
"section",
"plan",
"elevation",
"isometric",
"detail"
],
"type": "string"
}
},
"description": "Schema § 1.6 — paid-tier drawing artefact pointer.\n\n`url` is an R2-signed URL; expiry is carried in `_meta.deliverables.expires_at`\non the envelope (not duplicated here). `layers` is DXF-only; PDF/SVG\ncallers omit it.",
"additionalProperties": false
}
},
{
"type": "null"
}
],
"default": null
},
"standard": {
"enum": [
"CESMM4",
"NRM2",
"SMM7",
"MMHW"
],
"type": "string"
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"severity",
"message"
],
"properties": {
"code": {
"type": "string",
"minLength": 1
},
"detail": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"message": {
"type": "string",
"minLength": 1
},
"severity": {
"enum": [
"info",
"advisory",
"caution"
],
"type": "string"
},
"affected_params": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Schema § 1.8 — a non-fatal geometry advisory (56th-fire T2).\n\nThe wire projection of the engine's `core.GeometryWarning`. Advisory only:\na warning NEVER changes a measured quantity — it flags geometry that is\nvalid but likely a mistake (e.g. a stale dependent-height default). Present\non BOTH tiers — a correctness/safety signal, not a paid feature.",
"additionalProperties": false
}
},
"audit_trail": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"boq_row_index",
"derivation"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"formula": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"derivation": {
"type": "string",
"minLength": 1
},
"boq_row_index": {
"type": "integer",
"minimum": 0
},
"parameters_referenced": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Schema § 1.7 — paid-tier audit-trail entry.\n\nOne entry per BoQ row; `boq_row_index` ties to the row position in\n`ComputeResult.boq_rows`. `derivation` is the human-readable formula\nwalk-through; `formula` is the optional formal expression.",
"additionalProperties": false
}
},
{
"type": "null"
}
],
"default": null
},
"text_summary": {
"type": "string",
"maxLength": 2000,
"minLength": 1
},
"assembly_slug": {
"type": "string",
"minLength": 1
},
"totals_summary": {
"type": "object",
"properties": {
"entries": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"quantity",
"unit"
],
"properties": {
"unit": {
"type": "string",
"minLength": 1
},
"quantity": {
"type": "number",
"minimum": 0
}
},
"description": "Schema § 1.4 — single material/work-class total entry.",
"additionalProperties": false
}
}
},
"description": "Schema § 1.4 — totals_summary as a typed wrapper around the free-form dict.\n\nWire shape is a flat object (`{\"concrete_m3\": {...}, \"rebar_t\": {...}}`).\nWe model it as `RootModel`-equivalent via `model_config(extra=\"allow\")`\n+ a single `__root__`-style `entries` dict. Pydantic v2 recommends\n`RootModel` for free-form roots; using a wrapper class keeps the import\nsurface uniform with the rest of this module.",
"additionalProperties": false
},
"parameters_used": {
"type": "object",
"properties": {
"assumptions": {
"type": "array",
"items": {
"type": "string"
}
},
"user_supplied": {
"type": "object",
"additionalProperties": true
},
"engine_defaults": {
"type": "object",
"additionalProperties": true
}
},
"description": "Schema § 1.2 — the parameter snapshot the engine actually used.\n\nSplits user-supplied values from engine defaults so customers can see\nwhich numbers came from them and which the engine filled in. Every\ndefaulted parameter SHOULD have a corresponding entry in `assumptions`\n— the bridge layer enforces this when wrapping engine output.",
"additionalProperties": false
}
},
"description": "Schema § 1.1 — the typed payload returned inside `MCPResponse[ComputeResult]`.\n\nFree-tier responses omit `drawings` (the downloadable CAD artefact\npointers — the paid differentiator); the bridge enforces this. The\n`audit_trail` and the inline `drawing` preview are present on BOTH tiers\n(V1 ALIGN / 60th-fire D + C). `text_summary` is bounded to 2000 chars —\nkeeps the LLM-facing summary token-cheap and forces longer narrative into\nBoQ row descriptions where it belongs. `warnings` is the non-fatal\ngeometry advisory list (both tiers).",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"_meta": {
"type": "object",
"required": [
"request_id",
"issued_at",
"tier"
],
"properties": {
"hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"tier": {
"enum": [
"free",
"paid"
],
"type": "string"
},
"tos_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"issued_at": {
"type": "string",
"minLength": 1
},
"request_id": {
"type": "string",
"minLength": 1
},
"document_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"output_mode": {
"anyOf": [
{
"type": "object",
"required": [
"mode",
"omitted_fields",
"retrieve_with"
],
"properties": {
"mode": {
"enum": [
"summary",
"material_schedule",
"boq",
"boq_with_backup"
],
"type": "string"
},
"retrieve_with": {
"type": "string",
"minLength": 1
},
"omitted_fields": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"description": "Surfaces what a trimmed ``output_mode`` withheld from ``data``.\n\nA trimmed mode (``summary`` / ``material_schedule`` / ``boq`` /\n``boq_with_backup``) withholds\nalready-computed fields to keep the chat payload small. The withheld value\nreads to a client agent as \"capability missing\" (the box-culvert \"geometry\nbuilder isn't firing\" scare) rather than \"pared for size\": ``drawing`` and\n``audit_trail`` appear as ``null``, ``boq_rows`` as an empty list ``[]``\n(its type forbids ``null``) — both indistinguishable from a genuine absent\nresult. This names the withheld fields and the exact mode that brings each\nback, so the value is unambiguous. Absent on the default ``full_json`` mode\n— nothing is withheld, nothing to point at.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"deliverables": {
"anyOf": [
{
"type": "object",
"required": [
"expires_at"
],
"properties": {
"dxf_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"pdf_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"docx_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"xlsx_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"expires_at": {
"type": "string",
"minLength": 1
}
},
"description": "Canonical schema § 0.3 — R2 signed URLs (24h TTL).",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"tier_upgrade": {
"anyOf": [
{
"type": "object",
"required": [
"available_tiers"
],
"properties": {
"pass_credit": {
"anyOf": [
{
"type": "object",
"required": [
"amount_local",
"currency",
"redeemable_until"
],
"properties": {
"currency": {
"type": "string"
},
"applies_to": {
"type": "string",
"const": "solo_first_month",
"default": "solo_first_month"
},
"amount_local": {
"type": "number"
},
"redeemable_until": {
"type": "string"
}
},
"description": "Canonical schema § 0.7 — pass-credit upgrade hook.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"pricing_url": {
"type": "string",
"default": "https://civilquants.com/pricing"
},
"current_tier": {
"type": "string",
"const": "free",
"default": "free"
},
"available_tiers": {
"type": "array",
"items": {
"type": "object",
"required": [
"tier_slug",
"display_name",
"price_local",
"currency",
"billing",
"unlock_summary"
],
"properties": {
"billing": {
"enum": [
"one_off",
"monthly",
"annual"
],
"type": "string"
},
"currency": {
"enum": [
"GBP",
"SGD",
"EUR",
"USD",
"CAD",
"AUD",
"NZD",
"MYR"
],
"type": "string"
},
"tier_slug": {
"enum": [
"7_day_pass",
"solo",
"studio",
"practice"
],
"type": "string"
},
"price_local": {
"type": "number"
},
"display_name": {
"type": "string"
},
"unlock_summary": {
"type": "string",
"minLength": 1
}
},
"description": "Canonical schema § 0.7 — single tier in the upgrade carousel.",
"additionalProperties": false
}
}
},
"description": "Canonical schema § 0.7 — present on free-tier responses only.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"upgrade_hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"schema_version": {
"type": "string",
"const": "1.0.0",
"default": "1.0.0"
},
"scope_boundary": {
"anyOf": [
{
"type": "object",
"required": [
"produced",
"not_in_scope"
],
"properties": {
"produced": {
"type": "array",
"items": {
"type": "string"
}
},
"not_in_scope": {
"type": "array",
"items": {
"type": "string"
}
},
"recommended_companions": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"default": null
}
},
"description": "Canonical schema § 0.6 — surfaces what this assembly produces vs not.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"warranty_disclaimer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"rate_limit_remaining": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
],
"default": null
}
},
"description": "Canonical schema § 0.2 — present on every MCPResponse.\n\nRequired fields: `schema_version`, `request_id`, `issued_at`, `tier`.\nThe free-tier-only fields (`upgrade_hint`, `tos_url`, `warranty_disclaimer`,\n`tier_upgrade`, `rate_limit_remaining`) are populated by the middleware\nwhen `tier == \"free\"`; absent on paid-tier responses.",
"additionalProperties": false
},
"error": {
"anyOf": [
{
"type": "object",
"required": [
"code",
"message",
"recoverable"
],
"properties": {
"code": {
"enum": [
"RATE_LIMIT_EXCEEDED",
"TIER_INSUFFICIENT",
"INVALID_INPUT",
"SCHEMA_VERSION_MISMATCH",
"SCHEMA_INVARIANT_VIOLATION",
"UPSTREAM_TIMEOUT",
"BACKEND_FAILURE",
"IP_BLOCKED",
"RESOURCE_NOT_FOUND",
"RENDER_FAILURE",
"OCR_LOW_CONFIDENCE",
"MANUAL_REVIEW_REQUIRED",
"ACCEPTANCE_REQUIRED",
"INVALID_TOKEN"
],
"type": "string",
"description": "Canonical schema § 0.5 catalogue.\n\nEach member maps to a documented `recoverable` flag (see\n`IS_RECOVERABLE`) — clients use the flag to decide retry vs surface."
},
"details": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
},
"message": {
"type": "string",
"minLength": 1
},
"recoverable": {
"type": "boolean"
},
"retry_after_seconds": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
],
"default": null
}
},
"description": "Canonical schema § 0.4 — error payload returned in `MCPResponse.error`.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"_meta"
],
"properties": {
"data": {
"title": "Data",
"default": null
},
"_meta": {
"type": "object",
"required": [
"request_id",
"issued_at",
"tier"
],
"properties": {
"hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"tier": {
"enum": [
"free",
"paid"
],
"type": "string"
},
"tos_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"issued_at": {
"type": "string",
"minLength": 1
},
"request_id": {
"type": "string",
"minLength": 1
},
"document_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"output_mode": {
"anyOf": [
{
"type": "object",
"required": [
"mode",
"omitted_fields",
"retrieve_with"
],
"properties": {
"mode": {
"enum": [
"summary",
"material_schedule",
"boq",
"boq_with_backup"
],
"type": "string"
},
"retrieve_with": {
"type": "string",
"minLength": 1
},
"omitted_fields": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"description": "Surfaces what a trimmed ``output_mode`` withheld from ``data``.\n\nA trimmed mode (``summary`` / ``material_schedule`` / ``boq`` /\n``boq_with_backup``) withholds\nalready-computed fields to keep the chat payload small. The withheld value\nreads to a client agent as \"capability missing\" (the box-culvert \"geometry\nbuilder isn't firing\" scare) rather than \"pared for size\": ``drawing`` and\n``audit_trail`` appear as ``null``, ``boq_rows`` as an empty list ``[]``\n(its type forbids ``null``) — both indistinguishable from a genuine absent\nresult. This names the withheld fields and the exact mode that brings each\nback, so the value is unambiguous. Absent on the default ``full_json`` mode\n— nothing is withheld, nothing to point at.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"deliverables": {
"anyOf": [
{
"type": "object",
"required": [
"expires_at"
],
"properties": {
"dxf_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"pdf_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"docx_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"xlsx_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"expires_at": {
"type": "string",
"minLength": 1
}
},
"description": "Canonical schema § 0.3 — R2 signed URLs (24h TTL).",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"tier_upgrade": {
"anyOf": [
{
"type": "object",
"required": [
"available_tiers"
],
"properties": {
"pass_credit": {
"anyOf": [
{
"type": "object",
"required": [
"amount_local",
"currency",
"redeemable_until"
],
"properties": {
"currency": {
"type": "string"
},
"applies_to": {
"type": "string",
"const": "solo_first_month",
"default": "solo_first_month"
},
"amount_local": {
"type": "number"
},
"redeemable_until": {
"type": "string"
}
},
"description": "Canonical schema § 0.7 — pass-credit upgrade hook.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"pricing_url": {
"type": "string",
"default": "https://civilquants.com/pricing"
},
"current_tier": {
"type": "string",
"const": "free",
"default": "free"
},
"available_tiers": {
"type": "array",
"items": {
"type": "object",
"required": [
"tier_slug",
"display_name",
"price_local",
"currency",
"billing",
"unlock_summary"
],
"properties": {
"billing": {
"enum": [
"one_off",
"monthly",
"annual"
],
"type": "string"
},
"currency": {
"enum": [
"GBP",
"SGD",
"EUR",
"USD",
"CAD",
"AUD",
"NZD",
"MYR"
],
"type": "string"
},
"tier_slug": {
"enum": [
"7_day_pass",
"solo",
"studio",
"practice"
],
"type": "string"
},
"price_local": {
"type": "number"
},
"display_name": {
"type": "string"
},
"unlock_summary": {
"type": "string",
"minLength": 1
}
},
"description": "Canonical schema § 0.7 — single tier in the upgrade carousel.",
"additionalProperties": false
}
}
},
"description": "Canonical schema § 0.7 — present on free-tier responses only.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"upgrade_hint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"schema_version": {
"type": "string",
"const": "1.0.0",
"default": "1.0.0"
},
"scope_boundary": {
"anyOf": [
{
"type": "object",
"required": [
"produced",
"not_in_scope"
],
"properties": {
"produced": {
"type": "array",
"items": {
"type": "string"
}
},
"not_in_scope": {
"type": "array",
"items": {
"type": "string"
}
},
"recommended_companions": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"default": null
}
},
"description": "Canonical schema § 0.6 — surfaces what this assembly produces vs not.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
},
"warranty_disclaimer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"rate_limit_remaining": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
],
"default": null
}
},
"description": "Canonical schema § 0.2 — present on every MCPResponse.\n\nRequired fields: `schema_version`, `request_id`, `issued_at`, `tier`.\nThe free-tier-only fields (`upgrade_hint`, `tos_url`, `warranty_disclaimer`,\n`tier_upgrade`, `rate_limit_remaining`) are populated by the middleware\nwhen `tier == \"free\"`; absent on paid-tier responses.",
"additionalProperties": false
},
"error": {
"anyOf": [
{
"type": "object",
"required": [
"code",
"message",
"recoverable"
],
"properties": {
"code": {
"enum": [
"RATE_LIMIT_EXCEEDED",
"TIER_INSUFFICIENT",
"INVALID_INPUT",
"SCHEMA_VERSION_MISMATCH",
"SCHEMA_INVARIANT_VIOLATION",
"UPSTREAM_TIMEOUT",
"BACKEND_FAILURE",
"IP_BLOCKED",
"RESOURCE_NOT_FOUND",
"RENDER_FAILURE",
"OCR_LOW_CONFIDENCE",
"MANUAL_REVIEW_REQUIRED",
"ACCEPTANCE_REQUIRED",
"INVALID_TOKEN"
],
"type": "string",
"description": "Canonical schema § 0.5 catalogue.\n\nEach member maps to a documented `recoverable` flag (see\n`IS_RECOVERABLE`) — clients use the flag to decide retry vs surface."
},
"details": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
},
"message": {
"type": "string",
"minLength": 1
},
"recoverable": {
"type": "boolean"
},
"retry_after_seconds": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "null"
}
],
"default": null
}
},
"description": "Canonical schema § 0.4 — error payload returned in `MCPResponse.error`.",
"additionalProperties": false
},
{
"type": "null"
}
],
"default": null
}
},
"additionalProperties": false
}
]
}
},
"x-fastmcp-wrap-result": true
}