Skip to main content
Glama

Save session

save_session

Save session knowledge—including facts, decisions, lessons, procedures, and open threads—to long-term memory so AI agents can preserve context and search it across sessions.

Instructions

Save this session's knowledge to memory. sections is an object whose keys are:

  • journal: what was done and the outcome, a few lines

  • facts: stable truths learned (where config lives, versions, how things connect)

  • decisions: what was decided, why, and what was rejected

  • lessons: surprises and root causes

  • dead_ends: approaches that failed and why

  • procedures: steps or commands that worked (no command output)

  • changes: repos, branches, commits, PRs, tickets, what was applied (pointers only, no diffs)

  • open_threads: unfinished work, next steps, blockers

  • preferences: corrections on how the owner wants the AI to work

  • warnings: dangerous things to check first

  • client_memory: memory files the client wrote or changed this session Unknown keys are kept inside the journal. Saving the same client_session_id again adds a revision. Never include secrets. Set unsure=true if you are not sure the summary is free of secrets; the owner reviews it first.

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": {
      "client_session_id": "<client_session_id>",
      "sections": "<sections>"
    },
    "name": "save_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
unsureNoTrue when you are not sure the text is free of secrets; the owner reviews it before anything is searchable.
sectionsYesTyped sections: keys from the list above, values a string or a list of strings.
client_session_idYesYour own stable id for this session; saving it again adds a revision.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses revision behavior on repeat saves (consistent with idempotentHint=false), that unknown keys are retained inside the journal, a hard 'never include secrets' rule, and the owner-review gate triggered by `unsure` before content becomes searchable. These are exactly the operational facts annotations cannot express, and nothing contradicts the declared hints.

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?

Purpose and secret-handling rules are front-loaded, and the bullet list is dense and functional rather than padded. It is long overall, but nearly every line delimits a distinct section, so little could be cut without losing parameter meaning.

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?

For a nested-object write tool with an output schema present, the description covers what to put in each section key, how duplicates behave, and the safety gate around secrets and owner review. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% but the schema for `sections` only says 'keys from the list above' and defers to the description, so the per-key definitions (journal, facts, decisions, lessons, dead_ends, procedures, changes, open_threads, preferences, warnings, client_memory) carry essential meaning. The 'pointers only, no command output, no diffs' constraints add content rules not present in the schema.

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 first sentence states a specific verb and resource: 'Save this session's knowledge to memory.' The following taxonomy of section keys makes the scope concrete and separates it in practice from siblings like update_fact or warnings. It does not explicitly name an alternative tool, 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear from 'this session's knowledge' and the section list, and the description states explicit conditions for the `unsure` flag and for re-saving the same `client_session_id` (adds a revision). It offers no explicit when-not guidance or named alternative tools, leaving routing to the agent's inference.

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