Skip to main content
Glama

tokendiet_skeletonize_code

Skeletonize Python files by keeping imports, signatures, docstrings, and focus symbols while eliding long unfocused helper bodies to reduce token usage before inference.

Instructions

AST-skeletonize Python files by keeping imports, signatures, docstrings, and focus symbols while eliding long unfocused helper bodies.

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": {
      "source": "<source>"
    },
    "name": "tokendiet_skeletonize_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYes
focus_symbolsNo
min_elide_linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the core transformation (what is kept vs elided), which is valuable, but says nothing about the return shape, behavior on non-Python or syntactically invalid input, or whether the elision is lossy in ways that affect downstream use.

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 front-loaded sentence with zero filler; the verb and the preservation/elision rules come first and every clause earns its place.

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

Completeness3/5

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

For a three-parameter tool with no annotations and no output schema, the description covers the transformation but leaves the return value, error behavior, and parameter details unaddressed. Adequate to select the tool, not fully adequate to invoke it confidently.

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 0%, so the description must compensate. It explains 'focus symbols' and implies a length threshold for eliding helper bodies, covering two of three parameters loosely, but never clarifies the format of focus_symbols or the meaning/units of min_elide_lines (default 5).

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?

States a specific verb (AST-skeletonize) and resource (Python files), then enumerates exactly what is preserved and what is elided. This is clearly distinct from the sibling tools, which operate on sessions, tool output, and FinOps routing rather than source code.

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 only implied: an agent can infer this is for shrinking Python source while retaining structure, but there is no explicit when-to-use, when-not-to-use, or comparison to alternatives. No prerequisites or exclusions are stated.

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