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 a connected run and an offline run cannot disagree about whether a run is finished. 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.1/5.0
Behavior5/5

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

The description goes well beyond the annotations by explaining that the tool is stateless, unmetered, bounded in input size, and collapses identical diagnostics. It also reveals the consistency guarantee with the offline `tools/run-gate.mjs`, which is important behavioral information an agent could not derive from annotations or schema alone.

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 longer than average but each sentence adds meaningful information: modes, output semantics, limits, consistency, and usage directive. It is front-loaded with the core purpose, though a few phrases could be tightened without loss.

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 tool with no output schema, the description adequately explains what the agent will receive in both modes: the contract details when no files are passed, and the blocking step, refused predicate, and reason when files are passed. It also covers input bounds, statelessness, and the correct agent behavior, making it complete for reliable invocation.

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?

Schema description coverage is 100%, so the baseline is 3. The description reiterates that `files` is a map of run-folder paths to text and that omitting it reads the contract, but it does not add substantial new parameter semantics beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb and resource: 'Read the canonical twelve-step run contract, or check a run bundle against it.' It also distinguishes the two main modes of the tool. It does not explicitly differentiate from sibling tools such as run_gauntlet, so it falls just short of a 5.

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 usage context: call with no `files` to read the contract, call with `files` to evaluate a run bundle. It also gives a strong directive: 'Never infer a step, reorder one, or declare a run finished on your own reading — run the gate and report its word.' It does not mention alternatives or exclusions explicitly, so it is not a 5.

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