Skip to main content
Glama
Hardik-Singh

Invariance MCP

Official
by Hardik-Singh

invariance_memory_write

Store or update an agent's belief about a subject, with confidence and optional evidence provenance. Enables downstream divergence checks against authoritative records.

Instructions

Record a memory write by an agent: set or update a belief (claim) about a subject. Returns the new MemoryAccess + MemoryRecord. Defaults: source="agent_write", confidence=1.0. Provide provenance (EvidenceRef[] as JSON) when the claim is derived from authoritative records (CRM/ticket/policy doc) so downstream divergence checks can verify it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
valueYesValue of the claim, JSON-encoded. Example: "\"email\"" or "{\"tier\":\"gold\"}".
run_idNo
sourceNoOrigin of the claim. Defaults to agent_write.
node_idNo
used_forYes
confidenceNoConfidence in the claim, [0,1]. Defaults to 1.0.
provenanceNoEvidenceRef[] as a JSON-encoded array. Example: [{"kind":"document","id":"doc_1"}]
subject_idYes
valid_untilNoISO8601 expiry. null means open-ended.
subject_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses key behavioral traits beyond annotations: it returns 'the new MemoryAccess + MemoryRecord', it has defaults (source='agent_write', confidence=1.0), and it explains the downstream consequence of providing provenance ('so downstream divergence checks can verify it'). Annotations already indicate readOnlyHint=false and destructiveHint=false, and the description adds context about what the tool does and why provenance matters. It doesn't contradict annotations.

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 concise and front-loaded: the core purpose is stated in the first sentence, followed by return value, defaults, and provenance guidance. Every sentence adds value. It's slightly dense with technical terms (EvidenceRef[], MemoryAccess, MemoryRecord) but remains efficient for an agent audience.

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

Completeness4/5

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

For a write tool with 11 parameters and no output schema, the description covers the essential context: what it does, what it returns, key defaults, and when to use provenance. It doesn't explain the full parameter set (e.g., run_id, node_id, used_for) or provide examples of complete invocations, but the schema covers those. The description is adequate for an agent to select and invoke the tool correctly in most cases.

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 45%, so the description partially compensates. It explains the meaning of 'provenance' (EvidenceRef[] as JSON, used for divergence checks), clarifies defaults for 'source' and 'confidence', and describes the return value. However, it doesn't explain several parameters like 'run_id', 'node_id', 'used_for', 'valid_until', or 'subject_type' beyond what the schema provides. The description adds value for the most important parameters but leaves some gaps.

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's purpose: 'Record a memory write by an agent: set or update a belief (claim) about a subject.' It uses a specific verb ('Record'), names the resource ('memory write'), and describes the action (set or update a belief). It also distinguishes itself from siblings like invariance_memory_read and invariance_node_write by focusing on agent-authored belief claims about a subject.

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?

The description provides clear context on when to use the tool: when an agent needs to record a belief/claim about a subject. It also gives guidance on when to provide provenance ('when the claim is derived from authoritative records'), which helps the agent decide how to invoke it. However, it doesn't explicitly state when NOT to use it or name alternative tools for different scenarios (e.g., invariance_node_write for node-level writes).

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

Deploy Server

Other Tools