Skip to main content
Glama

Ask the wiki

wiki_query
Read-onlyIdempotent

Find prior decisions and fixes by querying wiki pages and raw session transcripts with keyword-ranked results and optional project, type, tag, lifecycle, and date filters.

Instructions

Start here for questions about the user's past work ('what did I decide about X'), in any language: session pages keep the user's original request. Ranks wiki/ pages by keyword matches, rare words weighted higher (no LLM, no embeddings). Service pages are skipped; project hubs rank below sessions. Pages sharing a tool or topic name with two or more top hits rank too, marked 'via '. If no wiki page matches, falls back to raw transcripts (see include_raw). Returns up to max_pages paths, each with a status line (type, lifecycle, confidence, date, sources; raw hits marked not yet in wiki) and a ~400-character snippet, plus the start of overview.md (index.md when nothing matches). max_pages clamps to 1-50. Optional filters: project and type match frontmatter exactly; tag equals one whole tag, ignoring case; lifecycle takes comma-separated states; date_from/date_to are YYYY-MM-DD, invalid dates ignored. Filters apply to both layers. Open a full page with wiki_read_page; use wiki_search for exact wording.

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": {
      "question": "<question>"
    },
    "name": "wiki_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoOnly pages with this tag, e.g. the agent: claude-code, codex-cli, zcode, opencode.
typeNoOnly this page type: source, entity, concept, synthesis, ...
date_toNoOnly pages dated on or before YYYY-MM-DD.
projectNoOnly pages of this project (frontmatter project).
questionYesNatural-language question or keyword(s) to search for.
date_fromNoOnly pages dated on or after YYYY-MM-DD.
lifecycleNoOnly pages in these lifecycle states, comma-separated: draft, reviewed, verified, stale, archived.
max_pagesNoMaximum pages to return (default 5). Values are clamped to 1-50.
include_rawNoRaw session transcripts: true = always rank them too, false = never. Omit it to read them only when no wiki page matches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.2.0
    • addedInput schema / properties / lifecycle
      Added value: +{
      +  "description": "Only pages in these lifecycle states, comma-separated: draft, reviewed, verified, stale, archived.",
      +  "type": "string"
      +}
    • changedInput schema / properties / max_pages / description
      Previous value: -"Maximum pages to return (default 5)."New value: +"Maximum pages to return (default 5). Values are clamped to 1-50."
    • addedInput schema / properties / max_pages / maximum
      Added value: +50
    • addedInput schema / properties / max_pages / minimum
      Added value: +1
  2. Changed5 schema fields changedv2.1.0
    • addedInput schema / properties / date_from
      Added value: +{
      +  "description": "Only pages dated on or after YYYY-MM-DD.",
      +  "type": "string"
      +}
    • addedInput schema / properties / date_to
      Added value: +{
      +  "description": "Only pages dated on or before YYYY-MM-DD.",
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Only pages of this project (frontmatter project).",
      +  "type": "string"
      +}
    • addedInput schema / properties / tag
      Added value: +{
      +  "description": "Only pages with this tag, e.g. the agent: claude-code, codex-cli, zcode, opencode.",
      +  "type": "string"
      +}
    • addedInput schema / properties / type
      Added value: +{
      +  "description": "Only this page type: source, entity, concept, synthesis, ...",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv2.0.5
    • addedInput schema / properties / include_raw
      Added value: +{
      +  "description": "Raw session transcripts: true = always rank them too, false = never. Omit it to read them only when no wiki page matches.",
      +  "type": "boolean"
      +}
  4. First observedv2.0.2

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered by structured data. The description nevertheless adds genuine behavioral context beyond annotations: no LLM/embeddings, rare-word weighting, service pages skipped, project hubs ranked below sessions, 'via <name>' expansion, and the fallback to raw transcripts. It stops short of describing pagination or ranking scores, but the added ranking and fallback mechanics are substantive.

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-loaded with the routing sentence first, then ranking, then fallback, then return shape, then filters, then sibling pointers – a sensible order with no filler. It is dense and long-ish, and the filter paragraph packs several distinct rules into one block, which costs a point on scannability.

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?

No output schema exists, yet the description details the return payload: up to max_pages paths with a status line (type, lifecycle, confidence, date, sources), a ~400-character snippet, and the overview.md/index.md prefix. Combined with the fallback and filter rules, nothing needed to call or interpret the result is missing for a 9-parameter tool.

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 earns an extra point by specifying things the schema does not, namely that tag matching is whole-tag and case-insensitive, that invalid dates are silently ignored, that filters match frontmatter exactly, and that filters apply to both the wiki and raw layers. Only include_raw is largely restated rather than extended.

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 pairing ('ask the wiki' about the user's past work), gives a concrete example query, and explicitly separates itself from siblings by naming wiki_read_page for full pages and wiki_search for exact wording. An agent knows immediately this is the semantic/ranked entry point.

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?

Explicit 'start here' guidance with the trigger spelled out ('what did I decide about X'), plus two named alternatives with their selecting conditions (wiki_read_page for opening a page, wiki_search for exact wording). Exclusions and routing are fully specified.

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