Skip to main content
Glama

filter

Validates refs against a declared type and returns only those that match. Uses parallel processing to filter out invalid results.

Instructions

Filter refs by type validation — keep only results that match the declared type.

Runs validate on each ref in parallel. Returns only refs with VALID verdict. This is the type-gated composition primitive: ensures only correct results flow downstream.

Args: refs: JSON array of ref objects: [{"ref": "run_id/agent_id"}, ...]. declared_type: Type name or description to validate against. model: Model for the validator agents (default: sonnet). timeout: Timeout per validation (default: 120).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refsYes
declared_typeYes
modelNosonnet
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description bears full burden. It discloses that validation runs in parallel on each ref, returns only valid results, and defines parameters. It does not mention side effects (likely none) or failure modes, but coverage is good.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly conciseness: two short paragraphs plus an Args list. Front-loaded with main purpose, then details, then parameters. No unnecessary words.

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 the tool has 4 parameters and an output schema, the description adequately covers behavior (parallelism, return criterion) and parameter meanings. Minor gaps: no edge case handling (e.g., empty refs) but not critical.

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

Parameters5/5

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

Schema coverage is 0%, so description must compensate. It provides a clear Args section explaining each parameter: refs (JSON array), declared_type (type name), model (default), timeout (default). This adds significant meaning beyond the schema.

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 that the tool filters refs by type validation, keeping only those with a VALID verdict. It explicitly calls itself a 'type-gated composition primitive', making its purpose distinct from sibling tools like 'validate' or 'chain'.

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 when to use (to filter valid refs) but does not explicitly compare to alternatives or state when not to use it. Given many sibling tools, more explicit guidance would improve usability.

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/stiege/swarm-mcp'

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