Skip to main content
Glama

misakanet_memory_context

Read-onlyIdempotent

Retrieve relevant failure-memory lessons before starting a task so past errors inform the first step. Provide concrete tool, system, or error terms to surface matching lessons.

Instructions

Proactive half of the pair: call this BEFORE starting a task so failure-memory is in context from the first step; call misakanet_search once a specific error has actually appeared.

Choosing among the three retrieval tools: no error yet and a task about to start → memory_context; an actual error or keyword in hand → search; something risky about to run and no error yet → preflight. Not for: a specific error you already have (that is search) or a risk verdict (that is preflight). Input semantics: task is required and is matched as lexical keyword/token overlap over lesson titles, summaries and tags (BM25 when the index is present, a plain scorer otherwise) — not embeddings — so pass the concrete nouns, tools and error words you are about to meet ('chromadb on an NTFS mount', 'docker multi-stage build OOM') rather than a goal ('make it faster'); intent-only phrasing retrieves nothing. How domain behaves: a hard filter over a closed vocabulary of the domains the lesson corpus declares (the repository's data/domains.json is the list; rag, devops, fanuc, python, ci, mcp are examples), and a value outside it returns zero lessons with no error — so leave it out unless you know the domain; an empty result with a domain set is usually the filter, not an empty corpus. How top_n behaves: silently clamped to 10 (larger values are accepted and reduced), and each lesson is trimmed to 200 characters per field inside context_block — past roughly five matches you spend prompt space faster than you gain information. Output schema: Returns {task, lesson_count, lessons, context_block}; context_block is ready-to-inject markdown, and lesson_count 0 (voice='failure-warning') means the corpus has no match yet — retry with the raw error text or submit an intake, rather than reading it as a tool failure. Error cases: a missing or empty task returns {error, hint, voice} instead of lessons; a domain outside the declared vocabulary returns zero lessons rather than an error; a missing or empty index degrades to the plain lexical scorer instead of failing. Side effects: none — this is a read-only call, and it does not record usage or touch the network. Auth: none. Rate limits: none — matching runs against the lessons/ directory of the checkout this server was started from, so results are only as current as that checkout. Local stdio server only — the hosted endpoint exposes misakanet_search and misakanet_get_lesson instead.

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": {
      "task": "<task>"
    },
    "name": "misakanet_memory_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskYesWhat you are about to do, in the vocabulary of the tools, systems and errors involved (e.g. 'set up a ChromaDB RAG pipeline on WSL', 'deploy FastAPI behind a corporate proxy'). Matched lexically, so include the distinctive terms a lesson would use in its title or problem statement.
top_nNoHow many lessons to return (default 5). Values above 10 are accepted and silently clamped to 10. Each returned lesson is truncated to 200 characters per field in context_block, so ~5 is where extra matches start costing more prompt budget than they add.
domainNoOptional hard filter on the lesson's frontmatter domain, from a closed vocabulary (e.g. 'rag', 'devops', 'fanuc', 'python', 'ci', 'mcp'). It narrows and never widens: an unknown value yields zero lessons without an error, so omit it when unsure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.31.1
    • changedInput schema / properties / domain / description
      Previous value: -"Optional domain filter (e.g. 'search-and-retrieval', 'ci-cd')."New value: +"Optional hard filter on the lesson's frontmatter domain, from a closed vocabulary (e.g. 'rag', 'devops', 'fanuc', 'python', 'ci', 'mcp'). It narrows and never widens: an unknown value yields zero lessons without an error, so omit it when unsure."
    • changedInput schema / properties / task / description
      Previous value: -"Task description (e.g. 'set up ChromaDB RAG pipeline', 'deploy FastAPI to production')."New value: +"What you are about to do, in the vocabulary of the tools, systems and errors involved (e.g. 'set up a ChromaDB RAG pipeline on WSL', 'deploy FastAPI behind a corporate proxy'). Matched lexically, so include the distinctive terms a lesson would use in its title or problem statement."
    • changedInput schema / properties / top_n / description
      Previous value: -"Number of lessons to retrieve (default 5, max 10)."New value: +"How many lessons to return (default 5). Values above 10 are accepted and silently clamped to 10. Each returned lesson is truncated to 200 characters per field in context_block, so ~5 is where extra matches start costing more prompt budget than they add."
  2. Addedv2.21.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, but the description adds substantial operational context: no side effects or usage recording, no auth, no rate limits, results only as current as the local checkout, silent degradation to a plain lexical scorer when the index is missing, and empty-result semantics (lesson_count 0 is not a tool failure). The one tension is 'does not touch the network / local stdio server only' against openWorldHint=true, though that hint plausibly refers to the open-ended lesson corpus rather than network I/O, so it is not a direct contradiction.

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 decision, which is the highest-value information, and organized into labeled segments (choosing among tools, input semantics, output schema, error cases, side effects). It is long for a 3-parameter tool and the 'Not for:' clause plus the domain/top_n paragraphs duplicate what the schema already says verbatim.

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?

Covers everything an agent needs despite there being no output schema: return shape ({task, lesson_count, lessons, context_block}), what context_block is for, error cases (missing task returns {error, hint, voice}; bad domain returns zero lessons), degradation paths, and the hosted-endpoint caveat that this tool is not available there.

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% and the schema already documents clamping, truncation and the closed domain vocabulary, so the description largely repeats it. It does add genuinely new meaning: matching is lexical token overlap (BM25 or plain scorer), explicitly NOT embeddings, so the agent must pass concrete nouns and error words rather than goals, plus the diagnostic that an empty result with a domain set is usually the filter rather than an empty corpus.

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 first sentence names a specific verb+resource (retrieve failure-memory context before a task) and explicitly positions it against misakanet_search and misakanet_preflight. An agent can pick this tool from the sibling list 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?

Gives explicit routing rules with conditions on both sides: no error yet + task about to start → memory_context; an actual error/keyword in hand → search; risky action with no error → preflight. The 'Not for:' sentence restates the exclusions so mis-selection is hard.

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