Cardloom

v1.1.2
io.github.bangca85/cardloom-mcp Checked 2 days ago Published 9 days ago

Reviewed, git-backed engineering knowledge base for coding agents, served over MCP.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

save_learning_draft Save Learning Draft

Save a new knowledge card. Cards from an agent always start in status "draft" — verification is a separate, later action.

ParameterTypeDescription
applies_to *arrayProject/target identifiers this card applies to
body *stringCard body in GitHub-flavored Markdown — never continuous prose. Break it into `##` sections (adapt names to the card type, e.g. Context/Decision/Why for a decision, or Symptom/Root Cause/Fix for a g…
provenance *stringHow this learning was derived
scope *stringApplicability scope
source_commit *stringCommit this learning came from: a bare sha (7-40 hex), nothing else, when there is one. Free text here ("working tree", "local changes") means merge promotion can never verify the card.
stack *arrayTech stack tags this card applies to
title *stringCard title (combined with type to derive the immutable card id)
type *stringCard type
version_range *stringSemver range this card applies to
conflicts_witharrayIds explicitly declared as conflicting with this card
domainstringOptional domain facet
error_signaturestringRequired (non-empty) when type is "gotcha"
projectstringProject key from the repo's .knowledge-map.yaml, e.g. "acme/billing-api". Only for scope "project" cards; lowercased and trimmed on save, and a filesystem path is rejected.
sensitivitystringDefaults to "normal"
source_repostringGitHub "owner/name" of the repo source_commit belongs to. Set it whenever source_commit is a sha: it is how merge promotion finds the commit and checks it reached the default branch.
supersedesstringId of an existing card this one supersedes — recorded as a pending marker only; the old card is left unchanged
task_typestringOptional task-type facet

search_knowledge Search Knowledge

Search knowledge cards by keyword or verbatim error message. Pass `context` (stack + versions read from your .knowledge-map.yaml) so results rank by facet relevance, not just text match; also pass `project` (and `aliases`) from the same file in `context`. Each result has a `match` label; `match: "related"` or `no_direct_match: true` means only partial matches were found, so use them as leads, not answers, and a `hint` appears when the store has no verified cards. Returns compact snippets only, never full card bodies. Every response carries a write_back_reminder: after using a returned card you…

ParameterTypeDescription
query *stringSearch query — keywords or a verbatim error message
contextobjectCaller repo context — read by the agent/client from .knowledge-map.yaml, the server does not read it itself
include_deprecatedbooleanInclude deprecated cards
include_draftsbooleanInclude draft cards (labeled untrusted)
include_restrictedbooleanInclude sensitivity:restricted cards
limitnumberMax results (default 10)

get_card Get Card

Read a single knowledge card by id — full metadata, body, trust, and status labels (draft -> untrusted, deprecated -> deprecated + reason, restricted -> restricted). Same content as the knowledge://card/{id} Resource. Every response carries a write_back_reminder: after using this card you MUST call report_card_usage(id, outcome).

ParameterTypeDescription
id *stringCard id, e.g. "pattern-use-x-pattern"

report_card_usage Report Card Usage

Report the outcome of using a card you got from search_knowledge or get_card. This is mandatory: every card you use, you MUST report back with confirmed (it worked), refuted (it was wrong/outdated), or neutral (inconclusive). This is how trust scores and needs_review flags stay accurate.

ParameterTypeDescription
id *stringCard id
outcome *stringOne of: confirmed, refuted, neutral
repostringOptional identifier for the repo this usage happened in

update_card_status Update Card Status

Change a card's status. action="verify" (draft -> verified, only after a human reviewer approves it) or action="deprecate" (draft/verified -> deprecated, requires reason; the file is kept, never deleted — FR3). deprecated is terminal, there is no un-deprecate. Any other transition returns invalid_transition with the valid options.

ParameterTypeDescription
action *stringOne of: verify, deprecate
id *stringCard id
bystringWho performed this action — defaults to REVIEWER_NAME or "human-reviewer"
reasonstringRequired when action is "deprecate"
verification_methodstringHow the card was verified, for action "verify" — defaults to "chat-approval". When approving a candidate from `npm run promote-merged`, pass the evidence it printed (e.g. "merged:owner/repo@sha+chat…