Skip to main content
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.

Result envelope

Tool results are delivered via the MCP structuredContent field. The value is a parsed JSON object — your client reads it directly, no JSON.parse step required.
Use any MCP client that supports structuredContent (e.g. @modelcontextprotocol/sdk ≥ 1.0).

Errors

Hard failures (the tool ran but couldn’t compute a result) are returned with MCP’s isError: true flag and a structured error object in structuredContent:
Soft cases (the tool ran and produced a valid empty answer — for example, geocode with a query that matches no places) are not errors. They return a normal success response with empty arrays:
This separation lets clients pattern-match on 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

The 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 fieldsdistance_meters, duration_seconds, narrative, terrain, bounds-equivalent inside render[].bbox, etc. Always present unless the response is an error.
  • Raw geometrylegs[].shape (polylines), contours[].geometry (polygons), top_results (hex rows), etc. Controlled by response defaults.
  • render envelope — framework-agnostic layer descriptors ready to drop into a map library. Controlled by include_render (default true). Detailed in the render envelopes reference.
See per-tool reference pages for the exact keys each tool returns.