Skip to main content
Glama

mutate_graph

Apply manual changes to a relational index in one call: add concept or rationale nodes, record verified edges, remove stale edges, or rerun community detection; changes persist to disk immediately.

Instructions

Apply a manual mutation to the relational index in one call. Use action='add_node' to register a concept or rationale node, action='add_edge' to record a verified relationship, action='remove_edge' to delete a stale or false-positive edge, or action='recluster' to re-run community detection. Successful mutations persist to disk immediately.

Input Schema

NameRequiredDescriptionDefault
idNoNode identifier for add_node. Normalized automatically into a stable ID.
labelNoHuman-readable display name for add_node.
actionYesMutation action: 'add_node', 'add_edge', 'remove_edge', or 'recluster'.
sourceNoSource node ID or label for add_edge and remove_edge.
targetNoTarget node ID or label for add_edge and remove_edge.
weightNoOptional traversal weight override for add_edge, clamped to the 0.0 to 1.0 range.
relationNoRelation type for add_edge, for example 'calls', 'uses', 'delegates_to', or 'rationale_for'. For remove_edge, an optional relation filter.
file_typeNoNode type for add_node: 'code', 'document', 'paper', 'image', or 'rationale'.
confidenceNoEdge confidence for add_edge: 'EXTRACTED' (verified by inspection), 'INFERRED' (strong hint), or 'AMBIGUOUS' (uncertain).
source_fileNoRelative source file path for add_node, or the file where an add_edge relationship was observed.
qualified_labelNoOptional qualified scope-prefixed label used by add_node for disambiguation.
source_locationNoOptional source location hint, for example 'L42', used by add_node or add_edge.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.23.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose a key behavioral trait — that successful mutations persist to disk immediately — but says nothing about reversibility, what happens on a failed or partial mutation, idempotency of duplicate add_node/add_edge calls, or whether the in-memory graph must be refreshed via reload_graph afterward.

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 sentences: the first commits to what the tool is, the second is a tightly parallel action-by-action breakdown. Every clause earns its place and the general purpose is front-loaded before the detail.

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 12-parameter tool with conditional per-action fields and no annotations or output schema, the description covers the action taxonomy and persistence but leaves real gaps: no per-action parameter requirements, no indication of what is returned on success, and no mention of interaction with the sibling reload_graph.

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 coverage is 100%, so the schema already documents all 12 parameters, which sets the baseline at 3. The description adds action-level semantics that the flat schema enum does not (what each action accomplishes), but it never states which parameters are conditionally required per action — e.g. that add_edge needs source/target or that remove_edge accepts an optional relation filter.

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 ('apply a manual mutation to the relational index') and then enumerates all four actions with concrete semantics (add_node registers a concept/rationale, add_edge records a verified relationship, remove_edge deletes a stale edge, recluster re-runs community detection). This clearly separates it from read-oriented siblings like query_graph, get_graph_info, and inspect_symbol.

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?

Each action value is paired with the situation that selects it (e.g. remove_edge for 'a stale or false-positive edge', recluster to 're-run community detection'), which is strong intra-tool routing. However, there is no guidance on when to prefer this over the write-ish sibling add_planned_symbol, nor any exclusion such as 'do not use for bulk imports — use reload_graph instead'.

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