Skip to main content
Glama

store_dialog_turn

Store a dialog turn with role, content, and metadata to persistent session memory for later retrieval and context assembly.

Instructions

Store a single dialog turn in persistent session memory.

Persists a message (user, assistant, system, or tool) for later retrieval and context assembly. Metadata can hold arbitrary JSON-serializable context such as model name, tool calls, or review state.

Args: session_id: Unique conversation session identifier. role: Speaker role (e.g. user, assistant, system). content: Message text content. metadata: Optional key-value context attached to this turn.

Returns: JSON string with the stored turn record including assigned id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYes
contentYes
metadataNo
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description adds behavioral details beyond annotations, such as metadata handling and return format, but does not explicitly mention side effects like overwriting or appending.

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?

The description is concise and well-structured with a brief intro, Args list, and Returns note, with no extraneous information.

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?

The description covers all necessary aspects for a store tool: what it stores, parameters, and return value, making it complete given the presence of an output schema.

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?

With zero schema coverage, the description fully explains each parameter's meaning and purpose, e.g., 'Unique conversation session identifier' for session_id, which adds significant value.

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 description clearly states the verb 'store' and the resource 'dialog turn in persistent session memory', distinguishing it from sibling tools like list_available_providers or retrieve_recent_context.

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 explains that the tool is used for persisting messages for later retrieval and context assembly, but does not explicitly state when not to use it or provide alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kbarbel640-del/trinitas-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server