Skip to main content
Glama

KG Add

memory-kg-add

Add a subject-predicate-object fact to the knowledge graph and optionally replace conflicting facts for the same subject and predicate.

Instructions

Add a subject-predicate-object triple. Use replace=true to auto-invalidate conflicting facts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "subject": "<subject>",
      "predicate": "<predicate>",
      "object": "<object>"
    },
    "name": "memory-kg-add"
  }
}

Input Schema

NameRequiredDescriptionDefault
objectYesTarget (e.g. "Acme Corp").
replaceNoInvalidate existing triples with same subject+predicate.
subjectYesEntity (e.g. "Matt").
predicateYesRelationship (e.g. "works-at").
confidenceNoConfidence 0-1 (default: 0.5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full disclosure burden. It does reveal one real behavioral trait — that replace=true invalidates conflicting triples rather than silently adding a duplicate — but says nothing about deduplication on non-conflicting adds, whether the write is reversible, or what happens to a triple that conflicts when replace is false.

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 tight sentences with the core action front-loaded and no filler. It is close to minimal, though the second sentence spends its words on a parameter already documented in the schema.

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?

This is an unannotated mutation tool with no output schema, so the description should do more: it never states what the call returns (a new triple id, the stored triple, or nothing) or whether contradictions matter when replace is omitted. It is adequate to start a call but leaves an agent guessing about effects.

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 100%, so the baseline is 3. The description's note on replace largely restates the schema's own wording ("Invalidate existing triples with same subject+predicate") and adds nothing about the interaction between replace and confidence.

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?

"Add a subject-predicate-object triple" gives a specific verb and resource, and the triple framing immediately tells an agent this is a knowledge-graph write rather than a search or timeline read. It does not explicitly contrast itself with memory-kg-invalidate, which is the closest sibling and the more likely confusion point.

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 replace=true clause implies a usage condition (conflicting facts exist and should be superseded), which is a useful hint. However, there is no explicit guidance on when to use this versus memory-kg-invalidate for retiring a fact, and no mention of prerequisites such as an authenticated session.

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