Skip to main content
Glama

Validate document content

validate

Checks document content against the selected SpecMgr domain schema in a dry run, returning a validity flag and error messages; supports body-only or full-document checks.

Instructions

Disk-free, id-free dry run validating document content across the whole-body domains (type is one of req, uc, tsk, qa, prb, gol, rsk, dec, sop, feat, vcr, sysrs, txt; adr is not supported -- use validate_adr instead). full=False (default) validates body-only content (no frontmatter); full=True validates a complete document (frontmatter + body). Never raises for a content-validation failure: always returns {valid: bool, errors: list[{message: str}]} -- errors is empty when valid is True, and each message is truncated to at most _MAX_VALIDATE_ERROR_CHARS (300) characters (plus an "... (truncated)" suffix when truncation occurred) rather than returned verbatim without limit. A full/content-shape mismatch, or an unsupported type, is a caller-usage error and still raises ValueError before any validation runs. This is the sole validate entry point for these domains -- the former per-domain validate_<d> tools are removed; validate_adr remains a separate, unchanged, id-based tool. Each domain's structure reference is its own get_<d>_schema tool (the generated JSON Schema), with get_<d>_template/get_<d>_example as the authoring starting points.

Input Schema

NameRequiredDescriptionDefault
fullNo
typeYes
contentYes

Output Schema

NameRequiredDescriptionDefault
validYes
errorsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.38.0
    • changedInput schema / properties / type / enum
      Previous value: -[
      -  "req",
      -  "uc",
      -  "tsk",
      -  "qa",
      -  "prb",
      -  "gol",
      -  "rsk",
      -  "dec",
      -  "sop",
      -  "feat",
      -  "vcr",
      -  "sysrs"
      -]New value: +[
      +  "req",
      +  "uc",
      +  "tsk",
      +  "qa",
      +  "prb",
      +  "gol",
      +  "rsk",
      +  "dec",
      +  "sop",
      +  "feat",
      +  "vcr",
      +  "sysrs",
      +  "txt"
      +]
  2. First observedv0.36.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the never-raises-on-invalid-content contract, the exact return shape, the 300-character error truncation with suffix, and the specific cases that DO raise ValueError (shape mismatch, unsupported type) before any validation runs.

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?

Front-loaded with scope and the sibling exclusion, then the runtime contract, then the authoring references. It is dense but every clause carries information; the parenthetical spelling out of the truncated suffix and the reiteration of the errors/valid relationship could be tightened slightly.

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

Completeness4/5

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

An output schema exists, yet the description still usefully explains the error semantics and truncation. For a 3-parameter, read-only validation tool this is near-complete; only the format expectations for `content` are left to the referenced schema/template tools.

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 and largely does: it enumerates the valid `type` values and the unsupported one, and defines `full`'s default and the two content shapes it selects. `content` is only implied, but its meaning is unambiguous from the surrounding text.

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?

States a specific verb and resource ('dry run validating document content'), names the exact set of supported domains, and explicitly excludes `adr` with a pointer to `validate_adr`, so an agent can distinguish it from the many sibling tools instantly.

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?

Gives explicit when-to-use guidance for the `full` flag (body-only vs frontmatter+body), names the alternative tool for the excluded domain (`validate_adr`), and points to the authoritative structure references (`get_<d>_schema`, templates/examples). It even clarifies the per-domain validate tools no longer exist, closing off a likely wrong call.

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

Deploy Server

Other Tools