Skip to main content
Glama

prune

Read-onlyIdempotent

Strip comments and empty lines from text to reduce token count before sending to an LLM. Returns the pruned text and character metrics. Requires a valid API key (Bearer token); billing is per input character — insufficient balance returns HTTP 402. For format conversion use convert, for generating llms.txt use generate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYesText to prune (1 char min, 10 MiB max).
comment_prefixNoOptional. Explicit comment-line prefix to strip outside code fences (e.g. '//' for C-style code). Omit for format-aware pruning: markdown '#' headings are preserved (v101 #12 note), no line stripping on plain text. Max 64 bytes, no control chars.
remove_empty_linesNoIf true, empty lines outside code fences are removed.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, and the description builds on this by adding auth requirements (Bearer token), billing model (per input character), a specific failure mode (HTTP 402), and return contents (pruned text and character metrics). This is useful operational context beyond the structured annotations.

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?

The description is three sentences with no waste: the core action and return value come first, followed by auth/billing and sibling routing. Each sentence earns its place and the content is front-loaded.

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?

There is no output schema, so the description's explicit mention of return contents (pruned text and character metrics) is essential and present. Auth, billing, error conditions, and parameter behavior are all covered between the description and a fully documented input schema. Nothing critical is missing for a 3-parameter read-only transformer.

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 coverage is 100%: payload, comment_prefix, and remove_empty_lines all have detailed descriptions with constraints and defaults. The tool description adds an overall purpose but no per-parameter detail, so the schema carries the semantic load. A baseline of 3 is appropriate.

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 description states a specific verb-resource pair: 'Strip comments and empty lines from text' and ties it to a concrete goal, reducing token count before LLM use. It also differentiates from adjacent siblings by explicitly routing format conversion to `convert` and llms.txt generation to `generate`.

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?

The description gives clear alternatives for two related siblings ('For format conversion use `convert`, for generating llms.txt use `generate`') and implies the tool's purpose for pruning. It does not explicitly discuss every sibling or enumerate when-not-to-use cases, but the main relevant alternatives are covered.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool performs a distinct operation: conversion, diffing, patching, pruning, llms.txt generation, validation, and cost estimation. The descriptions explicitly cross-reference related tools (diff/patch, generate/validate), which further prevents misselection.

Naming Consistency5/5

All seven tools use lowercase single-word imperative verbs (convert, diff, estimate, generate, patch, prune, validate), forming a consistent and predictable naming convention.

Tool Count5/5

Seven tools is within the ideal range and every tool has a clear purpose. The set is compact rather than sprawling, with no redundant or filler tools.

Completeness4/5

The paired workflows are complete: diff/patch, generate/validate, and convert/prune cover their stated operations without dead ends. The main gap is that the estimate workflow points to an external pricing endpoint for supported models rather than exposing model/pricing lookup as a first-class tool, which is a minor obstacle.

Resources