Skip to main content
Glama

log_episode

Destructive

Append an episode to an agent's journal (what it did + outcome) — the raw material reflect learns from. Required: agent_id, summary. Optional: outcome ('success'|'partial'|'failure'|'abandoned'), brain_id, goal_id, actions (object), prediction (what you expected BEFORE acting) and confidence (0..1, how likely you thought success was). Give both: the difference between them and what happened is the surprise, and reflection reads the surprising episodes first — an episode that went as expected teaches nothing. Without confidence no surprise is computed and the episode ranks last.

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>",
      "summary": "<summary>"
    },
    "name": "log_episode"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionsNoStructured details of the actions taken
goal_idNoID of the goal
outcomeNoResult: success, partial, failure or abandoned
summaryYesWhat the agent did in this episode
agent_idYesID of the agent
brain_idNoID of the brain
confidenceNoHow likely you thought success was before acting, 0..1
predictionNoWhat you expected before acting

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / properties / actions / description
      Added value: +"Structured details of the actions taken"
    • addedInput schema / properties / agent_id / description
      Added value: +"ID of the agent"
    • addedInput schema / properties / brain_id / description
      Added value: +"ID of the brain"
    • addedInput schema / properties / confidence / description
      Added value: +"How likely you thought success was before acting, 0..1"
    • addedInput schema / properties / goal_id / description
      Added value: +"ID of the goal"
    • addedInput schema / properties / outcome / description
      Added value: +"Result: success, partial, failure or abandoned"
    • addedInput schema / properties / prediction / description
      Added value: +"What you expected before acting"
    • addedInput schema / properties / summary / description
      Added value: +"What the agent did in this episode"
  2. First observed

TDQS

A4.1/5.0
Behavior3/5

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

The description adds real behavioral context beyond annotations: the episode feeds reflection, surprising episodes are read first, and missing confidence means no surprise is computed and the episode ranks last. However, it says nothing about the annotation-declared destructiveHint=true for what it frames as an 'append' operation, nor about whether entries are immutable, deduplicated, or how brain_id/goal_id affect storage.

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 with purpose, then required/optional inventory, then the one non-obvious rule about prediction plus confidence. Dense but each sentence carries information; only the repeated outcome enum values in the parenthetical are redundant with the schema.

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 an 8-parameter mutation tool with no output schema, it covers purpose, required vs optional inputs, the key semantic pairing, and downstream ranking consequences. Remaining gaps — append/immutability guarantees, relationship between brain_id and agent_id, and what a successful call returns — are meaningful but secondary.

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?

Schema coverage is 100%, so baseline is 3; the description exceeds that by explaining the relationship between prediction and confidence ('what you expected BEFORE acting' vs 'how likely you thought success was') and why supplying both matters — the gap between them is the computed surprise. It also restates the outcome enum values already present in 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?

States a specific verb and resource ('Append an episode to an agent's journal') and immediately scopes it as 'the raw material `reflect` learns from', which distinguishes it from the sibling reflect tool without requiring the schema.

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 enumerates required (agent_id, summary) and optional (outcome, brain_id, goal_id, actions, prediction, confidence) inputs and gives a directive ('Give both') for the prediction/confidence pair. It notes the downstream consequence of omitting confidence, but gives no when-not-to-use guidance or explicit statement about how this differs from writing to other logs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.