Skip to main content
Glama

update_session

Rename a session's folder and replace its main script, saving both edits to history so they can be undone. Give a short note to track what changed.

Instructions

Change a session's title (renames its folder) and/or replace its main script. Script changes are saved to history on both sides, so they can be undone. Give a short note. After a rename, use the returned path or the session id; the old path still works.

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": {
      "session": "<session>"
    },
    "name": "update_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoWhat changed, e.g. 'Tighter hook'.
titleNoNew title. Renames the folder.
scriptNoThe new main script, in markdown.
sessionYesSession: 'Project/folder', an absolute path or its id (from get_session). Old paths still work.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.11.11
    • changedInput schema / properties / session / description
      Previous value: -"Session as 'Project/folder', an absolute path, or its id (from get_session). An old path still works after a rename or move."New value: +"Session: 'Project/folder', an absolute path or its id (from get_session). Old paths still work."
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

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

Annotations only declare readOnly=false, destructive=false and openWorld=false. The description goes well beyond that by disclosing a non-obvious side effect (a title change renames the folder), the undo story ('saved to history on both sides, so they can be undone'), and the durable-path guarantee ('the old path still works'). These are exactly the behavioral traits an agent cannot infer from the schema or annotations.

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?

Four short sentences, front-loaded with the core capability and followed by the consequences (history/undo) and post-call guidance. Nothing is padded, though the terse imperative 'Give a short note.' reads slightly out of place stylistically next to the otherwise explanatory prose.

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 four-parameter mutation tool with no output schema, the description covers the important ground: what changes, that changes are undoable, and how to identify the session afterward via 'the returned path or the session id' — partial return-value context. Missing only permission/auth prerequisites, which is a minor gap for a non-destructive update.

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?

With 100% schema description coverage, the schema already documents all four parameters, including that title 'Renames the folder' and that old paths still resolve for session. The description largely restates those facts, adding only the informal framing 'Give a short note' for the note field. Baseline 3 is appropriate since the schema carries the semantic load.

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 uses a specific verb-plus-resource framing and enumerates exactly the two mutation surfaces: 'Change a session's title (renames its folder) and/or replace its main script.' An agent can tell this mutates an existing session rather than creating one (create_session) or reading one (get_session). It stops short of naming a sibling alternative outright, which keeps it at 4 rather than 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 'and/or' phrasing usefully signals that partial updates are allowed, and the final sentence gives post-call guidance on how to reference the session after a rename. However, there is no explicit when-to-use/when-not statement and no routing to a sibling such as update_variant or get_session for inspecting before editing. Usage is implied rather than prescribed.

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