Skip to main content
Glama

vitest_apply_ast_codemods

Applies TypeScript AST codemods to fix ESM type exports, Mocha timeouts, and require() calls, preparing packages for Vitest migration.

Instructions

Executes TypeScript AST transformations using ts-morph to fix isolated ESM type exports, Mocha timeouts, and require() calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packagePathYesAbsolute path to the package directory
Behavior2/5

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

No annotations are present, so the description carries the burden of disclosing side effects. It says 'Executes TypeScript AST transformations' but never explicitly states that files may be modified in place, whether changes are reversible, what backups or guards exist, or failure behavior. For a mutation-style tool, this is a meaningful transparency gap.

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?

A single, focused sentence with no filler. The verb, mechanism, and target outcomes are front-loaded, and every clause contributes information.

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

Completeness3/5

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

The description adequately covers what the tool does and the required input, but with no output schema and no annotations it omits return behavior and the fact that AST transformations typically rewrite source files. For a one-parameter tool the gaps are moderate, but they are still meaningful for an agent deciding whether to apply it safely.

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 only parameter, packagePath, is fully documented in the schema as 'Absolute path to the package directory,' which already gives the agent the necessary meaning. The description adds no additional param-specific detail, matching the baseline for 100% schema coverage.

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 names a specific operation ('Executes TypeScript AST transformations'), the mechanism ('ts-morph'), and the concrete problem classes it fixes (isolated ESM type exports, Mocha timeouts, require() calls). This clearly distinguishes it from sibling tools that classify, scaffold, verify, or manage knowledge.

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 implies a clear use context: apply it when a package needs automated AST fixes for the listed TypeScript/ESM/Mocha/CommonJS issues. It does not explicitly state when not to use it or name alternative codemod tools, so it stops short of full exclusion 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/Manvi1203/vitest-migrator-mcp'

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