Skip to main content
Glama

save_session_event

Persist atomic events to session history with write-through guarantee, recording every tool call, file write, and classification decision.

Instructions

Stage 8: Persist one atomic event to session_events (write-through guarantee).

Call this after every tool call, file write, and classification decision.
Event types: 'turn' | 'tool_call' | 'result' | 'file_write' | 'redline' | 'classification'

Args:
    session_id: Session ID from session_bootstrap().
    event_type: Category of event being recorded.
    content: Event content (truncated to 2000 chars).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
event_typeYes
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Mentions 'write-through guarantee' and content truncation to 2000 chars, but lacks details on idempotency, error handling, or return value. Since no annotations are provided, the description carries full burden and this is only partially addressed.

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?

Concise with clear sections: stage, purpose, usage context, event types, and parameter descriptions. No superfluous text, but could use bullet points for easier parsing.

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?

Given the tool's simplicity and the presence of an output schema (which handles return value explanation), the description provides sufficient information for correct usage. Slightly more detail on return behavior would improve completeness.

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?

Adds meaningful context beyond the schema's property titles: session_id origin, event type categories, and content truncation. Schema description coverage is 0%, so this compensation is valuable, though format or validation details could still be added.

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?

Clearly states the tool persists an atomic event to session_events with a write-through guarantee. Lists specific event types and distinguishes from sibling tools like add_memory_entry by focusing on session event logging.

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?

Explicitly says 'Call this after every tool call, file write, and classification decision,' providing clear context. Does not explicitly exclude other logging scenarios but the sibling list implies differentiation.

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/SVerITG/Metis'

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