Summarize text
summarizeCondense 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
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute 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. | |
| text | No | The text to summarize: paragraphs to a long document. English. | |
| model | No | distilbart-cnn (default): faster. bart-large-cnn: the full model, slower and a little more accurate. |