Skip to main content
Glama

Record messages

add_messages_to_session

Store specific messages the user wants kept, as they were said, so memory can learn from them. Send only those messages, never the conversation history. Creates the session and the speakers on first use; learning runs in the background, so do not wait for it. Pass idempotency_key when a retry is possible, so the same batch is never stored twice.

Input Schema

NameRequiredDescriptionDefault
messagesYesMessages in the order they were said.
session_idNoConversation to record into. Reuse one id per conversation. Defaults to this connection's session when it has one.
workspace_idNoWorkspace to use. Defaults to this connection's workspace.
idempotency_keyNoAny unique string; a repeated call with the same key returns the first result.

Output Schema

NameRequiredDescriptionDefault
storedYesMessages stored by this call.
messagesYes
replayedYesTrue when an idempotent retry returned the first result.
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing side effects (it creates the session and speakers on first use), asynchronous behavior (learning runs in the background, do not wait), and idempotency mechanics (a repeated key returns the first result). This is exactly the kind of mutation/async context an agent needs and cannot get from the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tightly packed sentences, front-loaded with the core action and scoping rule, then side effects, then the idempotency instruction. No filler, and each sentence carries a distinct operational instruction.

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?

With an output schema present, the description need not explain return values, and it fully covers scoping, side effects, async behavior, and retry handling for this 4-param mutation tool. Nothing an agent needs to call it correctly is missing.

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 100%, so the baseline is 3, but the description adds usable meaning: it explains the timing/purpose of idempotency_key ('when a retry is possible') and constrains what should go into messages. It does not add format/syntax detail, but the added semantic value above the schema is real.

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 verb and resource ('Store specific messages... so memory can learn from them') and scopes it precisely to messages the user wants kept. The 'never the conversation history' clause distinguishes it from a general chat/history tool, so an agent can tell it apart from siblings like chat or search.

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?

Gives clear when/when-not guidance: send only the messages to keep, never the conversation history, and pass idempotency_key when a retry is possible. It also tells the caller not to wait for learning. It does not name a specific sibling as the alternative, but the conditions for correct use are explicit.

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