Skip to main content
Glama

skeletonize_code

Compress JS/TS, Python, C/C++, Go, Rust, or Java source into a line-indexed signature skeleton preserving imports, types, signatures, and exact ranges; cut tokens or expand matching functions.

Instructions

Deterministically compress JS/TS, Python, C/C++, Go, Rust, or Java source code into a line-indexed signature skeleton (or symbol-focus view that expands only matching functions), cutting 65-88% tokens while preserving imports, types, signatures, and exact Lstart-Lend ranges.

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": {
      "code": "<code>"
    },
    "name": "skeletonize_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesSource file content to skeletonize.
modeNoCompression mode: signatures (tightest), outline (keeps key returns/throws), or symbol-focus (keeps full bodies for focusSymbols).
pathNoFile path or filename used for language detection (e.g. src/server.ts).
languageNoOptional explicit language override (default: auto).
focusSymbolsNoSymbol/function names to preserve verbatim when mode is symbol-focus.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations present, the description carries the full behavioral burden and does substantial work: it discloses determinism, the 65-88% token-reduction range, and exactly what is preserved (imports, types, signatures, exact Lstart-Lend ranges). It does not cover failure behavior for unsupported or unparseable languages, which is the main remaining gap.

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?

A single dense sentence that front-loads the verb and output artifact before the qualification about modes. The long language enumeration and parenthetical slightly bloat it, but every clause carries real information.

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 five-parameter, no-annotation, no-output-schema transformation tool, the description covers the output form, preservation guarantees, and compression expectation. It is nearly complete, lacking only error/limitation behavior, which is a minor omission relative to the tool's complexity.

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%, so all five parameters are already documented in the schema, establishing a baseline of 3. The description only restates the symbol-focus relationship between mode and focusSymbols, which the schema descriptions already convey, so it adds little new meaning.

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?

Names a specific verb (compress) plus the exact resource (JS/TS, Python, C/C++, Go, Rust, Java source) and the precise output artifact (line-indexed signature skeleton or symbol-focus view). The scope is narrow enough to distinguish it from siblings like compress_logs_and_traces and compact_json_and_api without consulting their schemas.

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

Usage Guidelines3/5

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

Usage is implied by the framing (source code compression into a skeleton), and the mode enumeration hints at choosing between tight vs. detailed views. However, there is no explicit when-to-use guidance, no stated alternatives, and no note on when this should be preferred over the other compact/compress siblings.

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