Skip to main content
Glama
cardloom-mcp

cardloom-mcp

by bangca85

Search Knowledge

search_knowledge

Search knowledge cards by keyword or verbatim error message, using project and stack context to rank matches. Returns compact snippets with match labels for direct answers vs. partial leads.

Instructions

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 MUST call report_card_usage(id, outcome).

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": {
      "query": "<query>"
    },
    "name": "search_knowledge"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 5)
queryYesSearch query — keywords or a verbatim error message
contextNoCaller repo context — read by the agent/client from .knowledge-map.yaml, the server does not read it itself
include_draftsNoInclude draft cards (labeled untrusted)
include_deprecatedNoInclude deprecated cards
include_restrictedNoInclude sensitivity:restricted cards

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses ranking behavior, the match/hint/no_direct_match response semantics, snippet-only returns, and the mandatory write-back reminder. It omits auth requirements, rate limits, and pagination behavior, which are the remaining unknowns for an unannotated tool.

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?

Front-loads the core verb and query modes, then layers ranking guidance, result interpretation, and the write-back obligation in a logical order with no filler. The semicolon-chained clauses make it denser than ideal, but every sentence conveys distinct operational information.

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 six-parameter tool with a nested context object and no output schema, the description covers everything an agent needs: what to pass, where to get the values, how to interpret match labels and hints, and the required follow-up call. The return-value shape is described inline, compensating for the absent output schema.

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 baseline is 3, but the description adds genuine meaning the schema does not: it explains that context.stack and context.versions come from the caller's .knowledge-map.yaml and that project and aliases come from the same file. That non-obvious provenance guidance is the main thing an agent could get wrong when populating the nested object.

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 and resource ("Search knowledge cards") plus the two accepted query modes: keywords or a verbatim error message. It also implicitly separates itself from get_card by declaring that it returns compact snippets and never full card bodies, so an agent can tell the retrieval tools apart without opening a schema.

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 concrete when-to-use direction: pass context from .knowledge-map.yaml so ranking is facet-based, and treat match:"related" or no_direct_match as leads rather than answers. It also mandates the follow-up call to report_card_usage. The only gap is that it never explicitly says to use get_card for full card bodies, leaving that routing to inference.

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