Skip to main content
Glama

ts_organize_imports

Sort and combine imports in TypeScript/JavaScript files, and remove unused ones. Applies changes directly to disk to keep code clean.

Instructions

Sort imports and remove unused ones in a TypeScript/JavaScript file. Applies the changes to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesRelative file path from project root
skipDestructiveCodeActionsNoOnly sort and combine imports, without removing unused ones

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Explicitly discloses that changes are applied to disk, a critical side effect, and states that unused imports are removed. With no annotations, this is meaningful behavioral disclosure, though it omits details like reversibility or safety precautions.

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-loading the core purpose and then the key side effect. Every word earns its place.

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?

For a simple two-parameter mutation tool with a complete schema, the description covers the essential operation and its disk-writing behavior. It would benefit from routing guidance versus siblings, but nothing critical is missing.

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 schema already describes both parameters at 100% coverage, including the meaning of skipDestructiveCodeActions. The description adds no additional parameter-level detail, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: sorts and removes unused imports in a TypeScript/JavaScript file. The operation is clearly distinct from siblings like format or code_actions, though it does not explicitly name an alternative.

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 use-case is implied by the purpose, but there is no explicit guidance on when to choose this tool over format or generic code_actions. No exclusions or alternative conditions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.