Skip to main content
Glama

edit_session

Destructive

Apply one atomic, undoable batch of changes to the shared preset. Paths are field-name arrays; nodes and connections use stable element ids instead of numeric indices, e.g. [document,graphs,root,nodes,node-id,params,gain]. Use describe_nodes templates when adding nodes. Supply baseRevision from read_session. Independent concurrent changes merge; conflicting fields return SESSION_CONFLICT. Significant agent batches automatically checkpoint the previous state. Returns the new state with checkpoint summaries; include checkpoints=true to retrieve restorable states. Never blindly replace the whole document after a conflict.

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": {
      "sessionId": "<sessionId>",
      "token": "<token>",
      "baseRevision": "<baseRevision>",
      "changes": "<changes>"
    },
    "name": "edit_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
actorNoagent
labelNoAgent edit
tokenYes
changesYes
sessionIdYes
checkpointNo
checkpointsNo
baseRevisionYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "__schema0": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "boolean"
      +      },
      +      {
      +        "type": "null"
      +      },
      +      {
      +        "items": {
      +          "$ref": "#/$defs/__schema0"
      +        },
      +        "type": "array"
      +      },
      +      {
      +        "additionalProperties": {
      +          "$ref": "#/$defs/__schema0"
      +        },
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      }
      +    ]
      +  }
      +}
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / definitions
      Removed value: -{
      -  "__schema0": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "boolean"
      -      },
      -      {
      -        "type": "null"
      -      },
      -      {
      -        "items": {
      -          "$ref": "#/definitions/__schema0"
      -        },
      -        "type": "array"
      -      },
      -      {
      -        "additionalProperties": {
      -          "$ref": "#/definitions/__schema0"
      -        },
      -        "propertyNames": {
      -          "type": "string"
      -        },
      -        "type": "object"
      -      }
      -    ]
      -  }
      -}
    • addedInput schema / properties / changes / items / properties / value / $ref
      Added value: +"#/$defs/__schema0"
    • removedInput schema / properties / changes / items / properties / value / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/definitions/__schema0"
      -  }
      -]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "__schema0": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        },
      +        {
      +          "items": {
      +            "$ref": "#/$defs/__schema0"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "additionalProperties": {
      +            "$ref": "#/$defs/__schema0"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        }
      +      ]
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {
      +    "$ref": "#/$defs/__schema0"
      +  },
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / checkpoints
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already flag destructiveHint=true and idempotentHint=false, and the description adds real context beyond that: batches are atomic and undoable, independent concurrent changes merge, conflicting fields return SESSION_CONFLICT, and significant agent batches automatically checkpoint the previous state. It also says what the tool returns and that this is a non-idempotent mutation. That goes well past what the annotations declare.

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?

It front-loads the core action, then the path format, then the revision and conflict rules, so it's well ordered. It is dense and reads as a run-on, but almost every sentence carries information the agent needs. The final warning about not replacing the whole document is worth the space.

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

Completeness5/5

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

An output schema exists, so return values don't need to be described here, though the description does say it returns the new state with checkpoint summaries. Conflict handling, checkpointing, revision sourcing, and path format all get covered. For a destructive 8-parameter mutation, that's complete enough to call correctly.

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 0%, so the description has to carry most of the parameter meaning, and it does for the hard parts: paths are field-name arrays with a concrete example, and baseRevision must come from read_session. The checkpoints flag is explained. sessionId, token, actor, label, checkpoint, and remove are left undocumented.

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 first sentence names a specific verb and resource plus its scope: 'Apply one atomic, undoable batch of changes to the shared preset.' That separates it from read-only siblings like read_session and from whole-document operations, and the meaning is clear before the agent reads any schema.

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 gives concrete when-to-use rules: supply baseRevision from read_session, use describe_nodes templates when adding nodes, and never blindly replace the whole document after a conflict. It doesn't point to checkpoint_session or restore_session as alternatives for undoing a batch, which is the main gap.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources