Skip to main content
Glama

validate_marks

Dry-run your marks input to catch translation blanks, alignment issues, and token errors before creating a chapter. Returns all validation problems at once.

Instructions

Dry-run a /from-marks ingest without TTS or DB persistence. Runs the full pipeline (sentence translate + awesome-align + per-token gloss

  • structural validation) and returns every issue found, at once.

Use this BEFORE every create_chapter_from_marks call. Catches: blank Gemini translations, EU↔EU alignment coverage below threshold (70%), CJK token failures, missing target languages, bad alignment ranges, empty tokens. Cheap and idempotent.

Returns the cwbe ValidationResult (top-level ok, issues[], stats). Each issue has at least kind, message, and a markIndex (null for whole-batch issues).

Issue kind values worth recognising at decision time:

  • BLANK_TRANSLATION → Gemini returned empty for that target.

  • SOURCE_COVERAGE / TARGET_COVERAGE → awesome-align below 70% (EU) or 40% (CJK). context.coverage and context.minimum are percent.

  • MISSING_LANGUAGES → some target langs absent.

  • EMPTY_TOKENS → cwseg produced no tokens (degenerate input).

Args: language: Source language code (EN | FR | ES | DE | IT | PT | ZH | JA | KO). level: B1 | B2. marks: Pre-split sentence list in the source language. No blanks. tokens_per_mark: Optional pre-segmented source tokens, one list per mark. Validate is permissive (it's the exploratory step) — pass them once you have agent glosses ready so validate sees what /from-marks will see. Omit on a first pass to inspect cwseg's tokens via /segment instead. token_glosses: Same shape as on create_chapter_from_marks. Pass the exact list you intend to send to /from-marks so the validator judges what would actually ship. Without overrides, validate reports issues on Gemini cells that overrides would replace — false positives for the caller-supplied flow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageYes
levelYes
marksYes
tokens_per_markNo
token_glossesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses the tool's behavior: it runs the full pipeline, returns all issues at once, is idempotent and cheap, and lists all possible issue kinds. No surprises.

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 headings, bullet points, and code formatting. It front-loads the purpose and usage, then details behavior and parameters. Slightly lengthy but every part adds value for a complex 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?

Given the complexity (5 params, no annotations, output schema exists), the description covers all aspects: purpose, usage, behavioral details, parameter semantics, output format, and issue kinds. Thorough and complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It does so excellently, explaining each parameter in depth: language codes, level values, marks constraints, tokens_per_mark usage, and token_glosses purpose. Adds significant meaning beyond the schema.

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 clearly states the tool performs a dry-run of the `/from-marks` ingest pipeline without TTS or DB persistence. It specifies the verb 'validate' (dry-run) and resource 'marks', and distinguishes from siblings like `create_chapter_from_marks` which performs the actual ingest.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this BEFORE every create_chapter_from_marks call'. It also lists what issues it catches and notes it is 'cheap and idempotent', providing clear guidance on when and why to use it.

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/paulmichaelstafford/cwmcp'

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