Skip to main content
Glama

get_diagnostics

Analyze TypeScript files to retrieve diagnostics, including errors and warnings, by specifying a root directory and file path or using virtual content for evaluation.

Instructions

Get TypeScript diagnostics (errors, warnings) for a single file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesFile path to check for diagnostics (relative to root)
rootYesRoot directory for resolving relative paths
virtualContentNoVirtual content to use for diagnostics instead of file content
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves—such as whether it requires TypeScript configuration, how it handles missing files, what the output format looks like, or if there are rate limits. For a tool with 3 parameters and no annotation coverage, this leaves significant behavioral gaps.

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, efficient sentence that front-loads the core purpose without unnecessary words. Every element ('Get TypeScript diagnostics', 'errors, warnings', 'for a single file') earns its place by clarifying scope and function, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (3 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the return values, error handling, or behavioral nuances like how diagnostics are generated or what happens with invalid inputs. For a diagnostic tool with rich parameter schema but missing output details, more context is needed to be fully helpful.

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 all parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain how 'virtualContent' interacts with 'filePath' or provide examples). Baseline 3 is appropriate when the schema handles parameter documentation effectively.

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 specific action ('Get TypeScript diagnostics') and resource ('for a single file'), distinguishing it from sibling tools like 'get_definitions' or 'get_symbols_in_scope' which focus on different aspects of TypeScript analysis. It specifies the scope (errors, warnings) and single-file limitation, making the purpose immediately understandable.

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 provides no guidance on when to use this tool versus alternatives like 'get_type_at_symbol' or 'find_references', nor does it mention prerequisites or exclusions. It implies usage for TypeScript file analysis but lacks context about when this specific diagnostic tool is appropriate compared to other analysis tools in the sibling set.

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

Related 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/mizchi/typescript-mcp'

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