Skip to main content
Glama

Summarize text

summarize
Read-only

Condense long text or a file locally with a BART news model to get a few-sentence summary without sending the whole document into the conversation. Handles long inputs in ordered parts.

Instructions

Condense a long text or a text file into a few sentences, locally, with a BART model trained on news summaries, so the whole document need not go into the conversation. Give text or path, not both. The model reads about 1,000 tokens (some 700 words) at a time, so a longer text is split at paragraph and sentence boundaries and each part summarised in order; up to 16 parts, and the result says when it split or stopped. Returns the summary, or a numbered summary per part. The summary reuses the text's own sentences and can drop details: to find a specific passage use search_folder instead. The model downloads on first use (1.2 GB for distilbart-cnn) and takes seconds per part on a desktop CPU.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "summarize"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute path of a file to summarize instead of text: a PDF with a text layer, or a UTF-8 text file such as txt, md or source code. Word documents are not read.
textNoThe text to summarize: paragraphs to a long document. English.
modelNodistilbart-cnn (default): faster. bart-large-cnn: the full model, slower and a little more accurate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.5

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: local execution is confirmed, the first-use model download (1.2 GB) and per-part runtime are disclosed, and the ~1,000-token window with paragraph/sentence-boundary splitting, a 16-part cap, and explicit reporting when it split or stopped are all spelled out. The quality caveat that the summary reuses the source's own sentences and can drop details is exactly the kind of behavior an agent needs to know before trusting the output.

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

Conciseness4/5

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

Front-loaded with the core purpose, then progressively adds sizing, chunking, fallback, and cost information in a sensible order with no filler. Some sentences are long and pack multiple facts (window size, split boundaries, 16-part cap, split reporting), which marginally hurts scannability.

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

Completeness5/5

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

No output schema exists, yet the description explains the return value (a summary, or a numbered summary per part). For a tool with chunking, truncation, and download side effects, everything an agent needs to invoke it and interpret the result is present.

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 the baseline would be 3, but the description adds a real constraint not encoded in the schema: "Give text or path, not both" clarifies mutual exclusivity between two non-required parameters. The model choice is covered in the schema itself, so no further credit is due there.

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 and resource ("condense a long text or a text file into a few sentences") plus the mechanism (local BART model trained on news summaries). It distinguishes itself from the nearest sibling by naming search_folder for finding a specific passage, so an agent can choose between them without reading a schema.

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?

Gives a clear use case (avoid pushing a whole document into the conversation) and one explicit alternative with its condition ("to find a specific passage use search_folder instead"). It lacks a broader when-not statement, e.g. versus transcribe for audio or classify for labelling, so it falls short of full routing guidance.

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