Skip to main content
Glama

SHPBL: Repository Audit & Repair

The canonical run contract, and the gate that executes it

run_contract
Read-onlyIdempotent

Read the canonical twelve-step run contract, or check a run bundle against it. Call it with no files to get the contract itself: every step's id, the artifacts it must produce, the exact condition that closes it, the terminal word to report when it does not, the instruction-precedence order, the retention rule and the two legal ends of step 12. Call it with files — a map of run-folder paths to their text — to get the machine verdict: which step blocked, which predicate refused and why. This is the identical implementation the offline tools/run-gate.mjs in every edition is bundled from, so the two cannot disagree about whether a bundle satisfies the contract. What they do not share is evidence: the offline gate checks the bundle you hand it, while a connected run can also confirm against the real repository tree that the files cited exist and say what the bundle claims. Same rules, one with a witness. Free, unmetered, read-only, stateless. Never infer a step, reorder one, or declare a run finished on your own reading — run the gate and report its word.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoThe run bundle as `path: text`, relative to the run folder (for example `STEP-LEDGER.json`). Send the canonical outputs you have; the gate says what is missing. Bounded: at most 400 entries and 8 MB of text in one call, and identical diagnostics are collapsed to one line with a count rather than repeated per entry. Omit this to read the contract without evaluating anything.
through_stepNoEvaluate gates through this step only. Defaults to 12.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedInput schema / properties / files / description
      Previous value: -"The run bundle as `path: text`, relative to the run folder (for example `STEP-LEDGER.json`). Send the canonical outputs you have; the gate says what is missing. Omit this to read the contract without evaluating anything."New value: +"The run bundle as `path: text`, relative to the run folder (for example `STEP-LEDGER.json`). Send the canonical outputs you have; the gate says what is missing. Bounded: at most 400 entries and 8 MB of text in one call, and identical diagnostics are collapsed to one line with a count rather than repeated per entry. Omit this to read the contract without evaluating anything."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true; the description reinforces this with 'read-only, stateless' and adds context beyond them: the implementation is identical to the offline gate so they cannot disagree, and a connected run can additionally confirm files against the real repository tree ('Same rules, one with a witness'). It also discloses bounded-input behavior and deterministic verdicts without contradicting any annotation.

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 dense and front-loaded with the primary action, and its clauses are purposeful: contract contents, verdict contents, offline/online relationship, and final directive. It is longer than minimal, but for a canonical gate with no output schema, every sentence adds useful rules or context; a minor structural improvement would be bulleted mode breakdowns.

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?

With no output schema, the description compensates by specifying the return shapes for both modes: the contract's step ids, artifacts, closing conditions, terminal words, precedence, retention, and the verdict's blocking step, refused predicate, and reason. Combined with the safety/cost hints (free, unmetered, read-only) and explicit comparison to the offline gate, an agent has enough to call and interpret the tool correctly.

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?

Input schema description coverage is 100%, so the baseline is 3: both `files` and `through_step` are already fully documented, including bounds, omission behavior, and default. The description adds operational flavor ('the gate says what is missing') and maps `files` to the verdict mode, but it does not materially expand parameter meaning beyond the schema; `through_step` is only covered in 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 opens with a precise verb-phrase, 'Read the canonical twelve-step run contract, or check a run bundle against it,' naming the resource and the dual execution modes. It goes on to list exactly what each call returns, making the tool distinguishable from sibling tools like evaluate_repo, fix_repo, and run_gauntlet without needing their 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?

It explicitly says 'Call it with no files to get the contract itself' and 'Call it with files ... to get the machine verdict,' prescribing the exact invocation for each purpose. It also contrasts the connected MCP tool with the offline 'tools/run-gate.mjs' and closes with a strong when-not-to-instruct: 'Never infer a step, reorder one, or declare a run finished on your own reading — run the gate and report its word.'

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.7/5.0
Disambiguation3/5

Most tools have distinct roles, but the capability-discovery cluster is genuinely confusable: compose_capability calls itself 'the harvest lane' while harvest_repo is 'the harvest,' and evaluate_repo with a key also identifies candidates and composes — an agent must read long descriptions carefully to pick correctly. The free/key mode-switching also makes each tool's effective behavior conditional, raising misselection risk.

Naming Consistency4/5

The dominant pattern is verb_noun (build_intent, evaluate_repo, fix_repo, harvest_repo, list_repos, pin_source, run_contract, run_gauntlet, write_to_repo), and the library_document/library_index/library_search trio follows a deliberate resource-prefix convention. A few outliers break the pattern — welcome (bare verb), selfcheck_mcp, and subscription_status — but they are a small minority and still readable.

Tool Count4/5

At 17 tools the set is slightly past the ideal 3-15 range, but the domain genuinely spans an audit pipeline, a capability library, run orchestration, repo write-back, and billing/onboarding meta-tools. Roughly a third are lightweight informational endpoints (welcome, method_protocol, run_contract, library_index, subscription_status, selfcheck_mcp), which adds surface area, but each has a distinct job and none is redundant.

Completeness4/5

The lifecycle is well covered: pin_source → evaluate_repo → fix_repo → harvest_repo → compose_capability → write_to_repo, with run_gauntlet orchestrating the whole path and run_contract/method_protocol providing gates and discipline. Minor gaps exist — write_to_repo is create-only with no PR update/merge/close, and past run state is only resumable via ledger_digest — but there are no dead ends.

Resources