Skip to main content
Glama

convert_to_typescript

Convert JavaScript code to TypeScript with comprehensive type annotations, modern best practices, and production-ready output including tests and documentation.

Instructions

Convert JavaScript code to TypeScript with comprehensive type annotations and modern best practices

WORKFLOW: Ideal for creating production-ready code, tests, and documentation TIP: Generate unlimited iterations locally, then review with Claude SAVES: Claude context for strategic decisions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addTypeGuardsNoAdd type guard functions for runtime type checking
analysisDepthNoLevel of conversion detailcomprehensive
analysisTypeNoType of conversion to performcomprehensive
codeNoJavaScript code to convert (for single-file conversion)
filePathNoPath to single JavaScript file to convert
filesNoArray of specific JavaScript file paths to convert
maxDepthNoMaximum directory depth for multi-file discovery (1-5)
moduleNoModule systemESNext
preserveCommentsNoPreserve original comments and add TSDoc
projectPathNoPath to project root (for multi-file conversion)
strictNoUse strict TypeScript mode
targetNoTypeScript compilation targetES2020
useEnumsNoUse enums for fixed value sets
useInterfacesNoPrefer interfaces over type aliases
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions the tool's purpose and some workflow tips, it doesn't describe important behavioral traits like whether this is a read-only analysis or a code-modification operation, what permissions might be required, whether it creates new files or modifies existing ones, error handling, or rate limits. The 'SAVES' section mentions Claude context but doesn't clarify the tool's actual behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, workflow, tip, saves) and uses bullet-like formatting. It's appropriately sized at 4 sentences, though the 'SAVES' section feels somewhat disconnected from the core tool description and could be more integrated.

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?

For a complex tool with 14 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns (converted code? success status? error messages?), doesn't clarify the behavioral implications of a code conversion tool, and provides minimal guidance on when and how to use it effectively given the many configuration options.

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?

With 100% schema description coverage, the schema already documents all 14 parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema. It mentions 'comprehensive type annotations' which aligns with some parameters but doesn't provide additional semantic context about how parameters interact or affect the conversion process.

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?

The description clearly states the tool's purpose: converting JavaScript code to TypeScript with comprehensive type annotations and modern best practices. It specifies the verb ('convert') and resource ('JavaScript code'), but doesn't explicitly differentiate from sibling tools like 'analyze_single_file' or 'suggest_refactoring' which might have overlapping functionality.

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 description provides some implied usage context through the 'WORKFLOW' and 'TIP' sections, suggesting it's ideal for production-ready code and recommending local iterations. However, it doesn't explicitly state when to use this tool versus alternatives like 'suggest_refactoring' or 'analyze_code_quality', nor does it provide clear exclusions or prerequisites.

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/houtini-ai/houtini-lm'

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