Skip to main content
Glama

Extract messages

verbaly_extract

Scans source files to add new messages to locale catalogs and refresh generated i18n types; writes catalogs unless dryRun is set, and prune removes unreferenced keys with translations.

Instructions

Scan the source files, add new messages to the locale catalogs and refresh the generated types (what verbaly extract does). Writes catalog files unless dryRun is set. prune drops keys no longer referenced in the code, translations included.

Input Schema

NameRequiredDescriptionDefault
rootNoProject root holding verbaly.config (defaults to the server working directory)
pruneNoDrop keys no longer referenced (deletes their translations)
dryRunNoReport what would change, write nothing

Output Schema

NameRequiredDescriptionDefault
lockNoThis run created verbaly.lock, moved an older state file (from) into it, or rewrote it whole after a merge conflict (merged): it belongs in git with the catalogs, so tell the user to commit it
addedYes
dryRunYes
inCodeYesHow many of those messages the code writes as text: 0 when the project keeps its text in the catalog and reads it with t(key)
prunedYes
escapedYesPlural or format blocks inside a tagged template, which render as literal text
localesYes
renamedYesTagged templates on t under another name (const tr = useT()): never extracted, so they stay in the source language until the binding is named t
messagesYesMessages the source catalog holds after this run
replacedYesSource texts the code wrote over: before is what the catalog said, code is the text that ships. An edit made in the code reads like this too
unparsedYesSource files the parser could not read: their messages are not extracted, and prune drops nothing until they parse
collisionsYesKeys written with more than one text: every place shows the text of the first site, so give each text its own key
positionalYesMessages that hand a translator a nameless value like {_0}: put the value in a named variable first
stateProblemNoThe state file could not be read or written: the catalogs were written, drafts and outdated tracking were not

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the key traits: it writes catalog files by default, dryRun suppresses writes, and prune is destructive in a specific way (drops unreferenced keys including their translations). It omits error/failure behavior and whether repeated runs are idempotent, but the mutation and destruction semantics are clear.

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?

Three dense sentences, each carrying distinct information, with the core action front-loaded. The parenthetical CLI reference is slightly redundant but aids recognition for agents familiar with the underlying tool.

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

Completeness5/5

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

An output schema exists, so return values need no explanation, and parameters are fully covered. Combined with explicit disclosure of the destructive prune path and the dryRun escape hatch, an agent has everything needed to call this 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?

Schema description coverage is 100%, so all three parameters are already documented. The description reinforces dryRun and prune semantics but adds no new syntax, defaults, or edge cases beyond the schema (e.g. what root defaults to is only in the schema). Baseline 3 is appropriate when the schema does the heavy lifting.

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 concrete multi-step action: scan source files, add new messages to locale catalogs, refresh generated types. An agent knows exactly what the tool produces. It doesn't explicitly contrast with siblings like verbaly_translate or verbaly_write_drafts, so sibling differentiation is inferential rather than stated.

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 parenthetical '(what `verbaly extract` does)' implies this is the CLI-equivalent extract step, and the dryRun/prune notes hint at when variants apply. There is no explicit 'use this when X, use sibling Y when Z' guidance, nor any mention of prerequisites such as a valid verbaly.config.

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