Skip to main content
Glama
M-T-D-N

agentmemory-codex-windows

memory_graph_upsert

Create or merge graph nodes and edges manually in a specific project without an LLM, using its official source sessions and observations. Writes provenance and returns node-key-to-ID mappings.

Instructions

Create or merge manually authored graph nodes and edges in an exact project without an LLM. Official session/observation sources must belong to that project. Node keys are request-local edge endpoints; sourceIndexes selects supporting source groups, or sharedSources=true explicitly shares all groups. existingNodeId targets one validated live node. Writes provenance and audit records; returns node-key-to-ID mappings and node/edge created/merged counts. Use memory_graph_query to inspect existing graph records first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
edgesNoRelationships between request-local node keys
nodesYesCanonical nodes keyed locally for this request
projectYesExact registered project identifier
sourcesYesOfficial source sessions and observations
sharedSourcesNoExplicitly attach every source group to every node and edge. Required when multiple sources intentionally support multiple records and sourceIndexes are omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-preview.14-glama.1

TDQS

A4.3/5.0
Behavior4/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 and does well: it discloses that the tool writes provenance and audit records, that existingNodeId is validated against a live node preserving same-name siblings, and what the response returns. It omits auth/permission needs and rate or size-limit guidance, keeping it short of a 5.

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 parameter mechanics, then side effects and the sibling pointer. Dense but each clause earns its place; a few semicolon-chained clauses make it slightly run-on but nothing is filler.

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 mutation tool with no annotations and no output schema, the description does the necessary work: it covers side effects, validation behavior, and return values, and warns that sources must belong to the project. It could say more about merge-vs-create semantics and limits, but nothing critical 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 coverage is 100%, so baseline is 3, but the description adds real meaning: it clarifies that node keys are request-local edge endpoints, how sourceIndexes selects supporting groups, and that sharedSources=true shares all groups (required when sourceIndexes are omitted). This coordination logic is not fully conveyed by the schema alone.

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 compound verb (create or merge) with a precise resource (manually authored graph nodes and edges) and scope (an exact project, without an LLM). The 'without an LLM' qualifier distinguishes it from any LLM-extraction flow, and the trailing pointer to memory_graph_query makes it separable from the read sibling.

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?

Explicitly routes the agent to memory_graph_query to inspect existing records first, and states the precondition that official session/observation sources must belong to the target project. Clear positive guidance, though it does not spell out when-not-to-use (e.g. versus sketch/crystallize flows).

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