Skip to main content
Glama

Validate JSON field constraints

trust_validate_data
Read-onlyIdempotent

Validate JSON field presence, exact types, primitive enums and inclusive numeric bounds, returning ALLOW/BLOCK, field reasons and checked_fields. Combine required:true, type:"integer" and min:1 for a positive mandatory quantity: min alone neither requires a value nor rejects numeric strings. Missing, null or empty optional values skip the other constraints; 0 and false do not. For nested data, fields["order.total"] addresses a leaf; allow_extra:false compares top-level keys, so keep it true for dot-path rules. Use trust_clean_data for transformations or trust_check_action for evidence/spending checks. This validates structure, not facts or provenance. Free, unauthenticated, stateless pilot: rules apply only to this call. Usage metadata is recorded; request bodies are not stored.

Input Schema

NameRequiredDescriptionDefault
dataYesJSON object to inspect; do not submit secrets or personal data.
fieldsYesMap of dot-separated field paths to constraints, e.g. {"order.total":{"type":"number","min":0,"required":true}}. Inline rules apply only to this request.
allow_extraNoFalse rejects top-level keys absent from fields. With nested dot paths use true; this flag is not a recursive additional-properties check.

Output Schema

NameRequiredDescriptionDefault
okYesThe operation completed; does not imply the verdict is ALLOW.
reasonsYesAll failed checks; empty when ALLOW.
serviceYesService that evaluated the request.
verdictYesAdvisory verdict. The integrator must prevent execution on BLOCK or any error.
versionYesDeployed implementation version.
checked_fieldsYesNumber of field rules evaluated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, and the description adds context the annotations cannot: free, unauthenticated, stateless per-call rules, usage metadata recorded but request bodies not stored. It also discloses the non-obvious emptiness rule that 0 and false are not treated as empty.

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 the core action and return values, then constraints and routing, so the most important content comes first. It is a single dense paragraph of considerable length; a line break or two between the constraint rules and the pilot/usage disclosure would aid scanning without cutting content.

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 the description need not enumerate return fields, yet it still names ALLOW/BLOCK, field reasons and checked_fields for orientation. Combined with the dot-path and allow_extra guidance and the statelessness disclosure, nothing needed to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so most parameter meaning is already structured. The description still adds interaction semantics not present in the schema, notably that missing/null/empty optional values bypass other constraints while 0 and false do not, and that allow_extra is a top-level-only comparison that should stay true when using dot paths.

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 (validate) with an enumerated resource (field presence, exact types, primitive enums, inclusive numeric bounds) and names the return shape (ALLOW/BLOCK, field reasons, checked_fields). It also explicitly separates itself from trust_clean_data and trust_check_action, so an agent can route without opening schemas.

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?

Explicitly names alternatives and the conditions that select them: trust_clean_data for transformations, trust_check_action for evidence/spending checks. It also includes a concrete when-to-use construction pattern (combine required:true, type:"integer", min:1) and a scope caveat that this validates structure, not facts or provenance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources