Skip to main content
Glama

kage_learn

Capture verified learnings from a session as repo-local memory packets, grounded in code with citation validation. Preserve decisions, bug fixes, and conventions for future team recall via git-tracked JSON.

Instructions

Capture a durable, reusable learning from the current session as a verified repo-local memory packet (committed under .agent_memory/, shared with the team via git). Use it the moment you discover something a future session should know: a decision and its rationale, a bug's root cause and fix, a convention, or a setup step. Prefer it over diff-based proposals when you already know what was learned. The write is rejected if every cited path is missing from the repo (set allow_missing_paths for a file you are about to create), and secrets/PII are scanned out before writing. Returns the new packet id plus any contradiction warnings against existing memory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirYesAbsolute path to the repository root.
learningYesThe insight to store, in full sentences: what was learned and why it matters to a future session.
titleNoShort headline for the packet. Derived from the learning if omitted.
typeNoMemory type: decision, bug_fix, runbook, convention, gotcha, workflow, code_explanation. Inferred if omitted.
evidenceNoHow the learning was confirmed (e.g. test output, a reproduced behavior).
verified_byNoWhat verified it (e.g. a command run, a passing test, a reviewer).
tagsNoOptional keywords to aid future recall.
pathsNoRepo files this memory is about; used to verify the citation now and to recall the memory when those files are touched later.
stackNoOptional technologies/frameworks the learning relates to.
graph_nodesNoOptional code-graph symbol or file ids this memory is grounded to.
allow_missing_pathsNoAllow the write even if cited paths do not exist yet (e.g. a file you are about to create).
discovery_tokensNoApproximate token cost of producing this knowledge (exploration + reasoning). Stored on the packet so recall receipts can report replay value; a conservative per-type default is estimated when omitted.
Behavior4/5

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

While annotations only indicate readOnlyHint=false, the description adds significant behavioral context: write rejection conditions, secrets scanning, return of packet id and contradiction warnings. It does not detail all possible behaviors but provides enough for safe usage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured paragraph of five sentences. It is front-loaded with the main purpose, and every sentence adds essential context without redundancy.

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?

Given 12 parameters and no output schema, the description covers the key behavioral aspects: what it does, when to use, constraints (path existence, secrets), and return value (packet id and warnings). This is complete for an experienced agent.

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. The description adds value by explaining parameter relationships (e.g., 'Derived from the learning if omitted' for title, 'Inferred if omitted' for type) and special cases like allow_missing_paths. This goes beyond the schema descriptions.

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 description clearly states the tool captures durable learning as a repo-local memory packet, specifying verb, resource, and distinguishing from siblings like diff-based proposals. It provides explicit examples of when to use (decisions, bug fixes, conventions) and mentions it's preferred over alternatives.

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?

The description gives explicit guidance: use it when you discover something a future session should know, and prefer it over diff-based proposals. It also mentions conditions (rejected if paths missing, allow_missing_paths for new files) and that secrets/PII are scanned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kage-core/Kage'

If you have feedback or need assistance with the MCP directory API, please join our Discord server