Skip to main content
Glama

SHPBL: Repository Audit & Repair

Harvest capability out of a repository

harvest_repo
Read-onlyIdempotent

The harvest shortcut: point it at a repository you hold a licence to reuse — one you do not own and will never open a pull request against — and it goes straight to the capabilities. It reads what that repository can already do, fuses those affordances with the owned SHPBL capability library, ranks and names the results as proposals a person can read, stops for your decision on each one, and then emits the seed modules for exactly the ones you approved into your own .shpbl/ library. That is the gauntlet's steps 8, 9 and 10 without the audit, the repair plan or the pull request. It never writes to the target repository. Pass approve with approved_by and host_license to collect the approved grants; pass mode: "walk" for the older batched ledger walk of the whole tree (estimate, part, ledger_digest, budget belong to that mode). Free calls report what the repository can do and what is offerable against it, then stop at the composition boundary; grants need a Practitioner key (7-day free trial).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoYour SHPBL Practitioner subscription key (shpbl_mcp_…). Optional if your client sends it as the `Authorization: Bearer …` request header.
modeNo`harvest` (the default when nothing else in the call implies a walk) is the shortcut: proposals, your decision, then the seed modules for what you approved. `walk` is the older batched ledger walk of the whole tree, which reads and classifies but composes nothing. Send it explicitly whenever you also send `part`, `ledger_digest`, `budget` or `brief`.
partNoWalk mode only: which batch to return, 1 to 2000. Batch 1 carries the protocol and the manifest; walk them all in order.
repoYesA GitHub repository: `owner/repo` or a URL.
briefNoWalk mode only: skip the harvest protocol preamble on batch 1 and spend the payload on source. Use it once you already hold the method — `method_protocol` (free) returns it verbatim.
pagesNoHarvest mode: how many source pages to read for evidence, 1 to 12 (about 90,000 characters each). Proposals are cut only from what was actually read.
budgetNoCharacters per batch — a whole number from 10,000 to 120,000. Defaults to 90000; lower it for a smaller context window, raise it only if the client can carry it. Out-of-range values are refused in plain words, not silently clamped.
grantsNoHarvest mode: how many capability proposals to rank, 1 to 200. There is no fixed shallow ceiling any more — a sophisticated repository can support far more than a couple of dozen higher-order compositions, and the safeguard against a weak proposal is the approval and the Capability Contract, not a small number here.
approveNoHarvest mode: the grant ids the person approved. Only these are emitted. Omit it on the first call — the proposals have to be put to them first. An id nobody proposed refuses the whole set rather than emitting the rest.
declineNoHarvest mode: the grant ids the person explicitly said no to. Only these are recorded as declined; anything they were not asked about stays open and is re-offered, never written down as a refusal.
includeNoOptional path filter — only paths containing this text are harvested.
estimateNoReturn the size of the walk only — batch count, total characters, largest batch, split files — with no source.
approved_byNoThe name of the person who approved them. Required with `approve`. An agent, a model, a vendor, a policy or a default is refused, not recorded.
cml_licenseNoYour perpetual copy's licence key, if you hold one. It changes retention, never depth.
github_tokenNoOptional GitHub token (Contents: read) for a private repository. Not needed if the SHPBL GitHub App is connected to this key.
governor_keyNoOperator passphrase for SHPBL's own copy. Resolved by the server; it changes only where the harvest is staged, never what is proposed.
host_licenseNoWhat the target repository's licence permits for this reuse, and any obligation it attaches — for example `MIT, attribution required`. Required with `approve`; SHPBL records your declaration and does not verify it.
ledger_digestNoThe ledger folded so far, handed back by a previous session so this batch continues the same run instead of starting over.
quality_floorNoHarvest mode: drop proposals scoring below this, 0 to 1. The score is a discovery aid for ordering what to read first — it is never evidence that a capability deserves to exist.
per_affordanceNoHarvest mode: how many proposals one host affordance may produce, 1 to 200.
reuse_permittedNoRequired with `approve`: the person's explicit statement that reuse of this upstream project is permitted for this composition. Absence is never a yes, and SHPBL does not infer permission from a detected licence file. Recording your declaration is not legal verification and nothing here is legal advice.
upstream_projectNoThe upstream project the reuse is declared against. Defaults to the repository being harvested.
novelty_thresholdNoHarvest mode: how different a proposal must be from the higher-ranked ones already chosen, 0 to 1, measured on bound capabilities and title vocabulary. 0 suppresses only exact duplicates; 0.4 is firm de-duplication of near-identical variants.
reuse_obligationsNoThe obligations the licence attaches that must be preserved in the artifact — attribution, notice retention, share-alike, and so on. Recorded against every emitted artifact and carried into its manifest.
carry_notice_filesNoLicence or notice files from the host that must be copied into the artifact. Detected candidates are reported to you if you omit this.
suppress_duplicatesNoHarvest mode: drop proposals whose proposed composition is identical to a higher-ranked one. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / per_affordance / description
      Previous value: -"Harvest mode: how many proposals one host affordance may produce, 1 to 4."New value: +"Harvest mode: how many proposals one host affordance may produce, 1 to 200."
    • changedInput schema / properties / suppress_duplicates / description
      Previous value: -"Harvest mode: drop proposals whose emitted body is byte-identical to a higher-ranked one. Default true."New value: +"Harvest mode: drop proposals whose proposed composition is identical to a higher-ranked one. Default true."
  2. Changed10 schema fields changed
    • changedInput schema / properties / approve / maxItems
      Previous value: -24New value: +200
    • addedInput schema / properties / carry_notice_files
      Added value: +{
      +  "description": "Licence or notice files from the host that must be copied into the artifact. Detected candidates are reported to you if you omit this.",
      +  "items": {
      +    "maxLength": 300,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 40,
      +  "type": "array"
      +}
    • changedInput schema / properties / decline / maxItems
      Previous value: -24New value: +200
    • changedInput schema / properties / grants / description
      Previous value: -"Harvest mode: how many capability proposals to rank, 1 to 24."New value: +"Harvest mode: how many capability proposals to rank, 1 to 200. There is no fixed shallow ceiling any more — a sophisticated repository can support far more than a couple of dozen higher-order compositions, and the safeguard against a weak proposal is the approval and the Capability Contract, not a small number here."
    • addedInput schema / properties / novelty_threshold
      Added value: +{
      +  "description": "Harvest mode: how different a proposal must be from the higher-ranked ones already chosen, 0 to 1, measured on bound capabilities and title vocabulary. 0 suppresses only exact duplicates; 0.4 is firm de-duplication of near-identical variants.",
      +  "type": "number"
      +}
    • addedInput schema / properties / quality_floor
      Added value: +{
      +  "description": "Harvest mode: drop proposals scoring below this, 0 to 1. The score is a discovery aid for ordering what to read first — it is never evidence that a capability deserves to exist.",
      +  "type": "number"
      +}
    • addedInput schema / properties / reuse_obligations
      Added value: +{
      +  "description": "The obligations the licence attaches that must be preserved in the artifact — attribution, notice retention, share-alike, and so on. Recorded against every emitted artifact and carried into its manifest.",
      +  "items": {
      +    "maxLength": 300,
      +    "minLength": 2,
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / properties / reuse_permitted
      Added value: +{
      +  "description": "Required with `approve`: the person's explicit statement that reuse of this upstream project is permitted for this composition. Absence is never a yes, and SHPBL does not infer permission from a detected licence file. Recording your declaration is not legal verification and nothing here is legal advice.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / suppress_duplicates
      Added value: +{
      +  "description": "Harvest mode: drop proposals whose emitted body is byte-identical to a higher-ranked one. Default true.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / upstream_project
      Added value: +{
      +  "description": "The upstream project the reuse is declared against. Defaults to the repository being harvested.",
      +  "maxLength": 200,
      +  "minLength": 2,
      +  "type": "string"
      +}
  3. Changed7 schema fields changed
    • changedInput schema / properties / approve / description
      Previous value: -"Harvest mode: the grant ids the person approved. Only these are emitted. Omit it on the first call — the proposals have to be put to them first."New value: +"Harvest mode: the grant ids the person approved. Only these are emitted. Omit it on the first call — the proposals have to be put to them first. An id nobody proposed refuses the whole set rather than emitting the rest."
    • removedInput schema / properties / brief / default
      Removed value: -false
    • addedInput schema / properties / decline
      Added value: +{
      +  "description": "Harvest mode: the grant ids the person explicitly said no to. Only these are recorded as declined; anything they were not asked about stays open and is re-offered, never written down as a refusal.",
      +  "items": {
      +    "maxLength": 120,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 24,
      +  "type": "array"
      +}
    • removedInput schema / properties / mode / default
      Removed value: -"harvest"
    • changedInput schema / properties / mode / description
      Previous value: -"`harvest` (default) is the shortcut: proposals, your decision, then the seed modules for what you approved. `walk` is the older batched ledger walk of the whole tree, which reads and classifies but composes nothing."New value: +"`harvest` (the default when nothing else in the call implies a walk) is the shortcut: proposals, your decision, then the seed modules for what you approved. `walk` is the older batched ledger walk of the whole tree, which reads and classifies but composes nothing. Send it explicitly whenever you also send `part`, `ledger_digest`, `budget` or `brief`."
    • removedInput schema / properties / part / default
      Removed value: -1
    • changedInput schema / properties / part / description
      Previous value: -"Which batch to return, 1 to 2000. Batch 1 carries the protocol and the manifest; walk them all in order."New value: +"Walk mode only: which batch to return, 1 to 2000. Batch 1 carries the protocol and the manifest; walk them all in order."
  4. Changed2 schema fields changed
    • addedInput schema / properties / cml_license
      Added value: +{
      +  "description": "Your perpetual copy's licence key, if you hold one. It changes retention, never depth.",
      +  "maxLength": 200,
      +  "minLength": 4,
      +  "type": "string"
      +}
    • addedInput schema / properties / governor_key
      Added value: +{
      +  "description": "Operator passphrase for SHPBL's own copy. Resolved by the server; it changes only where the harvest is staged, never what is proposed.",
      +  "maxLength": 300,
      +  "minLength": 8,
      +  "type": "string"
      +}
  5. Changed8 schema fields changed
    • addedInput schema / properties / approve
      Added value: +{
      +  "description": "Harvest mode: the grant ids the person approved. Only these are emitted. Omit it on the first call — the proposals have to be put to them first.",
      +  "items": {
      +    "maxLength": 120,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 24,
      +  "type": "array"
      +}
    • addedInput schema / properties / approved_by
      Added value: +{
      +  "description": "The name of the person who approved them. Required with `approve`. An agent, a model, a vendor, a policy or a default is refused, not recorded.",
      +  "maxLength": 120,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • changedInput schema / properties / brief / description
      Previous value: -"Skip the harvest protocol preamble on batch 1 and spend the payload on source. Use it once you already hold the method — `method_protocol` (free) returns it verbatim."New value: +"Walk mode only: skip the harvest protocol preamble on batch 1 and spend the payload on source. Use it once you already hold the method — `method_protocol` (free) returns it verbatim."
    • addedInput schema / properties / grants
      Added value: +{
      +  "default": 8,
      +  "description": "Harvest mode: how many capability proposals to rank, 1 to 24.",
      +  "type": "number"
      +}
    • addedInput schema / properties / host_license
      Added value: +{
      +  "description": "What the target repository's licence permits for this reuse, and any obligation it attaches — for example `MIT, attribution required`. Required with `approve`; SHPBL records your declaration and does not verify it.",
      +  "maxLength": 400,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / mode
      Added value: +{
      +  "default": "harvest",
      +  "description": "`harvest` (default) is the shortcut: proposals, your decision, then the seed modules for what you approved. `walk` is the older batched ledger walk of the whole tree, which reads and classifies but composes nothing.",
      +  "enum": [
      +    "harvest",
      +    "walk"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / pages
      Added value: +{
      +  "default": 4,
      +  "description": "Harvest mode: how many source pages to read for evidence, 1 to 12 (about 90,000 characters each). Proposals are cut only from what was actually read.",
      +  "type": "number"
      +}
    • addedInput schema / properties / per_affordance
      Added value: +{
      +  "default": 2,
      +  "description": "Harvest mode: how many proposals one host affordance may produce, 1 to 4.",
      +  "type": "number"
      +}
  6. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnly/openWorld/idempotent, but the description adds substantial behavioral context the annotations cannot: the approval gate ('stops for your decision on each one'), the write boundary ('never writes to the target repository'; 'emits into your own .shpbl/'), the auth model (Practitioner key, 7-day trial), and the free vs. paid boundary. It does not describe output shape, but annotations already carry the safety profile.

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

Conciseness3/5

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

Front-loaded with the core behavior, but sentences are dense and the walk-mode parenthetical ('estimate, part, ledger_digest, budget belong to that mode') is buried mid-paragraph and partially redundant with schema descriptions. It is longer than necessary for a definition whose parameters are fully documented elsewhere.

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?

For a 26-parameter, no-output-schema tool, the description covers the mental model (harvest vs. walk, approval flow, license/permission semantics, key requirement) that an agent needs. The individual parameter semantics live in the schema, which is acceptable given 100% coverage, though the two modes' parameter sets could be delineated more explicitly.

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 coverage is 100%, so every parameter is already documented in the schema. The description reinforces mode/walk semantics and the approve/approved_by/host_license requirement, but adds little syntax or format beyond the schema. Baseline 3 for high coverage.

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?

States a specific verb ('harvest capability') and resource ('repository'), and distinguishes itself from siblings by naming what it omits — 'the gauntlet's steps 8, 9 and 10 without the audit, the repair plan or the pull request.' An agent can tell this apart from run_gauntlet and compose_capability 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 Guidelines4/5

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

Gives a clear precondition ('a repository you hold a licence to reuse — one you do not own and will never open a pull request against') and an explicit mode fork ('pass mode: walk for the older batched ledger walk'). It doesn't name sibling alternatives (run_gauntlet, compose_capability) by name, but the gauntlet-relative framing effectively routes the agent.

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.

Resources