Skip to main content
Glama

log_event

Record agent actions, decisions, messages, and tool calls in ZizkaDB to build a causal, hash-chained event history for auditing and context retrieval.

Instructions

Log an event to ZizkaDB.

Use this every time your agent takes an action: a tool call, a decision,
a user message, or an agent response. Logging builds the causal graph
that powers why(), search_memory(), and get_context().

Args:
    agent:      Unique identifier for your agent (e.g. "support-bot"): letters, numbers,
                dots, dashes and underscores, starting with a letter or number
    event:      What happened (e.g. "tool_call", "user_message", "decision")
    data:       Any dict of relevant data (tool name, query, result, etc.)
    session_id: Groups related events into a session (optional)
    parent_id:  event_id of the event that caused this one -- enables causal lineage (optional)

Returns:
    event_id, timestamp, sequence_no, checksum

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": {
      "agent": "<agent>",
      "event": "<event>",
      "data": "<data>"
    },
    "name": "log_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYes
agentYes
eventYes
parent_idNo
session_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does real work: it discloses the return tuple (event_id, timestamp, sequence_no, checksum) and explains the downstream consequence of logging — the causal graph powering why(), search_memory(), and get_context(). It stops short of stating persistence/immutability guarantees, whether calls are rate-limited or cost tokens, and whether logged events can later be removed.

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?

Front-loaded imperative first, then the usage rule, then a clean Args/Returns block. The Args list is somewhat long, but each line adds constraint or example that the schema lacks, so no sentence is filler.

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?

Five parameters, one nested open-ended object, and no output schema — yet the description supplies both param semantics and an explicit Returns line covering all four returned fields. There is no output schema to defer to, and the description does not need one given it enumerates the return shape itself.

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?

Schema description coverage is 0%, so the description must compensate entirely, and it does: every one of the five parameters is defined with an example and, for agent, a character-set and leading-character constraint that the bare schema does not express. parent_id's causal-lineage meaning and session_id's grouping role are both spelled out, which is meaningfully more than the schema's title-only fields.

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?

"Log an event to ZizkaDB" gives a specific verb and resource, and the description immediately narrows the scope to agent actions (tool call, decision, user/agent message). It also distinguishes this write path from the read-side siblings by naming why(), search_memory(), and get_context() as downstream consumers of what this tool writes.

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?

"Use this every time your agent takes an action" is unusually explicit, and the four enumerated action types resolve most ambiguity about what counts as an event. There is no explicit when-not guidance or comparison against reset_log_chain/forget, but since no sibling appears to be an alternative writer, the gap is small.

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