Skip to main content
Glama

Condense a document

condense_document

Shorten a .docx document while preserving its meaning, structure, and citations, either as a whole to a target word count or selected passages to individual budgets; save the result beside the source.

Instructions

Shorten a .docx, keeping meaning, structure and citations: the whole document to max_words, or only chosen passages (segments), each to its own budget. Saves the result next to the source and returns its path. COSTS CREDITS at 20 per 1,000 words processed (10 minimum) - say so and get agreement first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document_path": "<document_path>"
    },
    "name": "condense_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNorewrite (default) condenses sentences in place; delete removes whole low-value sentences and keeps every other word verbatim
segmentsNoShorten only these passages, each to its own budget, instead of max_words. A paragraph is the smallest unit: each passage is widened to its whole paragraph.
max_wordsNoTarget word count for the whole document (or use segments)
output_pathNoWhere to write the result; defaults to beside the source
instructionsNoExtra requirements for this job
wait_secondsNoHow long to wait before returning a job id (default 55)
document_pathYesAbsolute path to the .docx

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.7.0
    • changedInput schema / properties / max_words / description
      Previous value: -"Target word count for the whole document"New value: +"Target word count for the whole document (or use segments)"
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "rewrite (default) condenses sentences in place; delete removes whole low-value sentences and keeps every other word verbatim",
      +  "enum": [
      +    "rewrite",
      +    "delete"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / segments
      Added value: +{
      +  "description": "Shorten only these passages, each to its own budget, instead of max_words. A paragraph is the smallest unit: each passage is widened to its whole paragraph.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "max_words": {
      +        "description": "Word budget for this passage",
      +        "exclusiveMinimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "A passage to shorten, copied exactly from the document",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "text",
      +      "max_words"
      +    ],
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "document_path",
      -  "max_words"
      -]New value: +[
      +  "document_path"
      +]
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnly=false and destructive=false; the description adds the cost model, the minimum charge, that output is written beside the source, and that a path is returned — none of which the annotations convey. It stops short of explaining the async/job-id path implied by wait_seconds or overwrite behavior for output_path.

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 sentences, front-loaded with the core action, then output behavior, then the credit warning. Every sentence carries information an agent needs; nothing is padding or restatement of the title.

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?

For a 7-parameter mutation tool with no output schema, it covers the essentials: what is produced, where it goes, that it is returned, and that it costs money requiring consent. The remaining gaps (delete mode, job-id return behavior) are covered by the schema itself.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description usefully summarizes the whole-document vs segments split, but it omits the 'delete' rewrite mode entirely and adds no format or budget details beyond what the schema already documents.

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?

The first clause names a precise verb and resource ('Shorten a .docx') and immediately bounds the effect with 'keeping meaning, structure and citations', which distinguishes it from siblings like humanize_document or translate_document. An agent can tell what it produces without opening the 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?

It gives a concrete pre-call rule: credits cost 20 per 1,000 words with a 10 minimum, and the agent must disclose this and obtain agreement before running. What it lacks is any routing guidance against the other document tools (e.g. when to condense vs humanize), so it is clear context without explicit alternatives.

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