Sampling helpers expose curated subsets or transformations of prior responses / schemas to aid model prompting, summarization, and test generation.
| Tool | Purpose |
| —- | ——- |
| _sample_response_body | Capture and persist last response body for an operation id. |
| _sample_summarize_json | Summarize captured JSON (delegates to summarize_json when available). |
| _sample_list | Enumerate stored samples & metadata. |
(Names may be prefixed per collision / naming mode.)
getUser (streaming or not)._sample_response_body with { operationId: "getUser" }._sample_summarize_json to produce a compact summary resource.sample_response_getUser or sample_summary_getUser by name for inclusion elsewhere.Each sample materializes as a resource with a stable name (sample_response_<op>). Hash-based change notifications allow clients to refresh selectively.
If summarization model/tool unavailable, summary helper returns truncated JSON (size-limited) ensuring deterministic output.
Sampling tools can operate even when original response was chunk-streamed; body assembly is performed during streaming with digest validation before storing.
_sample_embed_json)Next: Resources & Prompts or Streaming Responses.