Skip to main content
Glama

log_event

Record raw exchanges—messages, tool calls, results, and artifacts—as episodic events so later consolidation extracts facts with full context.

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.

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": {
      "event_type": "<event_type>",
      "role": "<role>",
      "content": "<content>"
    },
    "name": "log_event"
  }
}

Input 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. Changed2 schema fields changedv0.34.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / metadata / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv0.30.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses the downstream effect (events feed episodic consolidation that extracts facts), the idempotency posture ('Duplicates are reconciled at consolidation, so logging something twice is safe'), and the hook-based auto-logging interaction. It does not say what the call returns or how an agent verifies a recorded event, which is the main remaining gap for a 7-param write tool.

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?

Three short, well-segmented paragraphs: what it does, when to call it, and which sibling to use instead. Front-loaded and free of filler; the only mild redundancy is restating the consolidation-extraction rationale twice, but that repetition reinforces the 'why log both sides' point.

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?

For a 7-parameter write tool with no annotations and no output schema, the description covers purpose, trigger conditions, dedupe safety, and the sibling boundary. The missing piece is any statement about the response or confirmation behavior, which an agent calling a logging tool would reasonably want.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema itself explains role, speaker, content_type and event_type in detail, so the baseline is 3. The description adds only indirect guidance ('Logging both sides gives that extraction the context to know what a reply refers to'), hinting that both user and assistant events should be captured, but it adds no format or value semantics beyond the schema.

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 first sentence gives a specific verb ('Record'), a specific resource ('a raw exchange'), and enumerates the concrete event kinds it accepts (user message, response, tool call, tool result, artifact). It also distinguishes the tool's role from downstream 'consolidation' and from the sibling capture_fact, so an agent can tell it apart without opening a schema.

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?

Explicitly states when NOT to call ('where the client has hooks configured... you do not need to call this at all'), when to call (no hooks, or verbatim-worthy exchanges such as decisions, corrections, specifications), and names an alternative ('To store a fact you already know, use capture_fact instead'). This is the full when/when-not/alternative triad.

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