Skip to main content
Glama

graph_mutate

Apply atomic changes to project memory—create or patch blocks, decisions, links, plans, and checkpoints—with revision checks for safe concurrent updates.

Instructions

Atomically create or patch Blocks, project-scoped Decisions, global Links, Chain paths, independent Plans, atomic Checkpoints, Background scopes, Decision scopes, and source refs. Decisions are not Canvas Blocks and never enter Block/Chain/Plan coverage. A plain create_block records architecture only; use create_checkpoint in the same ChangeSet when a requirement, Plan, Chain gate, or explicit verification request makes the check necessary. Link kinds are flows_to, calls, reads, writes, depends_on, implements, validates, constrains, and supersedes. Keep each call small and provide expectedRevision for updates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskNo
actorNo
planIdNo
reasonYes
gitHeadNo
operationsYes
projectRootNo
chainScopeIdNo
taskContextIdNo
includeStructuredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.3
    • addedInput schema / properties / taskContextId
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.3.2
    • changedInput schema / properties / operations / items / properties / action / enum
      Previous value: -[
      -  "create_block",
      -  "create_decision",
      -  "create_checkpoint",
      -  "update_block",
      -  "update_decision",
      -  "add_source_ref",
      -  "remove_source_ref",
      -  "create_chain",
      -  "update_chain",
      -  "create_link",
      -  "update_link",
      -  "create_plan",
      -  "update_plan",
      -  "set_plan_chains",
      -  "set_plan_dependencies",
      -  "set_plan_steps",
      -  "set_plan_checkpoints",
      -  "set_plan_chain_scopes",
      -  "update_plan_chain_scope",
      -  "set_plan_changes",
      -  "update_plan_change",
      -  "set_plan_chain_change_refs",
      -  "set_checkpoint_bindings",
      -  "set_checkpoint_dependencies",
      -  "set_chain_path",
      -  "set_background_scopes",
      -  "set_decision_scopes"
      -]New value: +[
      +  "create_block",
      +  "update_block",
      +  "delete_block",
      +  "create_decision",
      +  "update_decision",
      +  "delete_decision",
      +  "create_checkpoint",
      +  "delete_checkpoint",
      +  "record_checkpoint",
      +  "add_source_ref",
      +  "remove_source_ref",
      +  "create_chain",
      +  "update_chain",
      +  "delete_chain",
      +  "create_link",
      +  "update_link",
      +  "delete_link",
      +  "create_plan",
      +  "update_plan",
      +  "delete_plan",
      +  "set_plan_chains",
      +  "set_plan_dependencies",
      +  "set_plan_steps",
      +  "update_plan_step",
      +  "set_plan_checkpoints",
      +  "set_plan_chain_scopes",
      +  "update_plan_chain_scope",
      +  "set_plan_changes",
      +  "update_plan_change",
      +  "set_plan_chain_change_refs",
      +  "set_checkpoint_bindings",
      +  "set_checkpoint_dependencies",
      +  "set_chain_path",
      +  "set_background_scopes",
      +  "set_decision_scopes"
      +]
  3. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden. It reveals atomicity, that Decisions are not Canvas Blocks and never enter Block/Chain/Plan coverage, the architecture-only nature of a plain create_block, valid link kinds, and the expectedRevision requirement for updates. It omits details about delete consequences and authorization, but still goes well beyond the schema.

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 four sentences and front-loads the core verb and resource list before adding targeted caveats. Every sentence adds semantic value with no filler or repetition of the schema structure. It is dense but readable.

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?

Given the high complexity—10 parameters, 34 action enum values, no output schema, and no annotations—the description provides useful guidance for common create/checkpoint cases but is not complete. It does not explain top-level parameter semantics, return/response shape, or the behavior of destructive operations. It is adequate but has clear gaps.

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 0%, and the description only partially compensates. It meaningfully explains operation-level fields such as create_block vs create_checkpoint, link kinds, and expectedRevision, but leaves most top-level parameters (reason, planId, gitHead, projectRoot, chainScopeId, taskContextId, includeStructured) unexplained. For a tool with 10 parameters, this is a significant 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?

The description opens with 'Atomically create or patch' and lists the concrete resources involved: Blocks, Decisions, Links, Chain paths, Plans, Checkpoints, scopes, and source refs. This clearly states the tool's function and scope. It does not explicitly differentiate it from the sibling graph_patch, so it stops short of a 5.

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 description provides useful in-tool guidance: use create_checkpoint in the same ChangeSet when a check is necessary, keep calls small, and provide expectedRevision for updates. However, it does not state when to prefer graph_mutate over graph_patch or other sibling tools, and it lacks explicit when-not-to-use conditions.

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