Skip to content

ollama_summarize_fast

Summarize (fast). Gist of short input (best under ~4k tokens). Use as a decision gate: ‘is this file worth reading in full?’ Summary carries source_preview so you can spot-check fabrication. FRAME CONTRACT (optional): pass frame (the question / section purpose this summary is FOR) and the model first decides whether the input addresses it. Off-topic inputs return summary=‘(off-topic for frame: …)’ with on_topic: false instead of paraphrasing unrelated content. Omitting frame preserves the legacy result shape.

Parameter Type Required Default Description
text string yes Text to summarize (best under ~4k tokens — use summarize_deep for longer inputs).
max_words integer no Target summary length in words (default 80).
frame string no The question / section purpose / topic this summary is FOR. When supplied, the summarizer first decides whether the text addresses the frame; if not, it refuses to paraphrase off-topic content and surfaces on_topic: false in the result.
model string no Optional per-call model override. When provided, overrides the tool’s tier-resolved model for this call. The tier’s timeout (TIER_TIMEOUT_MS) still applies. On timeout, fallback uses the tier-resolved model, NOT the override. Use for receipt-backed orchestration that requires explicit model identity (e.g., research-os reviewer profiles).

The JSON Schema below is generated from the same zod schema the server validates against at the wire — it cannot drift from runtime behavior.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"description": "Text to summarize (best under ~4k tokens — use summarize_deep for longer inputs)."
},
"max_words": {
"description": "Target summary length in words (default 80).",
"type": "integer",
"minimum": 10,
"maximum": 400
},
"frame": {
"description": "The question / section purpose / topic this summary is FOR. When supplied, the summarizer first decides whether the text addresses the frame; if not, it refuses to paraphrase off-topic content and surfaces `on_topic: false` in the result.",
"type": "string"
},
"model": {
"description": "Optional per-call model override. When provided, overrides the tool's tier-resolved model for this call. The tier's timeout (TIER_TIMEOUT_MS) still applies. On timeout, fallback uses the tier-resolved model, NOT the override. Use for receipt-backed orchestration that requires explicit model identity (e.g., research-os reviewer profiles).",
"type": "string",
"minLength": 1
}
},
"required": [
"text"
]
}

Every tool returns the standard envelope — tier_used, model, tokens_in/tokens_out, elapsed_ms, backend provenance, warnings. See Envelope & tiers.

Schema + handler: src/tools/summarizeFast.ts · registration: src/index.ts


Back to the Tool Reference.