Skip to main content
Glama

save_governor_spec

Register a natural language governor to control pipeline flow at steps like on_fail or on_success, with decisions to proceed, jump, halt, mark broken, or patch the pipeline.

Instructions

Register an LLM-governed governor for use in pipeline control flow.

Governors are evaluated at trigger points (on_fail, on_success) to decide the continuation. The spec is a natural language description of what the governor should decide. The governor LLM returns one of:

  • next — proceed normally

  • jump(target) — jump to a named step

  • halt — stop the pipeline cleanly

  • broken(reason) — stop and write broken status (visible via pipeline_status)

  • patch_pipeline — deep-merge patch the pipeline definition and continue

Each continuation also carries a free-form context dict that accumulates across the pipeline and is written to /shared/governor-context.json, plus a confidence score in [0.0, 1.0].

Reference a governor in a pipeline step: "on_fail": {"governor": "Failure"} "on_success": {"governor": "Validation"}

Args: name: Unique governor name used to reference it from pipeline steps. spec: Natural language description telling the LLM what to decide. description: One-line summary shown in list_governor_specs. model: Claude model for evaluation (default: haiku). beam_width: Self-consistency beam width. When >1 the harness samples the governor N times in parallel and commits to the confidence-weighted majority decision. Losing candidates are preserved on the winner's alternatives field for inspection. Default 1 (no beam).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
specYes
descriptionNo
modelNoclaude-haiku-4-5-20251001
beam_widthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It details the beam_width behavior (parallel sampling, confidence-weighted majority, alternatives field) and mentions context dict accumulation. It does not specify overwrite behavior or error handling, but the core behavioral traits are well covered.

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 well-structured: a one-line purpose, followed by details on governor decisions, then a clear Args section for parameters. Every sentence adds value, and the most critical information is front-loaded. No unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the tool's complexity (5 parameters, beam_width behavior), the description omits the return value of the save operation and does not clarify whether re-registering an existing name overwrites or errors. With an output schema present (but not shown), the agent might infer the return type, but explicit mention would improve completeness.

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 description coverage is 0%, but the description fully compensates by explaining each parameter in the Args section: name (unique reference), spec (natural language), description (one-line summary), model (Claude variant with default), beam_width (self-consistency with detailed behavior). This adds rich semantic meaning beyond the bare 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 the tool's purpose: 'Register an LLM-governed governor for use in pipeline control flow.' It explains what a governor does, lists possible continuations, and shows how to reference it in pipeline steps. This distinguishes it from sibling tools like list_governor_specs, making the purpose unambiguous.

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?

The description provides clear context for when to use the tool (defining a governor for pipeline steps) and explains the parameters and behavior. It does not explicitly state when not to use it or compare with alternatives, but the context is sufficient for an AI agent to understand usage.

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