Skip to main content
Glama

get_file_diagnostics

Analyze a single TypeScript file and return type errors or warnings to ensure code quality.

Instructions

Run TypeScript diagnostics on a single file and return any type errors or warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesRelative path to the TypeScript file (no path traversal or absolute paths allowed).
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states that it 'run diagnostics' and 'return' results, implying a read operation, but does not explicitly state read-only, side effects, permissions, or response behavior. The description is minimal and adds little beyond the tool's name.

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 efficiently conveys the purpose without extraneous details. Every word contributes to understanding, making it highly concise and well-structured.

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 absence of annotations and output schema, the description is too minimal. It does not explain the return format, error handling, or how diagnostics are produced (e.g., using tsconfig). This limits the agent's ability to effectively use the tool's output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The parameter 'filePath' has a description in both schema and tool description, with additional constraints like 'no path traversal or absolute paths allowed'. This provides semantic meaning beyond the type string, helping the agent provide correct input.

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 verb 'run diagnostics' and the resource 'single TypeScript file', and the output 'type errors or warnings'. This distinguishes it from sibling tools that focus on components, themes, or accessibility rather than file-level diagnostics.

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?

No explicit guidance on when to use this tool versus alternatives like 'get_project_diagnostics'. The usage is implied from the name and description (single file), but no exclusions or context about when not to use it are provided.

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/bookedsolidtech/helixir'

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