Skip to main content
Glama
donliggett

mcp-context-window

doc_summarize

Summarize an entire document or a specified chunk range to grasp the gist before reading details, with optional refresh and token target.

Instructions

Summarize a whole document or a range of its chunks. Use this to get the gist of something too large to read, before deciding which parts to pull verbatim. The whole-document summary is cached, so asking again is free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoLast chunk index (inclusive)
fromNoFirst chunk index (inclusive)
doc_idYesDocument id returned by doc_ingest
refreshNoIgnore the cached whole-document summary
target_tokensNoRough length of the summary (default 500)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses a useful non-obvious behavior: the whole-document summary is cached, making repeat calls cheap. It doesn't explicitly state read-only side effects, but the summarization framing implies a non-destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tightly written sentences, each serving a distinct purpose: what it does, when to use it, and an optimization note. The core action is front-loaded, and there is zero fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate coverage for a summarizer—description covers the action, use case, and a performance trait. It could mention the return format or error behavior, but no output schema exists, and the agent has enough to call it correctly. Slightly more detail on the default target_tokens would have made it a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all parameters are documented. The description adds contextual value by explaining the caching model ('cached, so asking again is free'), which clarifies the refresh parameter's purpose and the cost model. This goes beyond the schema's field-level descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Summarize') and a clear resource ('a whole document or a range of its chunks'), and frames it as a gist-gathering step before verbatim retrieval, which differentiates it from sibling tools like doc_search or doc_outline. The language 'get the gist' clarifies exactly what problem it solves.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a clear use case: 'Use this to get the gist of something too large to read, before deciding which parts to pull verbatim.' This implies when to use it (large documents) and hints at alternatives for verbatim extraction, though it doesn't name them explicitly. Lacks an explicit when-not-to-use, so not a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/donliggett/mcp-context-sliding'

If you have feedback or need assistance with the MCP directory API, please join our Discord server