Skip to main content
Glama

generate_i18n_types

Generates resources.d.ts from source locale catalogs, enabling autocomplete and compile-time key validation for i18n translation functions.

Instructions

Generates TypeScript definitions (resources.d.ts) from the project's source locale catalogs, providing full autocomplete and compile-time key validation for i18n translation functions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "generate_i18n_types"
  }
}

Input Schema

NameRequiredDescriptionDefault
outputPathNoOptional output path relative to project root (e.g. 'src/@types/resources.d.ts'). Defaults to standard types directory.
projectPathNoOptional project root directory. Defaults to current working directory.
writeToDiskNoIf true (default), writes the resources.d.ts file to disk. If false, returns content only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose the core side effect — a resources.d.ts file is produced from source catalogs — but says nothing about overwriting an existing file, what happens if no source catalog exists, or whether it fails or silently no-ops.

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?

A single front-loaded sentence naming the verb, the produced artifact, and its source. The trailing benefit clause (autocomplete and compile-time key validation) earns its place by explaining why the file matters, with no redundant restatement of the tool name.

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?

With three optional, fully documented parameters and no output schema, the definition covers the basics. It falls short on operational context an agent needs for a file-mutating generator: prerequisites, overwrite semantics, and the relationship to the planning/applying siblings in the same family.

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 description coverage is 100% and all three parameters are optional with documented defaults, so the schema already does the heavy lifting. The description adds no parameter-level meaning, such as what happens to outputPath when writeToDisk is false, which would have raised this score.

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 gives a specific verb and concrete artifact: generates TypeScript definitions (resources.d.ts) from the project's source locale catalogs, plus the downstream benefit (autocomplete, compile-time key validation). It is clearly distinguishable from apply_i18n_plan or translate_i18n, though it never explicitly contrasts itself with the similarly named generate_i18n_plan or generate_pseudolocale.

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?

Usage is only implied: an agent can infer it should call this when it wants typed translation keys, but there is no explicit when-to-use, no prerequisite (e.g. source locale catalogs must already exist), and no statement about when another sibling such as generate_i18n_plan should be preferred first.

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