Skip to main content
Glama

prune_file

Extract semantic interfaces, types, sanitized raises, and stubs from source files to cut token bloat for coding agents.

Instructions

Extract semantic interfaces, types, sanitized raises, and stubs from a source file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative path to the source file
depthNoPruning depth: 'full', 'interface', or 'nominal'interface
languageNoProgramming language (python, typescript, javascript, go, java)python
strip_docsNoWhether to strip docstrings entirely

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.5.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the full burden falls on the description. It says 'extract' but not whether the file is modified in place, what is returned (if anything), or how 'sanitized raises' are handled. The name 'prune_file' hints at mutation, creating ambiguity that the description fails to resolve.

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?

A single dense sentence with no filler; the action, resource, and output order is natural and front-loaded. No wasted clauses or redundant restatements of the tool name.

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

Completeness2/5

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

Although the schema covers parameters, there is no output schema and no annotations, so the agent depends on the description for the tool's overall contract. The description does not say whether the tool returns a pruned representation, writes files, or how depth affects output, leaving important invocation context missing.

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?

The input schema already describes all four parameters with 100% coverage, so the baseline applies. The description adds no special parameter semantics beyond naming the outputs, which only loosely maps to what depth and strip_docs control.

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

Purpose4/5

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

Description names the action (Extract) and the resource (a source file) and enumerates outputs (semantic interfaces, types, sanitized raises, stubs), so the agent knows what kind of operation it is. It does not explicitly contrast with siblings, but the resource/outputs are specific enough to avoid obvious confusion.

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

Usage Guidelines2/5

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

No statement of when to call prune_file versus resolve_context_bundle or evaluate_spec_axioms, and no preconditions or exclusions are given. The only hint is the purpose sentence, which leaves the decision entirely to inference.

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