Skip to main content
Glama

Validate a subagent result

validate_subagent_result
Read-only

Check subagent output against the parent's retained contract before acceptance; confirm valid true, assess evidence, and correct invalid results.

Instructions

Validate worker output structurally against the parent's retained contract.

Required for every returned or revised worker output before acceptance or
integration. Require valid: true, then independently assess its evidence.
Correct and revalidate invalid output; never rewrite its original contract.
Rejects unknown tool arguments. Checks fixed built-in payloads, closed shapes,
task/attempt/revision identity, statuses and evidence references. Limits: nesting 12, 10000 JSON nodes,
100 items per result array (50 for text lists), strings 4000 characters,
and at most 20 diagnostics. Reads no paths/URLs, reruns no checks, writes no
memory and never establishes truth, authorization or issue completion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesWorker result object or raw JSON string (at most 128000 characters). Raw text must be exactly one JSON object: no fences, duplicate keys, non-finite numbers or trailing prose.
contractYesOriginal contract object retained by the parent from get_subagent_context, including expected bundle_revision and contract_revision. Never use a worker replacement.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYes
errorsYes
verificationNostructural_only

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv26.10.14+1807

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by disclosing concrete operational limits (nesting 12, 10000 JSON nodes, 100/50 array items, 4000-char strings, 20 diagnostics) and a clear non-capability boundary: no path/URL reads, no reruns, no memory writes, and no establishment of truth, authorization or issue completion.

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-loads the purpose, then requirements, then limits in a compact block with no filler. It is dense and slightly run-on in the limits sentence, but every line carries information an agent would need.

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?

For a validating tool with an output schema, rich annotations and 100% schema coverage, the description covers the trigger condition, what is checked, the limits, and the explicit non-actions. Nothing needed to invoke or interpret it correctly is missing.

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 the result and contract parameters are already well documented, including the 'never use a worker replacement' constraint. The description reinforces contract fidelity but adds little syntactic or semantic detail beyond the schema, so the baseline 3 applies.

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 opening sentence states a specific verb and resource — validating worker output structurally against the parent's retained contract — and the following sentence clarifies the scope of the check (payload shapes, identity, statuses, evidence references). An agent can distinguish this from siblings like get_subagent_context without opening the schema.

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?

'Required for every returned or revised worker output before acceptance or integration' is an explicit when-to-use trigger, and 'Correct and revalidate invalid output' prescribes the follow-up loop. It doesn't name alternative tools or an explicit when-not case, so it stops short of a 5.

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