Skip to main content
Glama
jgauffin

ts-language-mcp

by jgauffin

get_diagnostics

Retrieve TypeScript errors and ESLint warnings for a file. Sort results by severity and limit to the top 50 by default.

Instructions

Get TypeScript + ESLint errors and warnings for a file. ESLint results are included when ESLint is installed in the target project. Results are sorted by severity and capped at the top 50 most severe by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the file (relative to project root)
limitNoMaximum diagnostics to return, sorted by severity (default: 50, max: 500)
includeEslintNoInclude ESLint diagnostics if ESLint is installed in the target project (default: true)
includeSuggestionsNoInclude TypeScript suggestion diagnostics such as unused locals and unused imports (default: false).
Behavior3/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It reveals sorting and default capping behavior, and conditionally includes ESLint. However, it does not describe the output format, behavior on missing files, or how a capped result is indicated. This leaves moderate gaps for an agent.

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?

Two sentences with no filler. Front-loaded with the core action, followed by conditional behavior. Every word serves a purpose. Ideal conciseness.

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 complexity (4 params, no output schema, no annotations), the description covers the main behavior and constraints well. It is missing the return format and explicit differentiation from siblings, but it is largely sufficient for an agent to select and invoke the tool correctly.

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?

Schema coverage is 100%, baseline 3. The description adds value by explaining the default cap (relates to 'limit'), and the conditional inclusion of ESLint (relates to 'includeEslint'). It does not elaborate on 'file' or 'includeSuggestions', but the added context for two parameters justifies a score above baseline.

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 it returns TypeScript and ESLint errors and warnings for a file. The verb 'Get' and specific resource 'errors and warnings for a file' make the purpose unambiguous. It distinguishes from siblings like 'get_all_diagnostics' by specifying single-file scope.

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?

The description provides clear context: ESLint results are conditional on ESLint being installed, results are sorted by severity, and capped at 50 by default. However, it does not explicitly guide the agent on when to use this tool versus alternatives like 'get_all_diagnostics' or 'get_symbols', nor does it mention when not to use it.

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/jgauffin/ts-language-mcp'

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