Skip to main content
Glama

contentrain_validate

Idempotent

Validate project content against model schemas to detect field, type, relation, secret, and i18n issues, and auto-fix structural problems when fix is enabled.

Instructions

Validate project content against model schemas. Detects required field violations, type mismatches, broken relations, secret leaks, i18n parity issues, and more. If fix:true, auto-fixes structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout, scheduling keys an older content_save leaked into document frontmatter) and backfills a missing model title_field — do NOT manually edit .contentrain/ files. Content without meta gets meta with status published, matching what delivery already serves. A fix that would change whether an entry is delivered is listed in visibility_changes and left on its branch for review instead of auto-merged.

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": "contentrain_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
fixNoAuto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout, publish_at/expire_at copies an older content_save left in document frontmatter when meta holds the same key) and backfill a missing model title_field. Each backfilled title_field is reported as a notice naming the rule that chose it. Meta backfilled for content without meta is status published (delivery already serves such entries); a fix that changes whether an entry is delivered is listed in visibility_changes and held for review. Default: false
modelNoModel ID to validate (omit for all models)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.61
    • changedInput schema / properties / fix / description
      Previous value: -"Auto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout, publish_at/expire_at copies an older content_save left in document frontmatter when meta holds the same key) and backfill a missing model title_field. Each backfilled title_field is reported as a notice naming the rule that chose it. Default: false"New value: +"Auto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout, publish_at/expire_at copies an older content_save left in document frontmatter when meta holds the same key) and backfill a missing model title_field. Each backfilled title_field is reported as a notice naming the rule that chose it. Meta backfilled for content without meta is status published (delivery already serves such entries); a fix that changes whether an entry is delivered is listed in visibility_changes and held for review. Default: false"
  2. Changed1 schema field changedv1.0.33
    • changedInput schema / properties / fix / description
      Previous value: -"Auto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout) and backfill a missing model title_field. Each backfilled title_field is reported as a notice naming the rule that chose it. Default: false"New value: +"Auto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout, publish_at/expire_at copies an older content_save left in document frontmatter when meta holds the same key) and backfill a missing model title_field. Each backfilled title_field is reported as a notice naming the rule that chose it. Default: false"
  3. Changed1 schema field changedv1.0.29
    • changedInput schema / properties / fix / description
      Previous value: -"Auto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout). Default: false"New value: +"Auto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout) and backfill a missing model title_field. Each backfilled title_field is reported as a notice naming the rule that chose it. Default: false"
  4. Changed1 schema field changedv1.0.26
    • changedInput schema / properties / fix / description
      Previous value: -"Auto-fix structural issues (canonical sort, orphan meta, missing locale files). Default: false"New value: +"Auto-fix structural issues (canonical sort, orphan meta, missing locale files, stray non-i18n meta layout). Default: false"
  5. Addedv1.0.12
  6. Removedv1.0.11
  7. Addedv0.1.18
  8. Removedv0.1.16
  9. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations, the description explains mutation behavior in detail: what fix:true changes, when title_field is backfilled, how content without meta gets published status, and how delivery-changing fixes are recorded in visibility_changes and left on the branch. This gives strong operational context for a tool whose annotations mark it as non-read-only but non-destructive and idempotent. There is no contradiction with the annotations.

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 front-loaded with the core validation purpose and then covers fix behavior efficiently. The parenthetical list of auto-fix cases is long and makes one sentence dense, but the information earns its place. It avoids unnecessary repetition.

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?

For a two-parameter tool without an output schema, the description gives enough detail to invoke it correctly, especially around auto-fix risk and review behavior. It mentions visibility_changes and notices but does not describe the general validation response shape or error reporting format. Overall it is complete enough for correct invocation.

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 both parameters are already documented in the input schema. The description adds some behavioral framing around fix:true, but most of that detail is also present in the schema parameter description. It does not add meaning beyond the schema for the model parameter.

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 states a specific verb and resource: validate project content against model schemas. It clearly lists the issue classes it detects, so an agent knows what the tool does. It does not explicitly differentiate itself from similar siblings such as contentrain_doctor or contentrain_scan, which keeps it from a 5.

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

Usage Guidelines4/5

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

It gives concrete guidance for using the fix flag, including what gets auto-fixed and that visibility-changing fixes are held for review rather than auto-merged. It also warns not to manually edit .contentrain/ files. It does not name alternative tools or say when to prefer contentrain_doctor or contentrain_scan over this validation path.

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