Skip to main content
Glama
gclluch

TypeScript AST MCP Server

by gclluch

diff_ast

Compare two TypeScript or JavaScript files to detect structural changes, reporting added, removed, or modified symbols. Use to understand code differences between file versions.

Instructions

Compares two TypeScript/JavaScript files structurally, reporting added/removed/modified symbols

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_pathYesAbsolute path to the new version of the file
old_pathYesAbsolute path to the old version of the file
Behavior3/5

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

With no annotations available, the description carries the full burden of behavioral disclosure. It mentions that the comparison is 'structural' and reports 'added/removed/modified symbols', which gives some insight into behavior. However, it does not describe whether the tool is read-only, how it handles syntax errors, or the exact output format, leaving some ambiguity.

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 concise sentence that starts with the action verb and immediately conveys the core purpose and output. There is no redundant or filler content, and every word contributes meaning.

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's simplicity (two parameters, no output schema), the description is mostly complete. It clearly states what it does (structural comparison) and what it reports (added/removed/modified symbols). It could be enhanced by explicitly noting that the paths must be files on disk or by specifying the output structure, but these gaps are minor for a tool of this 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?

The input schema provides full coverage of the two parameters, both with clear descriptions ('Absolute path to the old/new version of the file'). The description adds no additional meaning beyond what the schema already states, so the baseline score of 3 is appropriate.

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's purpose with a specific verb ('Compares') and resource ('two TypeScript/JavaScript files structurally'). It distinguishes itself from sibling tools like analyze_file and list_declarations by focusing on differential analysis between two files rather than inspecting a single file.

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?

The description implies a use case: comparing old and new versions of a file to see structural changes. However, it provides no explicit guidance on when to choose this tool over alternatives, nor does it mention exclusions or prerequisites. The contrast with sibling tools is implicit through the phrase 'two files', but it's not explicit.

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/gclluch/ts-ast-mcp'

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