Skip to main content
Glama

Agent Output Verifier by SarnAI

verify_schema

Independent check of AI agent output before you pay: verify and validate an AI agent's JSON against your JSON Schema and business rules, for example validate an invoice, check its total, or confirm a deliverable meets the agreed schema before you accept it. Checks structure, formats, ranges, and cross-field rules such as 'line totals must equal the total.' Returns pass/fail, % of checks passed, fix hints, and an Ed25519-signed attestation and receipt you can show as evidence of why you paid or refused. 1,000 free checks a day per caller, then $0.02 per check (x402, USDC on Base or Solana).

Input Schema

NameRequiredDescriptionDefault
rulesNoOptional cross-field rules: sum_equals, gte, lte, exists_in, unique (duplicate detection). Violations are reported as informational flags unless enforce_rules is true.
boundsNoOptional per-field min/max, keyed by dotted path with '[]' array wildcard (e.g. 'items[].price'). Numbers or ISO-8601 dates. Violations are reported as informational flags unless enforce_rules is true.
detailNo'full' (default) returns everything; 'compact' returns only the summary, next actions, receipt and signature. Use compact inside verify-repair loops to save tokens. 'compact' fields: summary, next_actions, result, the receipt fields (verification_id, task_id, agent_id, output_hash, schema_hash, rules_hash, verified_at, verifier_version, enforce_rules, strict_content_check), verify and attestation - errors, errors_detail, flags, hints and the scores are left out entirely, not just emptied. Both shapes are fully signed.full
task_idYesYour own identifier for this verification. 1-200 printable characters, no control characters and no lone Unicode surrogate; a request outside that range is rejected (422), not truncated.
agent_idNoOptional label identifying the AI agent that produced submitted_output (for example, the seller), used for /reputation and the trust score: records and scores belong to the producer, not to whoever calls this endpoint. It is an unauthenticated label. agent_ids starting with 'test-' are reserved for testing: the verification runs normally but is never recorded, so it cannot affect any reputation or trust score. 1-200 printable characters (same rule as GET /score/{agent_id}); a longer or malformed value is rejected (422), not truncated.
enforce_rulesNoOpt-in. When true, every configured bound and consistency rule must hold, or the result is 'fail' (like strict_content_check), with an 'enforce_rules: ...' entry in errors. That includes a rule or bound that cannot run (its path is missing, a value is not comparable, a value has nothing to be compared against): it fails rather than passing silently, so omitting a field, in the whole path or in any array element the rule applies to, cannot skip a binding rule. A rule or bound with if_present: true is skipped where its field is absent instead. When false (default) nothing changes: violations and unrunnable rules stay informational flags. Echoed back in the signed response.
expected_schemaYesRequired. The JSON Schema (draft-04 to 2020-12) that submitted_output must satisfy: your own requirements, as a JSON object.
submitted_outputYesRequired. The output being checked: any JSON value (object, array, string, number, boolean or null), exactly as the AI agent produced it.
strict_content_checkNoOpt-in. When true, any string in submitted_output containing control characters (e.g. null bytes) or embedded HTML/script markup makes the result 'fail'. When false (default) this is not checked at all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / expected_schema / description
      Added value: +"Required. The JSON Schema (draft-04 to 2020-12) that submitted_output must satisfy: your own requirements, as a JSON object."
    • addedInput schema / properties / submitted_output / description
      Added value: +"Required. The output being checked: any JSON value (object, array, string, number, boolean or null), exactly as the AI agent produced it."
  2. Changed1 schema field changed
    • changedInput schema / properties / agent_id / description
      Previous value: -"Optional label identifying the agent that produced submitted_output (for example, the seller), used for /reputation and the trust score: records and scores belong to the producer, not to whoever calls this endpoint. It is an unauthenticated label. agent_ids starting with 'test-' are reserved for testing: the verification runs normally but is never recorded, so it cannot affect any reputation or trust score. 1-200 printable characters (same rule as GET /score/{agent_id}); a longer or malformed value is rejected (422), not truncated."New value: +"Optional label identifying the AI agent that produced submitted_output (for example, the seller), used for /reputation and the trust score: records and scores belong to the producer, not to whoever calls this endpoint. It is an unauthenticated label. agent_ids starting with 'test-' are reserved for testing: the verification runs normally but is never recorded, so it cannot affect any reputation or trust score. 1-200 printable characters (same rule as GET /score/{agent_id}); a longer or malformed value is rejected (422), not truncated."
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the return payload (pass/fail, % checks passed, fix hints, Ed25519-signed attestation and receipt), the monetization and rate limits (1,000 free checks/day per caller, then $0.02 per check via x402 in USDC on Base or Solana). These are exactly the operational facts an agent needs before invoking a paid, non-read-only endpoint, and nothing contradicts readOnlyHint=false or idempotentHint=false.

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?

One dense paragraph that front-loads what the tool does and then the payoff, with pricing last where it belongs. It is long but nearly every clause carries information; only the cost details could arguably be trimmed.

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 9-parameter tool with nested objects and no output schema, the description fills the biggest gap by describing the response shape (pass/fail, percentage, hints, signed receipt). Minor incompleteness: it doesn't explain how the x402 payment step is triggered or what a caller does on payment failure.

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 coverage is 100%, so the schema already carries parameter meaning in depth. The description adds only a light gloss — 'business rules' with the 'line totals must equal the total' example maps to the rules parameter — and says nothing about task_id, agent_id, detail, or enforce_rules. 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 specific verb+resource: 'verify and validate an AI agent's JSON against your JSON Schema and business rules', backed by concrete examples (validate an invoice, check its total, confirm a deliverable meets the agreed schema). The purpose is unmistakable, though the description never names or contrasts the sibling get_verification_record, leaving that routing to inference.

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?

Gives a clear usage moment — 'before you pay', 'before you accept it' — which frames exactly when an agent should call this rather than accept output. It does not state when NOT to use it or point at the sibling tool for retrieving past verifications.

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.