Every Footstep MCP tool returns a result in the same envelope. This page describes the wire shape so your client can read responses without per-tool conditionals.Documentation Index
Fetch the complete documentation index at: https://docs.footstep.ai/llms.txt
Use this file to discover all available pages before exploring further.
Result envelope
Tool results are delivered via the MCPstructuredContent field. The value is a parsed JSON object — your client reads it directly, no JSON.parse step required.
structuredContent (e.g. @modelcontextprotocol/sdk ≥ 1.0).
Errors
Hard failures (the tool ran but couldn’t compute a result) are returned with MCP’sisError: true flag and a structured error object in structuredContent:
geocode with a query that matches no places) are not errors. They return a normal success response with empty arrays:
error.code for branching UX — “ask the user to clarify” vs “retry with backoff” vs “suggest an alternative travel mode” — without parsing free-text messages.
Error codes
| Code | Meaning | Recommended client action |
|---|---|---|
invalid_input | Schema validation failed | Fix the request, retry |
out_of_bounds | Coordinate outside service area | Surface region limit to user |
unroutable_point | Origin or destination not on routable network | Suggest nearest road or alternative point |
no_route_found | Endpoints valid but no path computable | Suggest alternative travel mode or different endpoints |
geocode_ambiguous | Multiple high-confidence matches | Ask user to clarify; details.candidates carries options |
prediction_no_signal | get_prediction ran but produced a degenerate result | Surface “insufficient data” to user |
prediction_unsupported | get_prediction lacks required inputs | Fix request, retry |
upstream_timeout | Underlying service didn’t respond in time | Retry with backoff (idempotent calls only) |
upstream_error | Generic upstream failure | Retry with backoff |
rate_limited | Quota exceeded | Back off; details.retry_after_seconds indicates wait |
error.details field is optional and carries code-specific structured information (candidate matches for geocode_ambiguous, retry timing for rate_limited, the offending field for invalid_input, etc.).
What’s in structuredContent
The keys you’ll see depend on the tool. Most renderer-aware tools share three groups:
- Summary fields —
distance_meters,duration_seconds,narrative,terrain,bounds-equivalent insiderender[].bbox, etc. Always present unless the response is an error. - Raw geometry —
legs[].shape(polylines),contours[].geometry(polygons),top_results(hex rows), etc. Controlled by response defaults. renderenvelope — framework-agnostic layer descriptors ready to drop into a map library. Controlled byinclude_render(defaulttrue). Detailed in the render envelopes reference.