Skip to main content
Glama
Infinite Code Next

Infinite Code Next

by Kawai-Senpai

memory

Inspect, verify, and correct stored knowledge to keep outdated or wrong facts from misleading future agents; browse, update, supersede, resolve, and track audit history.

Instructions

Inspect and correct stored knowledge.

WHEN TO USE: when a memory surfaced with anchor_status other than ACTIVE and you have just confirmed whether it still holds, or when something stored is wrong. A memory that is merely out of date should be corrected or superseded, never left to rot - an unverified fact costs the next agent more than no fact at all. AFTER THIS: continue the task. Use action='verify' the moment you have the evidence, while you still have it.

Actions: list browse memories, filterable by kind, status, anchor_status. Bodies are included, so this reads many at once rather than costing one get() per memory. get one memory with its anchors, edges and version history. Re-anchoring logs are summarised; action='history' has them raw. history the full re-anchoring audit trail for one memory. verify confirm a memory still applies. Clears NEEDS_REVIEW/DRIFTED. correct edit a memory in place. Previous text is versioned, not lost. supersede replace a memory, keeping both and the link between them. resolve mark a warning or bug as no longer live. guard record that an existing test covers an existing rule, when the two were written in separate calls. Pass the rule as memory_id and the test_evidence memory id as body. reanchor re-run the anchoring cascade for one memory. feedback vote on a memory you were shown: signal='helpful', 'not_helpful', 'stale' or 'wrong' (stale and wrong need a reason). Wrong or repeatedly unhelpful memories stop being volunteered by hooks; nothing is deleted.

Knowledge ICN derived itself, rather than being told. These are proposals: they are down-ranked in search and never treated as rules until settled. infer look for patterns across stored knowledge and the call graph, and propose what they imply. Writes nothing but unreviewed candidates. Safe to re-run: a proposal already made, or already declined, is not raised again. review_queue the proposals awaiting a decision, best-supported first. review settle one: memory_id plus signal='approve' (promote it to a stated fact), 'decline' (forget it), or 'undo'.

Handoffs, "where I left off" for the next session (claimed exactly once, by its session-start hook or workspace(action='open')): handoff write one before stopping mid-task: body=summary, plus open_questions, next_steps, files. handoff_list recent handoffs and their status, without claiming. handoff_cancel withdraw an open one (memory_id=handoff id).

Rules promoted into this repository's CLAUDE.md and AGENTS.md, a small capped block changed only by these commands: rules_recommend ranked, codebase-specific candidates. Read-only. rules_approve promote memory_id (body= optional wording). Refused at the cap, naming the weakest rule to remove first. rules_edit reword a promoted rule (body=). rules_remove demote; the memory itself is unchanged. rules_list what is promoted, and which rules have gone stale. Promote only on the user's say-so: these edit files they own.

Args: action: one of the actions above. memory_id: target memory. body: new text for correct and supersede. kind: new kind for correct, or a filter for list. severity: new severity for correct. status: filter for list (ACTIVE, SUPERSEDED, RESOLVED). anchor_status: filter for list (ACTIVE, NEEDS_REVIEW, DRIFTED, ORPHANED). reason: why the change is being made. Recorded. actor: 'agent' or 'human'. limit: maximum rows for list. offset: rows to skip for list. With total and next_offset in the reply, this pages through a filter larger than one call can carry. signal: for feedback. open_questions: for handoff. next_steps: for handoff. files: for handoff. root: repository path. Defaults to the server's working directory.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNo
kindNo
rootNo
actorNoagent
filesNo
limitNo
actionNolist
offsetNo
reasonNo
signalNo
statusNo
severityNo
memory_idNo
next_stepsNo
anchor_statusNo
open_questionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that correct() versions rather than discards prior text, that supersede() keeps both memories and the link, that feedback-driven suppression deletes nothing, that infer() writes only unreviewed candidates and is idempotent on re-run, that rules_approve is refused at a cap naming the weakest rule, and that handoffs are claimed exactly once. The only gap is error/atomicity behavior on partial failures.

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?

Well structured and front-loaded: WHEN TO USE, then actions grouped by functional family (core, inference, handoff, rules), then args. The length is justified by ~20 actions, but a few passages are motivational rather than operational ("an unverified fact costs the next agent more than no fact at all") and the Args list duplicates per-action prose already given above.

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 16-parameter, 20-action multiplexed tool with an output schema available, this covers everything an agent needs: trigger conditions, per-action semantics, side effects, pagination via limit/offset with total and next_offset, and repository scoping via root. Return-value formatting is correctly left to the 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 0%, so the Args section is doing all the work — and it does document all 16 parameters, including enum values the schema lacks (status ACTIVE/SUPERSEDED/RESOLVED, anchor_status ACTIVE/NEEDS_REVIEW/DRIFTED/ORPHANED, feedback signal values). It falls short of 5 because a few entries are thin (kind and severity list no allowed values, actor's meaning is stated but not its effect) and the defaults in the schema (action='list', limit=30) are never restated.

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?

Opens with a specific verb+resource ("Inspect and correct stored knowledge") and then enumerates ~20 named actions with a one-line purpose each, so an agent can map intent to action without opening the schema. It also clearly separates itself from sibling concerns like record/graph/workspace by scoping itself to stored knowledge and repository rules files.

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?

Has an explicit WHEN TO USE block tied to a concrete trigger (anchor_status other than ACTIVE plus freshly confirmed evidence) and an AFTER THIS continuation instruction. It also states an explicit precondition for the rules_* family ("Promote only on the user's say-so") and distinguishes review/verify/supersede/correct as alternatives for different situations.

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