Skip to main content
Glama

log_event

Record raw user-assistant-tool exchanges verbatim so the memory engine can later extract facts. Use when hooks are absent or an exchange must be preserved exactly.

Instructions

Record a raw exchange — a user message, your response, a tool call, a tool result, an artifact — as the episodic record consolidation later extracts facts from. Logging both sides gives that extraction the context to know what a reply refers to.

Where the client has hooks configured, every event is logged for you automatically and you do not need to call this at all. Call it when there are no hooks, or when an exchange matters enough to preserve verbatim — a decision, a correction, a specification — and you want it recorded whether or not hooks are running. Duplicates are reconciled at consolidation, so logging something twice is safe.

To store a fact you already know, use capture_fact instead: this tool records what was said, not what it means.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleYesChannel that produced this event (user, assistant, system, tool). For a named person on a group transcript, keep role as user and pass speaker.
contentYesText content of the event
speakerNoNamed participant when the transcript has one (e.g. Alex). Role stays the channel — do not invent a person role.
metadataNoArbitrary metadata
event_typeYesType of event
content_refNoURI or path for non-text content
content_typeNoHow to interpret the content. Defaults to 'text' for messages. Use 'json' for structured data, 'image' for screenshots or generated images, 'audio' for voice or audio clips, 'binary' for anything else non-text.text

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.30.1

TDQS

A5/5.0
Behavior5/5

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

The description discloses that it records raw exchanges, that duplicates are reconciled at consolidation, and that it is for episodic memory. It also clarifies the distinction from fact storage, giving a clear behavioral picture despite lacking annotations.

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, using three short sentences that sequentially cover purpose, usage conditions, and alternative tool. It is well-structured and free of unnecessary detail.

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 gives sufficient context for an agent to decide when to invoke the tool, what parameters to fill, and how it differs from related tools. It even mentions automatic logging when hooks exist, which is important operational context.

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?

All 7 parameters have descriptive names and schema-level explanations. The tool description adds practical guidance for ambiguous cases, such as using the 'speaker' parameter for named participants and defaulting content_type to 'text'.

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 tool records a raw exchange for episodic memory, using the verb 'record' and specifying the resource (raw exchange). It also differentiates from capture_fact and explains its role in consolidation.

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?

Explicit guidance is provided: call when no hooks are configured or when an exchange matters enough to preserve verbatim; otherwise, it is automatic. It also notes duplicates are safe and directs to capture_fact for storing facts instead.

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