Skip to main content
Glama

log_event

Record agent actions, tool calls, approvals, and outcomes in an append-only hash-chained log for audit and correction.

Instructions

Record one agent action in the logbook.

Who: agent_id (your agent's stable name) and model (e.g. "mistral-small-4"). What: action (the tool or operation) and arguments (secrets are masked). Why: reason — one plain sentence. Approval: "human" with approved_by, "auto" with approval_rule, or "none". Outcome: "pending" when logging before the action; log again with "success", "error" or "escalated" after it. Correction: if an earlier event was wrong, never try to change it; log a new event with corrects set to the earlier event's seq. Returns the stored record including its seq and hash.

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_id": "<agent_id>",
      "model": "<model>",
      "action": "<action>"
    },
    "name": "log_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNo
modelYes
actionYes
reasonNo
run_idNo
outcomeNopending
agent_idYes
approvalNonone
correctsNo
argumentsNo
approved_byNo
approval_ruleNo
result_summaryNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.3
    • addedInput schema / properties / corrects
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Corrects"
      +}
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose key traits: the logbook is append-only (corrections must be new events), arguments have secrets masked, and the tool returns the stored record. It does not cover permissions/auth needs, idempotency or duplicate handling, or failure modes, leaving meaningful gaps for a mutation 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?

Front-loaded one-line purpose followed by tight labeled facets (Who/What/Why/Approval/Outcome/Correction), which is easy to scan and wastes little. The closing sentence about returning seq and hash largely duplicates the output schema, so it is the one line that does not fully earn its place.

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 13-parameter append-only logging tool with no annotations, the description supplies the lifecycle (pending then outcome), the approval model, and the correction protocol — enough to call it correctly in the common case. Gaps remain around run_id, tags, and result_summary, which an agent would have to guess at.

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 coverage is 0% across 13 parameters, so description must compensate. It explains most of the important ones — agent_id, model, action, arguments (masked), reason, outcome values, approval modes with their paired fields (approved_by, approval_rule), and corrects pointing at an earlier seq — but leaves tags, run_id, and result_summary entirely undefined in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Record one agent action in the logbook" gives a specific verb (record) and resource (logbook), plus the append-only semantics that separate it from siblings like recent_events or verify_logbook. It never names those siblings, so the differentiation is implied rather than explicit.

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?

Strong procedural guidance: log "pending" before the action and re-log with success/error/escalated after, choose approval mode by circumstance, and never edit a wrong event — log a correcting event instead. What it lacks is any statement of when to prefer this tool over the sibling tools (export vs recent vs verify).

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

Deploy Server

Other Tools