Skip to main content
Glama
jgauffin

ts-language-mcp

by jgauffin

organize_imports

Sort and remove unused imports in a TypeScript file. Preview changes by default, or apply them by setting apply to true.

Instructions

Sort a file's imports and drop unused ones, using TypeScript's own organizer. Previews the edits by default; pass apply to write them to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the file (relative to project root)
applyNoWrite the changes to disk (default: false, which previews the edits).
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool uses TypeScript's organizer, previews edits by default, and writes to disk only when 'apply' is true. This is adequate, though it omits details like error handling or prerequisites.

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 two sentences with no wasted words. The first sentence states the core purpose, and the second adds usage guidance. Information is front-loaded, making it easy for an agent 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?

The tool has no output schema, so the description should explain what a preview looks like (e.g., a diff or list of changes). It also does not mention prerequisites like needing a TypeScript project or handling unsaved files. Given the 2-parameter simplicity, this is a notable gap.

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% (both parameters described in the input schema). The description adds minimal extra meaning beyond the schema, restating the 'apply' default. The baseline score of 3 is appropriate since the schema already provides comprehensive parameter details.

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 'Sort' and 'drop unused ones' on the resource 'file's imports', using TypeScript's own organizer. This distinguishes it from sibling tools like get_imports (retrieval) and format_document (formatting), making the purpose unambiguous.

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 specifies the default behavior ('previews the edits by default') and how to apply changes ('pass apply to write them to disk'). While it does not explicitly list when to use or avoid this tool versus alternatives, the context of sibling tools provides enough implicit guidance.

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