Skip to main content
Glama
vbcherepanov

total-agent-memory

kg_add_fact

Record a temporal fact assertion with subject, predicate, and object. Supersedes prior matching assertions while preserving full history for evolving architectural decisions.

Instructions

Record a temporal fact assertion (subject, predicate, object). Supersedes any prior assertion with same (s,p) and different object — full history is preserved. Use for evolving architectural decisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectYes
contextNo
projectNogeneral
subjectYes
predicateYes
confidenceNo
valid_fromNoISO 8601 time the fact became true; default now. Back-dated facts close and are closed by their neighbours.
invalidate_previousNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv14.7.0
    • addedInput schema / properties / valid_from
      Added value: +{
      +  "description": "ISO 8601 time the fact became true; default now. Back-dated facts close and are closed by their neighbours.",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations only declare safe-mutation flags, so the description carries real weight here: it discloses that a new assertion supersedes prior ones with the same (s,p) and different object, and that full history is retained. That is meaningful behavioral context beyond the structured fields and is consistent with destructiveHint=false, since history is preserved rather than erased.

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?

Two tight sentences that front-load the core operation and then add the supersede rule and a usage cue. No filler.

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?

An 8-parameter mutation tool with no output schema and near-zero schema coverage needs more than two sentences. The roles of confidence, context, project, and especially invalidate_previous (which governs the supersede behavior the description mentions) are never explained.

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 only 13% (just valid_from), leaving context, project, confidence, and invalidate_previous undocumented in both schema and description. The description clarifies the (s,p,o) semantics but does nothing for the remaining five parameters, so it falls well short of compensating for the coverage gap.

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 ('Record') and resource ('temporal fact assertion') with the triple structure spelled out as (subject, predicate, object). It doesn't explicitly differentiate itself from the close sibling kg_invalidate_fact, but the temporal-assertion framing is clear enough to identify the operation.

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?

'Use for evolving architectural decisions' gives a concrete usage scenario, and the supersede rule implies when re-asserting is appropriate. However, with siblings like kg_invalidate_fact and kg_at available, no alternative is named and no when-not guidance is given.

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