Skip to main content
Glama
AndyLiner13

ts-mcp-server

by AndyLiner13

Navigation Tree

navtree
Read-only

Retrieve the complete hierarchical structure of a TypeScript file, including all classes, functions, variables, interfaces, type aliases, and enums with their nesting, kinds, names, spans, and child items.

Instructions

Get the complete hierarchical structure of a file — all classes, functions, variables, interfaces, type aliases, enums, and their nesting. Returns kind, name, spans, and child items for every declaration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFile path (absolute or relative to cwd)
Behavior3/5

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

Annotations already declare readOnlyHint=true, indicating safe read operation. The description adds that it returns kind, name, spans, and child items, providing some behavioral context beyond safety. No mention of auth needs or rate limits, but the tool is simple.

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 a single sentence that is concise and front-loaded with the core action. Every word adds value with no redundancy.

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?

Given the tool has one parameter, no output schema, and readOnlyHint annotation, the description is fairly complete. It covers what it retrieves and the type of output. Minor gap: no explicit mention of nesting hierarchy shape.

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% with one parameter fully described. The description reiterates 'File path' but adds no additional meaning beyond the schema. Baseline score of 3 is appropriate as schema already carries the burden.

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 clearly states the tool retrieves the complete hierarchical structure of a file, listing specific elements like classes, functions, variables, etc. It distinguishes itself from sibling tools which are mostly about completions, diagnostics, and refactoring, not file structure.

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?

The description does not provide explicit guidance on when to use this tool versus alternatives. While it is clear that this tool is for structural navigation, it lacks statements about contexts where other tools would be more appropriate.

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/AndyLiner13/ts-mcp-server'

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