Skip to main content
Glama
kyle641320

TMF (True Memory Fragments)

True Memory Fragments — Stale-Context Protection for AI Coding Agents

PyPI License Python

▶ 30-second demo · Experiment results · Feedback / Discussion #1

Pinned early preview · Install rc3 · Release notes · Evidence and limits · Architecture

Stale-context protection for AI coding agents

AI coding agents often remember a call chain from an earlier session. When the code changes, that remembered chain can become dangerous: the agent may edit against an obsolete understanding of the repository.

TMF binds code-graph claims to source fingerprints. When a claim becomes stale, TMF marks the binding stale, blocks covered graph expansion, and provides current-source reread guidance. Agents must follow the integration protocol.

  • 🧭 Source-aware memory for calls, reads, writes, inheritance, and API relationships

  • 🛑 Hard stale-context stop instead of silently returning obsolete facts

  • 🔎 Localized reread guidance instead of pretending memory is authoritative

  • 🧩 Works as a library and integrates with AI coding-agent hooks

One-line summary: TMF does not make an agent remember more. It helps agents detect when source-bound code understanding is no longer fresh.

Who it is for

  • AI coding agents that work across sessions on changing repositories

  • Developers who need source-aware memory instead of stale cached facts

  • Tool authors who want conservative graph expansion with explicit stale/unknown handling

New: multi-worktree and controlled Guava continuation evidence, with an early-preview MCP stdio guide. This is developer-preview scope, not universal write enforcement.

Related MCP server: memtrace

Validated so far

  • Source-bound freshness and stale-claim detection

  • Hard stale gates that stop unsafe graph expansion

  • Deterministic Python and Java validation

  • Scoped agent experiments demonstrating stale-context prevention

TMF’s core stale-context protection mechanism has been validated in the covered scenarios. Evaluation across more languages, repositories, and long-running production workflows is ongoing.

A coding agent may understand A → B → C in session 1. In session 2, C changes, but the agent still acts as if yesterday's call chain were valid. Ordinary chat memory and vector retrieval can return the old explanation without knowing that the source changed.

TMF attaches every derived claim to the source blob or function hash. On reuse, it checks freshness. If the claim is stale, the graph expansion is stopped and the agent is told which source must be reread.

Without TMF:  remembered A → B → C  → edit using obsolete C
With TMF:     remembered A → B → C  → C is stale → stop → reread current C

What TMF is — and is not

TMF is for:

  • AI coding agents working across sessions on changing codebases

  • Preventing stale call-chain and dependency assumptions

  • Source-bound code memory and conservative code-graph navigation

  • Agent integrations that need an explicit stale/unknown result

TMF is not:

  • A general chat-memory product or vector database

  • A replacement for reading source code

  • A guarantee that every claim is correct because it is fresh

  • A proven general productivity or token-saving solution

Fresh means the source binding still matches. Correctness still comes from source and validation.

The repository also contains an unreleased Java qualification suite: 46/46 qualifiers and 731/731 checks. The historical audit baseline was 478/478 tests; it is not the current test total. See the version-pinned test verification for rc3 and master results, explicit skips, and an unresolved intermittent master failure. These are source-analysis and regression-test results, not a claim of production readiness or a general Agent outcome. Middleware mechanics are validated, and stale-context safety has positive evidence in the GUAVA M10 pre-read experiment. Broader productivity, speed, token savings, and general bug-prevention claims remain unproven. See the authoritative evidence status before making broader claims.

Flow

flowchart TD
  A[source code] --> B[TMF derive / warm]
  B --> C[source-bound claims]
  C --> D[freshness check]
  D -->|fresh| E[bounded graph context]
  D -->|stale / unknown| F[stop + reread current source]

That is the whole loop: TMF keeps claims bound to source, refuses to reuse stale context, and provides source anchors for rereading; guidance may include extra related or heuristic matches.

Demo

From a source checkout (Python 3.10+ and Git required):

git clone https://github.com/kyle641320/true-memory-fragments.git
cd true-memory-fragments
python3 scripts/demo_stale_gate.py

Already cloned? Run only the final command from the repository root. This demo imports the checkout's source; it is not a standalone PyPI wheel verification, and installing the package alone does not download the demo script.

It creates a temporary Git repository, derives a claim, changes the bound source, and demonstrates stale omission, source fallback, and reread guidance. It needs no model, network, Java parser, or pre-existing .tmf/ store.

Expected markers:

STALE CLAIM BLOCKED: PASS
SOURCE FALLBACK PROVIDED: PASS
REREAD REQUIRED: PASS

The point of the demo is not that TMF answers every query. The point is that it refuses to reuse obsolete code understanding and tells the agent what to reread next.

How it works

TMF keeps a conservative code-memory graph. Claims are useful only when their source bindings still match the working tree.

  1. Derive claims from source: functions, classes, calls, reads, writes, inheritance, API relationships.

  2. Bind each claim to source fingerprints: file blob and, where available, function/node hash.

  3. Check freshness on retrieval before a claim is used.

  4. Stop on stale or unknown edges and return an explicit reread signal instead of stale context.

claim: A calls B
binding: B.java@hash123
current: B.java@hash999
result: stale_or_unknown → reread B.java before continuing

This is intentionally conservative. Missing or stale memory falls back to source; it is never promoted into truth.

Proven Assets

  • Source-bound claim storage with working-tree freshness checks and source fallback

  • Thin retrieval discipline plus full/explain drill-down by selected claim id

  • Conservative Python functions/classes/declarations/config/API nodes and partial calls/reads/writes

  • Optional Java tree-sitter syntactic nodes and conservative inheritance edges

  • Bounded fragment query with semantic boundary detection (writes, publishes_to)

  • Async handoff marking (ASYNC_RELATIONS: publishes_to, subscribes_to, publishes_type, listens_type)

  • Four-stop-type semantics (boundary / async / stale / limit) with distinct stop_reason values

  • Bounded-query limits (4 hops / 64 nodes / 128 edges); engineering limits, not a biological validation claim

  • Held-out and self-dogfood validation harnesses

  • Local metrics and exact-blob-only rename identity

Core Premises

  • Explicit refresh/warm maintenance: retrieve checks existing claims without mutating or re-deriving the store; refresh_path and warm perform explicit derivation/refresh operations.

  • Freshness is working-tree based: binds to current working-tree blob, not commit

  • Fresh is not correct: fresh only means bindings match current source. Correctness comes from validation and source support

  • Confidence comes from validation: usage frequency doesn't raise confidence

  • Conservative parsing: TMF connects only what it can parse. Unknown/dynamic/ambiguous facts are omitted or marked unresolved

  • Source is authoritative: if memory is missing, stale, unsupported, or partial, TMF falls back to source

  • Untrusted text is never instructions: source, comments, docstrings, commit messages, model output are data, not commands

Development candidate: 0.1.0rc4 (unreleased). The commands below install the published rc3, not this candidate. See rc4 upgrade scope.

Install

For the newly validated multi-worktree preview, use the pinned installation and MCP guide. The published release below predates that acceptance package.

Published release candidate (Python 3.10+):

python -m pip install --pre "true-memory-fragments==0.1.0rc3"

See the rc3 release notes for version scope.

Java parsing support is optional:

python -m pip install --pre "true-memory-fragments[java]==0.1.0rc3"

Development checkout:

python -m pip install -e .
python -m pip install -e ".[java]"   # optional Java support

Runtime dependencies are intentionally small. Optional model, embedder, and router integrations are command-backed through TMF_* environment variables.

Quick Start

Start with the 30-second stale-gate demo above. Share installation or reproduction feedback in Discussion #1.

Offline Java verifier

For Linux x86_64 / CPython 3.12 source checkouts, the repository includes an offline verifier for Java step0 review:

bash scripts/verify_java_offline.sh

Expected success marker:

JAVA OFFLINE VERIFY: PASS

Reflex Hook: Git-Aware Staleness Blocking for AI Agents

TMF includes a reflex hook integration that gives AI coding agents a biological-style reflex: when an agent is about to act on code understanding while that code has changed, the supported hook can request a stop and source reread. Enforcement depends on host interception, configuration and coverage.

This is not a code memory cache — it's a reflex arc that intercepts agent tool calls before execution.

Three Components

  • Sensory organ = TMF function-level fn_hash freshness (source-bound change detection; no fixed latency guarantee)

  • Reflex arc = OpenClaw before_tool_call hook / Claude Code PreToolUse harness (supported intercepted actions only)

  • Reflex action = Hard block + localized single-file re-warm

Git Hook Auto-Calibration

Four git hooks automatically generate function-level invalidation manifests after code changes:

  • .git/hooks/post-commit — after local commits

  • .git/hooks/post-merge — after git pull

  • .git/hooks/post-checkout — after branch switches

  • .git/hooks/post-rewrite — after rebase/amend

These hooks call integrations/reflex/scripts/git_calibrate.py, which compares baseline_rev → HEAD Python function signature changes and outputs structured invalidation manifests.

OpenClaw Plugin Integration

The tmf-reflex OpenClaw plugin intercepts agent tool calls:

  • Checks TMF function-level freshness (latency depends on source, cache and host)

  • Hard-blocks when agent touches a file with stale function claims

  • Returns requireApproval with exact changed function names

  • Agent must run integrations/reflex/scripts/local_warm.py to re-warm that one file

SessionStart Cognition Calibration

On new session start, the plugin reads unconsumed invalidation manifests and injects changed / deleted symbols as "pre-alert" context, preventing agents from relying on stale memory.

Boundary

  • Function-level precision depends on TMF's language coverage (currently Python AST)

  • Files without function-scope claims fall back to pass-through

  • TMF engine remains read-only (reflex hook only uses freshness / derive)

  • Failure behavior depends on hook state and host integration; verify it on the intended host. If TMF is unavailable, disclose the failure and use current source rather than cached claims.

Installation

Reflex integration code lives in integrations/reflex/. See that directory's README.md and DESIGN.md for:

  • OpenClaw plugin installation (openclaw-plugin/)

  • Git hook setup (git-hooks/)

  • Claude Code / Codex harness configuration (examples/)

  • Health validation tests (tests/)

SEO and discoverability plan

Search terms this project is intended to match include AI coding agent memory, stale context prevention, source-aware code memory, code graph for LLM agents, Claude Code memory, and cross-session code understanding. These describe the user problem; they are not claims that every integration is already production-ready.

The repository description and external launch materials should use the same vocabulary, link to a reproducible demo, and distinguish validated mechanics from still-open productivity claims.

Documentation

License

MIT

Available Tools

11 tools
tmf_callersA

List known callers by claim_id or by qualname plus optional path; ambiguous names return candidates, never a guess. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
claim_idNo
qualnameNo

TDQS

A3.6/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 ambiguity handling ("ambiguous names return candidates, never a guess"), partial coverage, staleness semantics, and that source is authoritative. Only the return payload shape is left unaddressed.

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?

The purpose is front-loaded in the first clause, followed by tightly packed caveats. It is dense but efficient; the telegraphic second half ("fresh != correct; source is authoritative") is informative though slightly oblique.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description should describe the returned caller representation, but it only says ambiguous names yield "candidates." Behavioral caveats are covered, yet the return contract is underspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% with three undocumented optional params, so the description must compensate. It partially does: it distinguishes claim_id as one lookup path from qualname+path as another and notes path is optional, but it gives no format, mutual-exclusivity, or precedence rules for the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("List known callers") and names the two lookup keys (claim_id or qualname+path), so the agent knows exactly what it retrieves. It does not explicitly differentiate itself from nearby siblings like tmf_readers/tmf_writers, which would have pushed it to a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies two valid invocation modes (by claim_id, or by qualname plus optional path), which is useful context for choosing inputs. However, it never states when this tool is preferred over tmf_readers, tmf_writers, or tmf_retrieve, so alternative selection is left to inference.

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

tmf_contextB

Investigating a codebase: start here; usually cheaper than grep plus whole-file reading. Return one deterministic thin context bundle with anchors and key fresh graph relations. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYes
max_charsNo

TDQS

B3.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 burden and does substantial work: it discloses determinism, thinness of output, partial coverage, 'fresh != correct', source as authoritative, and graceful degradation of stale data to source. These are meaningful caveats beyond the schema, though it omits auth, rate limits, and any failure/error behavior.

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 purpose ('start here') and packs caveats efficiently into a few clauses with no filler. The telegraphic, semicolon-heavy style is slightly cryptic but every clause adds signal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no annotations exist, so the description must fully specify behavior. It covers return shape and caveats reasonably well, but leaves the two parameters undefined and gives no sense of size/scope limits despite a max_chars control, leaving notable gaps for a tool that is meant to be the first stop.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for both parameters, so the description must compensate, and it does not. It never explains the 'question' format/expectations nor what 'max_chars' (minimum 180) controls or how truncation affects the returned bundle.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a clear verb and resource ('Return one deterministic thin context bundle with anchors and key fresh graph relations') and frames the tool as the entry point for codebase investigation. It distinguishes itself from the generic grep workflow, though the term 'context bundle' remains abstract and it does not name any sibling tool directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Investigating a codebase: start here; usually cheaper than grep plus whole-file reading' gives a positive recommendation and a comparison to a manual alternative. However it offers no explicit when-not conditions or routing to the many siblings (tmf_retrieve, tmf_fragment, tmf_explain), so usage is only implied.

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

tmf_explainB

Explain one claim; full=true includes thick body/source-bound details. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault
fullNo
claim_idYes

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It usefully states that coverage is partial, freshness does not equal correctness, the source is authoritative, and stale results should degrade to source, but it omits operational details such as side effects, permissions, or return format.

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?

The description is short and front-loaded, stating the core action before the flags and caveats. The semicolon-separated shorthand is efficient, though phrases like 'fresh != correct' are slightly cryptic.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with no output schema, the description covers the main purpose, the 'full' flag, and data-quality caveats. However, it does not explain return values or when to prefer this tool over siblings, leaving gaps an agent might need to resolve.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for two parameters. The description adds meaning for 'full' by saying it includes thick body/source-bound details, and 'claim_id' is implicit from 'Explain one claim', but the identifier's format or constraints are not described.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Explain one claim', and adds what the 'full' mode includes. It clearly identifies the operation but does not differentiate itself from sibling tools such as tmf_retrieve or tmf_context. This meets the definition of a clear purpose without sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives like tmf_retrieve or tmf_context. It only explains a parameter-level option ('full=true includes thick body/source-bound details') and offers data caveats, not usage conditions or exclusions.

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

tmf_fragmentA

Explore indexed code relationships around a known claim before a cross-file change. Get entry from tmf_context or tmf_retrieve; it is a claim ID, not a path or symbol name. Returns verified_hops, boundaries, gaps, stale_or_unknown, stop_reason and coverage. Start with relations=["calls"], hop_limit=1, boundary_types=["function"], semantic_boundaries=false. Inspect gaps and stop_reason before expanding: missing or stale entries return no verified hops; unsupported relations or invalid bounds raise an error. Re-read source for stale/unknown evidence and use tmf_stale_slice for a stale claim. This does not return a complete dependency graph, modify source, or refresh source-derived claims. For full claim details use tmf_explain(full=true). Source is authoritative; fresh does not mean correct.

ParametersJSON Schema
NameRequiredDescriptionDefault
entryYesStored claim ID from tmf_context or tmf_retrieve. Paths and qualified symbol names are not accepted as IDs.
hop_limitYesRequired traversal depth, 0–4. Use 1 initially; 0 returns the entry without traversing edges.
max_edgesNoMaximum returned edges, 1–128; default 128. Reaching the cap is reported in stop_reason.
max_nodesNoMaximum visited nodes including entry, 1–64; default 64. Reaching the cap is reported in stop_reason; this is not a character/token budget.
relationsYesNonempty relationship kinds to traverse in either endpoint direction: calls, reads, writes, inherits, overrides, uses_type, reads_env, reads_config_key, injects, publishes_to, subscribes_to, publishes_type, listens_type. Start with only the kinds needed for the task.
boundary_typesYesNonempty list of claim scopes at which to stop expanding when semantic_boundaries=false, e.g. function, declaration, class or topic. Ignored when semantic_boundaries=true.
semantic_boundariesNoDefault true: stop expansion at indexed side-effect boundaries such as writes or publishes_to. Set false to use boundary_types instead. This is not complete runtime or annotation analysis.

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: it enumerates the return fields, states that missing/stale entries return no verified hops, that unsupported relations or invalid bounds raise an error, that it will not modify source or refresh derived claims, and warns 'fresh does not mean correct.'

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?

Dense but front-loaded: purpose, entry source, return fields, recommended config, error behavior, and non-goals are ordered sensibly. Slightly verbose for a description, but every sentence carries 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 7-parameter traversal tool with no output schema, the description compensates by naming the returned fields (verified_hops, boundaries, gaps, stale_or_unknown, stop_reason, coverage) and by covering error and staleness behavior, so an agent has what it needs to invoke and interpret it.

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 description coverage is 100%, so the schema already documents each parameter; the baseline is 3. The description adds value by prescribing which parameter values to start with and by clarifying entry semantics beyond the schema, earning a bump.

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+resource: 'Explore indexed code relationships around a known claim before a cross-file change.' It explicitly contrasts with sibling and non-goal behavior ('This does not return a complete dependency graph'), letting an agent place it against tmf_callers/tmf_readers/tmf_subtypes.

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 preconditions ('Get entry from tmf_context or tmf_retrieve; it is a claim ID, not a path or symbol name'), recommended initial call shape (relations=["calls"], hop_limit=1, boundary_types=["function"], semantic_boundaries=false), and routes to alternatives (tmf_stale_slice for stale claims, tmf_explain(full=true) for full details).

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

tmf_readersA

List known readers by declaration claim_id or qualname plus optional path; ambiguous names return candidates. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
claim_idNo
qualnameNo

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does reasonably well: it discloses partial coverage, that cache freshness does not imply correctness, that source is authoritative, and that stale results should degrade to source. It does not, however, cover pagination, permissions, or result size limits.

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?

Extremely dense and front-loaded: one core sentence establishes the action and keys, and the trailing caveats about coverage and staleness each carry distinct, non-redundant information. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only lookup tool with no output schema and no annotations, the description covers the important epistemic caveats (partial coverage, stale vs correct, ambiguous candidates) but never describes what a returned 'reader' entry looks like or how ambiguity is presented, leaving a gap an agent calling this blind would notice.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for three undocumented parameters. It explains the role of each ('declaration claim_id or qualname plus optional path'), clarifying that path is optional and that claim_id/qualname are lookup keys, but adds no format, syntax, or mutual-exclusivity details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List known readers') and names the lookup keys (declaration claim_id or qualname plus optional path). It is distinguishable from sibling tmf_writers by the resource, though it never explicitly contrasts with closely related siblings like tmf_callers or tmf_retrieve.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through 'ambiguous names return candidates' and 'stale should degrade to source', which effectively tells the agent to fall back to source when freshness is in doubt. However, it gives no explicit when-to-use/when-not guidance or naming of alternatives among the many sibling tools.

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

tmf_retrieveA

Investigating a codebase: start here; usually cheaper than grep plus whole-file reading. Retrieve thin TMF claims for a lexical query. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses accuracy caveats — 'partial coverage; fresh != correct; source is authoritative; stale should degrade to source' — which is real behavioral value, but nothing about result shape, cost of the limit, or pagination behavior is given.

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?

Very compact, front-loads the 'start here' guidance, and every clause carries information. The telegraphic phrasing ('fresh != correct', 'stale should degrade to source') is dense but readable, not padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema, no annotations, and 0% schema coverage, the description covers accuracy/trust caveats well but leaves gaps: what a 'thin TMF claim' looks like in the response, and the meaning of the limit parameter are not addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema documents nothing. The description compensates partially by specifying the query is 'lexical' (a meaningful constraint not in the schema), but the `limit` parameter (1-50) is never explained or bounded in prose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: 'Retrieve thin TMF claims for a lexical query', and positions itself as the entry point for codebase investigation. It also distinguishes itself from grep as an alternative approach, though it doesn't differentiate from close siblings like tmf_fragment or tmf_context.

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?

'Investigating a codebase: start here' and 'usually cheaper than grep plus whole-file reading' give clear context for when to reach for this tool, plus a fallback rule ('stale should degrade to source'). It stops short of naming when a sibling such as tmf_fragment or tmf_context is preferable.

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

tmf_stale_sliceA

Plan which current source to re-read after a stored claim becomes stale, for example after a merge. Use a claim_id previously returned by tmf_context, tmf_retrieve or tmf_explain; do not invent IDs. Returns claim_fresh, per-binding stale status, required_reads with source anchors, retained_fresh_bindings, optional_fresh_neighbors, side_effect_checks and a stop_rule. Read the suggested current source and resolve applicable side-effect checks before editing; retain matching bindings rather than re-reading the whole repository. Reading suggestions are bounded heuristics, not proof of complete dependency coverage. An unknown claim ID raises an error; rediscover the target with tmf_retrieve. This plans reads only: it does not perform edits, refresh the index, or guarantee freshness at a later write. Source is authoritative; fresh does not mean correct.

ParametersJSON Schema
NameRequiredDescriptionDefault
claim_idYesExisting stored claim ID, typically retained from an earlier query or tmf_explain result with fresh=false. A missing ID raises an error.
questionNoOptional current development task, e.g. preserve timeout units after a dependency update. Default empty string; task terms help select source-reading suggestions.
max_required_readsNoMaximum required-reading suggestions, default 4; values are clamped to 1–16. A bounded list is not proof that all affected source is covered.
max_optional_neighborsNoMaximum optional fresh-neighbor suggestions, default 4; values are clamped to 0–16. Use 0 to omit optional neighbors.

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: it enumerates return fields (claim_fresh, required_reads, retained_fresh_bindings, side_effect_checks, stop_rule), states error behavior for unknown IDs, and prominently discloses limits ('bounded heuristics, not proof of complete dependency coverage', 'fresh does not mean correct'). This is unusually rich behavioral disclosure.

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 purpose, then return fields, then usage constraints, so an agent gets the essentials in the first sentence. It is dense but most sentences earn their place; the unknown-claim-ID error is somewhat restated (once as 'do not invent IDs', once as 'an unknown claim ID raises an error'), which costs a point.

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?

There is no output schema, so the description must carry the return contract, and it does — listing the exact returned fields plus the stop_rule and side-effect-check obligations. Combined with the error path and the freshness caveat, nothing an agent needs to invoke and interpret this tool is missing.

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 description coverage is 100%, so 3 is the baseline, but the description adds real guidance beyond the schema: claim_id must come from a prior tmf tool and must not be invented, and the task terms in 'question' influence source-reading selection. It does not add syntax detail for the two capped-integer parameters, which the schema already documents well.

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 precise verb and resource: 'Plan which current source to re-read after a stored claim becomes stale.' It names the sibling tools that produce the claim_id (tmf_context, tmf_retrieve, tmf_explain) and clearly scopes itself as read-planning only, distinguishing it from edit or index-refresh siblings.

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 an explicit trigger ('after a stored claim becomes stale, for example after a merge'), an explicit exclusion ('plans reads only: it does not perform edits, refresh the index, or guarantee freshness'), and routes the agent elsewhere on failure ('rediscover the target with tmf_retrieve'). When-to-use, when-not, and alternatives are all present.

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

tmf_statusB

Report claim/freshness/cache status. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.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 burden and does disclose several non-obvious behavioral traits: partial coverage, freshness not equaling correctness, source authority, and degradation guidance for stale data. It still omits basic traits like read-only safety, side effects, and authentication requirements, but the provided caveats are valuable.

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?

The description is two short sentences with no wasted words, and the purpose is front-loaded. The second sentence is telegraphic and could be slightly clearer, but overall it is efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description should explain what the status report returns and how to interpret it. It does not describe the output format, possible status values, or what 'claim', 'freshness', and 'cache status' concretely mean, leaving the agent under-informed for correct invocation.

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?

The tool takes zero parameters, so there are no parameter semantics to clarify. Per the evaluation rule, a zero-parameter tool receives a baseline score of 4 for this dimension.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (Report) and resource (claim/freshness/cache status), making the tool's function identifiable. However, it does not differentiate from any of the many sibling tools such as tmf_stale_slice or tmf_retrieve, leaving ambiguity about scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The phrase 'stale should degrade to source' is an interpretation rule, not a condition for calling the tool, and no context or exclusions are mentioned.

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

tmf_subtypesB

List known Java subtype/implementor edges by type claim_id or qualname plus optional path; ambiguous names return candidates. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
claim_idNo
qualnameNo

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful traits: partial coverage, freshness not equating to correctness, source being authoritative, and degraded behavior when stale. However, it never states the return shape, whether results are ordered/limited, or what 'degrade to source' means operationally, and the phrasing is jargon-dense.

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?

Two compact sentences with the main action and lookup keys front-loaded. The semicolon chain packs caveats efficiently, though the telegraphic style reduces readability slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a graph-query tool with no output schema and no annotations, the description should clarify result structure, edge semantics, and ordering/limits. It covers coverage and freshness caveats but leaves the return shape and edge meaning to inference, so it is only partially complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate: it does name all three parameters (claim_id, qualname, path), flags path as optional, and explains that ambiguous qualnames yield candidate matches. It still doesn't define the difference between claim_id and qualname or when each is preferred, so the compensation is partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The verb+resource is specific: 'List known Java subtype/implementor edges' with the lookup keys (claim_id or qualname). It distinguishes itself from siblings like tmf_callers/tmf_readers by naming the edge kind, though it never explicitly contrasts the siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It hints that ambiguous names return candidates and that stale data should degrade to source, but gives no explicit when-to-use guidance or named alternatives among the ten sibling tools. An agent must infer selection from the key names alone.

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

tmf_warmB

Read-only source derivation into .tmf cache; optional path is containment-checked. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo

TDQS

B3.1/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 burden and does real work: it declares the operation read-only, notes that the optional path is containment-checked (a security/validation property), and discloses that coverage is partial and that stale data should degrade to the authoritative source. It stops short of describing failure modes or return format, but the safety and correctness caveats 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?

The definition is a single front-loaded clause stating what the tool does, followed by terse caveats. The telegraphic semicolon style is dense but every clause carries distinct information, so little space is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, no output schema, and no parameter descriptions, the description should carry more weight than it does. It conveys behavior and correctness caveats well, but omits what the tool returns and how it relates to sibling tools like tmf_stale_slice, which an agent would need to choose correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the single 'path' parameter. It does add two useful facts – the path is optional and is containment-checked – but gives no format, syntax, or example, leaving the agent to infer what a valid path looks like.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The phrase 'Read-only source derivation into .tmf cache' identifies a verb-like action (deriving/warming) and a resource (.tmf cache), so the agent gets a rough sense of what happens. However, the phrasing is jargon-heavy and it never distinguishes itself from siblings like tmf_retrieve, tmf_stale_slice, or tmf_fragment, leaving the exact scope of 'warm' ambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit statement of when to call this versus the nine sibling tools. The caveats ('Partial coverage; fresh != correct; source is authoritative; stale should degrade to source') hint at trust and fallback behavior but never tell the agent which situations should route here.

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

tmf_writersB

List known writers by declaration claim_id or qualname plus optional path; ambiguous names return candidates. Partial coverage; fresh != correct; source is authoritative; stale should degrade to source.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
claim_idNo
qualnameNo

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose non-obvious traits: ambiguity returns candidates and results are partial/degradable. However, the phrases 'fresh != correct' and 'stale should degrade to source' are cryptic and leave the actual retrieval/fallback behavior underspecified.

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

Conciseness3/5

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

Compact and front-loaded, with the core action leading. But the terse telegraphic fragments ('fresh != correct', 'stale should degrade to source') trade clarity for brevity, weakening the structure of an otherwise short definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-param, no-annotation, no-output-schema read tool, the description covers lookup semantics and data-quality caveats but does not describe the return shape beyond 'candidates' or the fallback workflow it alludes to. Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does name all three keys (claim_id, qualname, path) and flags path as optional. It gives no format or precedence rules (e.g., what happens if both claim_id and qualname are supplied), so the mapping is only partially meaningful.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('List known writers') and identifies the lookup keys (claim_id/qualname, optional path), which distinguishes it from tmf_readers and tmf_callers. It does not explicitly name the sibling it differs from, so the contrast is inferable rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance, and no alternatives are named. The 'ambiguous names return candidates' clause hints at behavior but is not routing guidance, and the quality caveats ('source is authoritative') are data warnings, not usage conditions.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.1
    • Changedtmf_fragment7 fields changed
      • addedInput schema / properties / boundary_types / description
        Added value: +"Nonempty list of claim scopes at which to stop expanding when semantic_boundaries=false, e.g. function, declaration, class or topic. Ignored when semantic_boundaries=true."
      • addedInput schema / properties / entry / description
        Added value: +"Stored claim ID from tmf_context or tmf_retrieve. Paths and qualified symbol names are not accepted as IDs."
      • addedInput schema / properties / hop_limit / description
        Added value: +"Required traversal depth, 0–4. Use 1 initially; 0 returns the entry without traversing edges."
      • addedInput schema / properties / max_edges / description
        Added value: +"Maximum returned edges, 1–128; default 128. Reaching the cap is reported in stop_reason."
      • addedInput schema / properties / max_nodes / description
        Added value: +"Maximum visited nodes including entry, 1–64; default 64. Reaching the cap is reported in stop_reason; this is not a character/token budget."
      • addedInput schema / properties / relations / description
        Added value: +"Nonempty relationship kinds to traverse in either endpoint direction: calls, reads, writes, inherits, overrides, uses_type, reads_env, reads_config_key, injects, publishes_to, subscribes_to, publishes_type, listens_type. Start with only the kinds needed for the task."
      • addedInput schema / properties / semantic_boundaries / description
        Added value: +"Default true: stop expansion at indexed side-effect boundaries such as writes or publishes_to. Set false to use boundary_types instead. This is not complete runtime or annotation analysis."
    • Changedtmf_stale_slice4 fields changed
      • addedInput schema / properties / claim_id / description
        Added value: +"Existing stored claim ID, typically retained from an earlier query or tmf_explain result with fresh=false. A missing ID raises an error."
      • addedInput schema / properties / max_optional_neighbors / description
        Added value: +"Maximum optional fresh-neighbor suggestions, default 4; values are clamped to 0–16. Use 0 to omit optional neighbors."
      • addedInput schema / properties / max_required_reads / description
        Added value: +"Maximum required-reading suggestions, default 4; values are clamped to 1–16. A bounded list is not proof that all affected source is covered."
      • addedInput schema / properties / question / description
        Added value: +"Optional current development task, e.g. preserve timeout units after a dependency update. Default empty string; task terms help select source-reading suggestions."
  2. 11 tool updatesv0.1.0
    • First observedtmf_callers
    • First observedtmf_context
    • First observedtmf_explain
    • First observedtmf_fragment
    • First observedtmf_readers
    • First observedtmf_retrieve
    • First observedtmf_stale_slice
    • First observedtmf_status
    • First observedtmf_subtypes
    • First observedtmf_warm
    • First observedtmf_writers

TDQS

A3.7/5.0

Scored across 11 tools

Disambiguation4/5

Most tools have distinct roles (entry, explain, traversal, relation-specific queries, lifecycle management). However, tmf_context and tmf_retrieve both advertise themselves as the place to "start here" for codebase investigation, and tmf_fragment overlaps conceptually with tmf_callers/readers/writers/subtypes. Descriptions help distinguish them, but some misselection risk remains.

Naming Consistency4/5

All 11 tools consistently use the tmf_ prefix with snake_case, making the set easy to scan and predict. The suffixes mix nouns and verbs (e.g. context, retrieve, explain, warm, status), so it is not a strict verb_noun pattern, but conventions are otherwise stable.

Tool Count5/5

11 tools is well within the typical 3-15 range and appropriate for a code-memory/index server. Each tool covers a distinct facet: entry/retrieval, explanation, graph traversal, relation-specific queries, and freshness/cache lifecycle.

Completeness4/5

The tool surface covers core memory-fragment workflows: context/retrieve, explain, relationship exploration, caller/reader/writer/subtype queries, cache warming, status, and stale-read planning. Minor gaps exist, such as a global claim listing/search or explicit cache invalidation, but agents can work around them with existing tools.

Maintenance

ActivityActive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    B
    quality
    Not graded
    maintenance
    A memory system for AI coding tools that stores and retrieves codebase context with project isolation. Enables coding assistants to maintain searchable memory of code snippets, comments, and runtime traces with full source traceability.
    27
    27 npm
    -
  • F
    license
    Not graded
    quality
    A
    maintenance
    Memtrace is a persistent memory layer for coding agents, built as a bi‑temporal structural knowledge graph over your codebase (AST‑driven symbols and relationships, plus temporal evolution and cross‑service API topology)
    471
    -
  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables AI coding agents to efficiently navigate and understand large codebases by providing tools for entry point location, call chain analysis, and impact assessment, reducing context consumption and model costs.
    3
    GPL 3.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI coding agents with pre-edit situational awareness by combining structural call graphs and co-change history to prevent incomplete edits. It surfaces files that historically change together, reducing missed coupled modules.
    3
    MIT