Skip to main content
Glama

summarizeSessionToMemory

Idempotent

Persist an agent-written session summary as a durable memory in one call. Upserts by memoryId, so repeating the call replaces the prior summary instead of duplicating it.

Instructions

Store an agent-authored session summary as a durable 'summary' memory in one call. Upserts on memoryId, so calling it again with the same memoryId replaces the prior summary rather than duplicating it.

WHEN TO CALL: At session end when you have already written a concise summary of what was accomplished and want to persist it directly (the simpler alternative to handleSessionEnd's automatic summarization).

WHEN NOT TO CALL: When you want sessionmem to generate the summary from ingested session events — use handleSessionEnd for that. For non-summary facts/decisions use storeMemory.

Provide: memoryId (stable id for this session's summary), sessionId, sourceAdapter, summary (the text), importance (1-10; 7 is typical for summaries).

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": {
      "memoryId": "<memoryId>",
      "sessionId": "<sessionId>",
      "sourceAdapter": "<sourceAdapter>",
      "summary": "<summary>",
      "importance": "<importance>"
    },
    "name": "summarizeSessionToMemory"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNo
summaryYes
memoryIdYes
sessionIdYes
importanceYes
sourceAdapterYes
workingDirectoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.10.0
    • addedInput schema / properties / scope
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 160,
      +      "minLength": 1,
      +      "pattern": "^[^\\x00-\\x1f\\x7f]+$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / workingDirectory
      Added value: +{
      +  "maxLength": 4096,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Addedv1.1.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, and the description usefully explains *why*: upserting on memoryId replaces the prior summary instead of duplicating, so an agent understands the overwrite behavior. It does not cover auth requirements, size/retention limits, or what a successful call returns, keeping it short of a 5.

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?

Front-loaded with the core action and upsert semantics, then organized into WHEN TO CALL / WHEN NOT TO CALL / Provide blocks. Slightly list-heavy for the payload, but nearly every line carries decision-relevant information rather than restating the schema.

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?

With no output schema and no annotation coverage of returns, the description still gives an agent everything needed to invoke it correctly: purpose, routing, idempotency behavior, and key parameter meanings. Only the response shape and the meaning of scope/workingDirectory are absent.

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 coverage is 0%, so the description must carry the load, and it does for five of seven parameters — notably defining memoryId as a stable per-session id and giving a practical anchor for importance (1-10; 7 is typical). scope and workingDirectory are left entirely unexplained, so it does not fully compensate.

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 action and resource: storing an agent-authored session summary as a durable 'summary' memory, and explicitly frames it as the one-call, caller-written counterpart to summarization. The upsert-on-memoryId clause further pins down the semantics so it is distinguishable from storeMemory and handleSessionEnd.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Has explicit WHEN TO CALL and WHEN NOT TO CALL blocks naming the alternatives (handleSessionEnd for generated summaries, storeMemory for non-summary facts). The selection condition between the two paths is stated plainly rather than inferred.

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