Skip to main content
Glama

validate_pipeline_stage

Check sub-agent output for missing or empty required keys to ensure data completeness before passing to the next pipeline stage.

Instructions

M5.7.4 — Validate a sub-agent output before passing to the next pipeline stage.

Treats sub-agent output with the same suspicion as external tool output.
Rejects if any required keys are missing or empty.

Args:
    output_json: JSON string of the sub-agent output dict.
    required_keys: Comma-separated list of required keys (e.g., "title,summary,agent_slug").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_jsonYes
required_keysYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The description discloses that the tool rejects missing/empty keys and treats sub-agent output with suspicion, but it does not specify behavior for malformed input (e.g., invalid JSON in output_json, malformed required_keys). With no annotations, the description carries the full burden and could be more comprehensive.

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 concise with a header, two sentences, and an arg list. It is front-loaded and avoids fluff. The 'M5.7.4' prefix adds minimal value but does not harm. Slightly more structure (e.g., separating behavior from args) could improve readability.

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?

Given that an output schema exists (though not shown), the description does not need to explain return values. It adequately covers the validation logic and parameters. However, it omits error handling details and edge cases, which is acceptable for a simple tool.

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 description coverage is 0%, so the description must compensate. It explains both parameters: output_json as 'JSON string of the sub-agent output dict' and required_keys as 'comma-separated list of required keys' with an example. This adds meaning beyond the schema's type-only definition.

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 description clearly states the tool validates a sub-agent output before passing to the next pipeline stage, with specific rejection criteria (missing/empty keys). The verb 'validate' and resource 'sub-agent output' are unambiguous. It distinguishes from siblings as no other validation tool is present in the sibling list.

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

Usage Guidelines3/5

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

The description implies usage context ('before passing to the next pipeline stage') but does not explicitly state when to use versus alternatives, nor does it mention conditions when the tool should not be used. There is no guidance on prerequisites or fallback options.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SVerITG/Metis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server