Skip to main content
Glama

ctx_skeleton

Get a compact structural map of a source file's public API before editing—signatures, types, exports, and doc comments are preserved while function bodies are stripped.

Instructions

Return a body-less structural skeleton of one source file as {path, language, skeleton}. The skeleton preserves signatures, types, exports and doc comments but strips function bodies, so it is a compact map of a file's public API and structure. Use before editing a file to understand its shape without reading the whole body. path is project-relative or absolute (must be inside the project; traversal is rejected). Set with_stats=true to also include {stats} (symbol counts). Only paths for supported languages can be resolved (error otherwise); use ctx_search (files=true) to confirm a path first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesProject-relative or absolute file path. Paths outside the project root are rejected. Required.
with_statsNoWhen true, include a {stats} field with symbol counts. Default false.
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden and does it well: it specifies output shape, body-stripping behavior, path traversal rejection, supported-language error handling, and the optional stats flag. Minor gaps remain around missing-file behavior and any permissions required, but the description is notably transparent.

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 compact and well-structured: output shape first, then what the skeleton contains, then usage guidance, then parameter and error behavior. Every sentence adds useful information and there is no fluff or repetition.

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?

There is no output schema, so the description appropriately explains the return shape and skeleton semantics. It also covers errors, path constraints, and the optional stats field. It would be slightly more complete if it described the exact skeleton format or file-not-found behavior, but the given level is sufficient for an agent to use the tool correctly.

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 schema already documents both parameters fully. The description mostly restates the same path constraints and with_stats behavior without adding new semantic detail, so it stays at the baseline for complete schema coverage.

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 action and result: returning a body-less structural skeleton of one source file with a defined output shape {path, language, skeleton}. It clearly explains what the skeleton preserves and strips, distinguishing it from sibling tools like ctx_dependencies or ctx_stats.

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 an explicit use context: 'Use before editing a file to understand its shape' and points to ctx_search as a fallback for path confirmation. However, it does not explicitly state when not to use this tool versus other sibling tools beyond the file-path check.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/halloffame12/CTX'

If you have feedback or need assistance with the MCP directory API, please join our Discord server