Skip to main content
Glama

ask_chain

Thread a question through an ordered AI pipeline where each model critiques and refines the previous draft, yielding a progressively improved final answer with drift tracking.

Instructions

DIRECTIONAL, SEQUENTIAL — the relay counterpart to ask_council. Where the council asks N models the SAME question in parallel and synthesizes their independent answers ('what's true?'), the chain threads a question through an ORDERED pipeline where each stage refines the last ('make this answer better'). The operator sets the order as a pipeline string like 'm3 > glm > deepseek > fable' (or an ordered models array). Stage 1 drafts; each middle stage is told to solve independently and CRITIQUE the prior draft before extending it (an anti-anchoring guard); the final stage DECIDES, seeing all prior stages as anonymized peers. Best for two things a council can't do: cost-tiered escalation (a cheap/fast model does the legwork, Fable finalizes) and explicit draft → red-team → decide pipelines. Costs MORE latency than a council (stages run sequentially, not in parallel), so reserve it for when the ordered refinement is the point. Draft → critique → refine is also a natural IDEATION pipeline: a cheap model brainstorms broadly, later stages prune and sharpen the ideas. Order matters and repeats are allowed ('fable > glm > fable' = draft, critique, re-decide). A mid-chain model that refuses/errors is skipped (recorded); if the final stage fails, Fable synthesizes the survivors. The result carries a recommendation_drift trail and material_drift flag — the chain analogue of the council's consensus signal — so you can see whether the answer was refined or just rubber-stamped. Same scope as ask: broad and conceptual engineering questions (including brainstorming) are fine; direct offensive-security asks and non-software domain knowledge (biology/medicine refused; neuroscience, cognitive science, AI/ML, and CS are in-scope) are refused. Aliases: 'm3' = minimax, 'opus5' = opus. Any stage can be 'opus' (Claude Opus 5) — a cheaper, faster terminus than Fable, e.g. 'm3 > opus'. The group token 'twin' (aka 'twin flames') expands in place to two stages, fable then opus, so 'm3 > twin' is a cheap draft finished by both Anthropic reasoners in turn. Default pipeline if none given: minimax > fable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelsNoThe ordered pipeline as an array (alternative to `pipeline`), e.g. ['minimax','glm','fable']. Order-sensitive; duplicates allowed.
contextNoOptional code snippets, file paths, or structural context (seen by every stage).
sessionNoOptional coordination key for the cross-agent hub (`session_list` / `session_peek`). Reuse the same key across agents working the same decision so turns group together. Defaults to the tool name (`ask_council` / `ask_chain` / `ask_debate` / …) when omitted.
trustedNoOperator-authorized. When true, the prohibited-use denylist runs in log-only mode: security vocabulary in the question AND in `context` is audited but does not block. Use for legitimate security-engineering work (PoC analysis, CVE research, binary hardening review) where the ask genuinely needs security terms. Takes effect ONLY when the operator has set ASK_FABLE_ALLOW_TRUSTED (env or config); otherwise the flag is ignored and the denylist still applies.
pipelineNoThe ordered pipeline as a string, e.g. 'm3 > glm > deepseek > fable'. Split on '>'. Order matters and repeats are allowed. Aliases: 'm3' = minimax. The group token 'twin' (aka 'twin flames') expands in place to two stages, fable then opus — positionally, so a member you also name elsewhere in the pipeline runs twice (repeats are legitimate here and are not collapsed). Ignored when `models` is given.
questionYesA specific software/engineering question to thread through the pipeline.
context_refNoKey(s) of context saved with `context(op="write", …)` to pull in and prepend to `context`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.18.0
    • changedInput schema / properties / context_ref / description
      Previous value: -"Key(s) of context saved with `context_write` to pull in and prepend to `context`."New value: +"Key(s) of context saved with `context(op=\"write\", …)` to pull in and prepend to `context`."
  2. Changed1 schema field changedv0.16.0
    • addedInput schema / properties / trusted
      Added value: +{
      +  "default": false,
      +  "description": "Operator-authorized. When true, the prohibited-use denylist runs in log-only mode: security vocabulary in the question AND in `context` is audited but does not block. Use for legitimate security-engineering work (PoC analysis, CVE research, binary hardening review) where the ask genuinely needs security terms. Takes effect ONLY when the operator has set ASK_FABLE_ALLOW_TRUSTED (env or config); otherwise the flag is ignored and the denylist still applies.",
      +  "type": "boolean"
      +}
  3. First observedv0.12.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false. The description adds substantial behavioral context beyond annotations: stages run sequentially, each middle stage critiques prior draft, final stage decides, mid-chain failures are skipped and recorded, final-stage failure falls back to Fable synthesizing survivors, and the result carries recommendation_drift and material_drift signals. It also discloses the trusted flag behavior and denylist scope. No contradiction with annotations.

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 long but information-dense; every sentence adds a distinct fact about behavior, usage, or scope. It is front-loaded with the core directional/sequential concept and the sibling contrast. It could be tightened slightly (e.g., the ideation note and the twin expansion are somewhat redundant with the pipeline semantics), but the length is justified by the tool's complexity and the absence of an output schema.

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 complex tool with 7 parameters, no output schema, and no enums, the description covers the pipeline mechanics, failure handling, result signals, scope boundaries, aliases, defaults, and the trusted flag's activation condition. An agent has everything needed to decide whether to call it and how to construct a valid pipeline. The only minor gap is that the description doesn't detail the exact shape of the recommendation_drift trail, but that is a return-value detail and no output schema exists; the description at least names the signal.

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 coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema: it explains the pipeline string syntax with aliases ('m3' = minimax, 'opus5' = opus), the 'twin' group token expansion, the default pipeline (minimax > fable), and the relationship between pipeline and models (pipeline ignored when models is given). It also clarifies that repeats are allowed and order matters, which the schema mentions but the description enriches with examples. Slight deduction because the description doesn't add much about context/session/trusted beyond what the schema already says, but the pipeline semantics are genuinely enriched.

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 opens with 'DIRECTIONAL, SEQUENTIAL — the relay counterpart to ask_council' and immediately distinguishes the chain from the council: ordered pipeline vs parallel synthesis. It states the specific verb (threads a question through an ordered pipeline) and resource (a chain of models), and names the sibling it is not. An agent can tell it apart from ask_council, ask_debate, and ask without opening schemas.

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

Usage Guidelines5/5

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

The description explicitly says when to use the chain over a council: 'Best for two things a council can't do: cost-tiered escalation... and explicit draft → red-team → decide pipelines.' It also gives a negative condition: 'Costs MORE latency than a council... so reserve it for when the ordered refinement is the point.' It names the alternative (ask_council) and the scope boundary (same scope as ask, with refused domains listed). This is explicit when/when-not guidance.

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