Skip to main content
Glama

Metis — Write Reflexion

write_reflexion

Record agent self-critique entries to the reflexion log after each run to capture experience, identify improvements, and note missing context or desired tools.

Instructions

Stage 11: Record an agent self-critique entry to the reflexion_log.

Called at the end of every agent run to capture experience: what worked,
what could be better, what context was missing, what tools were needed.
Entries are reviewed by the weekly Coach loop for self-improvement proposals.

Args:
    session_id: Pipeline session ID from session_bootstrap().
    agent_slug: Which agent is writing the reflexion (e.g. 'librarian').
    went_well: What went well in this run (1–2 sentences).
    could_improve: What could have been done better (1–2 sentences).
    missing_context: What context or data was unavailable but needed.
    tool_wishes: Tools or capabilities that would have helped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
went_wellNo
agent_slugYes
session_idYes
tool_wishesNo
could_improveNo
missing_contextNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It describes the tool as a write operation (recording an entry) and provides context about post-processing (review loop). However, it does not specify whether the tool is append-only, if it requires specific permissions, or if there are limits like one entry per run. For a logging tool, this is adequate but not exhaustive.

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 and well-structured: a purpose header, a contextual paragraph, and a bullet list of parameters. No unnecessary words. Every sentence adds value. The key information is front-loaded, making it easy to scan.

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?

Given 6 parameters, 0% schema coverage, no annotations, and the existence of an output schema (not shown), the description covers all parameters and use case. It explains the downstream use (review by Coach loop). It does not explicitly mention return values, but the output schema likely handles that. A minor gap is not stating if the entry is saved immediately or if failure handling exists.

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% (no descriptions in input schema), so the description carries full burden. It lists all 6 parameters with clear explanations: session_id is 'Pipeline session ID from session_bootstrap()', agent_slug is 'Which agent is writing the reflexion', and the three optional text fields are described with their 1-2 sentence length guideline. This adds substantial meaning beyond the bare schema titles.

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 tool's purpose is clearly stated: 'Record an agent self-critique entry to the reflexion_log'. It specifies it is called at the end of every agent run to capture experience. This verb+resource combination distinguishes it from sibling tools like log_agent_run or add_journal_entry, which serve different logging purposes.

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?

The description explicitly states when to use the tool: 'Called at the end of every agent run'. It also explains the downstream use: entries are reviewed by the weekly Coach loop for self-improvement. While it doesn't explicitly list when not to use it or compare with alternatives, the context is clear enough for an agent to decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SVerITG/Metis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server