Skip to main content
Glama

hub_card_set

Create or update a project card from a name and digest without a local git checkout; patch individual stale lines with replace or appendLine while preserving frontmatter and Facts.

Instructions

Create or update a project card from just a name and a digest — no folder needed (unlike hub_sync). Use it to capture a project that is not a local git checkout, e.g. when harvesting a dialog. Preserves any hand-written frontmatter and Facts. To fix ONE stale line without touching the owner's framing, patch instead of replacing: replace: [{from, to}] and/or appendLine — a from that is not in the digest is an error, not a silent no-op.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>",
      "by": "<by>"
    },
    "name": "hub_card_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
byYesthe function you are performing, e.g. "dev-hubd". NOT which model you are — that is read from the transcript, and many sessions share a model. NOT a queue role either: a role is a mailbox (see hub_queue_wait), this is who is at it.
digestNothe card digest: 3-6 lines of current state (replaces the whole text — omit it when patching). Enforced, not advised: a digest over the hub's limit is refused, and so is an appendLine that starts with a date — a dated line is an event and belongs in hub_report, which writes the card section AND the journal.
projectYesproject name or slug
replaceNopatch: exact substrings to swap, each must occur exactly once in the current digest
verboseNoreturn the card path, the patches applied and the new digest; by default the reply is {ok, project, section, bytes} (plus patched: <count> and rotated when they happened) — you just wrote the text, it is not echoed back
appendLineNopatch: one line to add at the end of the current digest

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.88
    • changedInput schema / properties / digest / description
      Previous value: -"the card digest: 3-6 lines of current state (replaces the whole text — omit it when patching)"New value: +"the card digest: 3-6 lines of current state (replaces the whole text — omit it when patching). Enforced, not advised: a digest over the hub's limit is refused, and so is an appendLine that starts with a date — a dated line is an event and belongs in hub_report, which writes the card section AND the journal."
    • addedInput schema / properties / verbose
      Added value: +{
      +  "description": "return the card path, the patches applied and the new digest; by default the reply is {ok, project, section, bytes} (plus patched: <count> and rotated when they happened) — you just wrote the text, it is not echoed back",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv0.9.15
    • addedInput schema / properties / appendLine
      Added value: +{
      +  "description": "patch: one line to add at the end of the current digest",
      +  "type": "string"
      +}
    • changedInput schema / properties / digest / description
      Previous value: -"the card digest: 3-6 lines of current state"New value: +"the card digest: 3-6 lines of current state (replaces the whole text — omit it when patching)"
    • addedInput schema / properties / replace
      Added value: +{
      +  "description": "patch: exact substrings to swap, each must occur exactly once in the current digest",
      +  "items": {
      +    "properties": {
      +      "from": {
      +        "type": "string"
      +      },
      +      "to": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "from",
      +      "to"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "project",
      -  "digest",
      -  "by"
      -]New value: +[
      +  "project",
      +  "by"
      +]
  3. Changed2 schema fields changedv0.5.0
    • changedInput schema / properties / by / description
      Previous value: -"who is writing"New value: +"the function you are performing, e.g. \"dev-hubd\". NOT which model you are — that is read from the transcript, and many sessions share a model. NOT a queue role either: a role is a mailbox (see hub_queue_wait), this is who is at it."
    • changedInput schema / required
      Previous value: -[
      -  "project",
      -  "digest"
      -]New value: +[
      +  "project",
      +  "digest",
      +  "by"
      +]
  4. First observedv0.1.6

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and covers a lot of non-obvious behavior: frontmatter and Facts are preserved across the rewrite, a missing `from` is a hard error rather than a no-op, and digest size / dated appendLine limits are enforced server-side. It omits permission/auth requirements and any concurrency or rate-limit behavior, which keeps it short of a 5 for a mutation tool with zero annotation coverage.

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 purpose and the sibling contrast are front-loaded in the first sentence, with patching guidance following in priority order and the failure rule last. It is dense — several behaviors are packed into em-dash clauses — but no sentence is filler and nothing is buried ahead of the core action.

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 six-parameter mutating tool with no annotations and no output schema, the description supplies the key missing context: what input is sufficient, what is preserved, how patching differs from replacing, and where the default reply shape is defined. The main residual gaps are auth/permission expectations and what happens on the `hub_sync`-style folder-backed path.

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 still adds meaning by framing `replace`/`appendLine` as a patch mode that trades off against full-digest replacement, and by stating the failure semantics of an unmatched `from`. It does not re-explain `by` or `verbose`, which is correct since the schema already handles those at length.

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 opening clause names a specific verb pair and resource ("Create or update a project card") and immediately scopes the input ("from just a name and a digest — no folder needed"), then explicitly contrasts with the sibling hub_sync. An agent can distinguish this from hub_sync or hub_report without opening any schema.

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 gives an explicit use condition ("a project that is not a local git checkout, e.g. when harvesting a dialog") and an explicit alternative for the other case (hub_sync for folder-backed projects). It further routes the patch-vs-replace decision ("To fix ONE stale line ... patch instead of replacing") and sends dated events to hub_report, so both when-to-use and when-not-to-use are covered.

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