Skip to main content
Glama

Metis — Log Agent Run

log_agent_run

Records agent run details for audit and dashboard tracking, including input/output files, tokens, and session events.

Instructions

Log a completed agent run to the database for audit and dashboard tracking.

Records that an agent did a piece of work so it appears in the dashboard's
Agents view and in get_agent_runs. Call it after writing an output file, per
the output contract. When a session_id is supplied it also writes a "result"
event to session_events, closing the loop for /metis pipeline calls.

Args:
    agent_slug: Slug of the agent that performed the work (e.g. "librarian").
    task_summary: Brief description of what the agent did.
    input_path: Path to the input file(s), if any (default empty string).
    output_path: Path to the output file(s) produced, if any (default empty).
    complexity: The run status stored in the `status` column — typically
        "completed", "partial", or "failed" (default "standard").
    input_tokens: Input tokens consumed, for cost tracking (default 0).
    output_tokens: Output tokens produced, for cost tracking (default 0).
    model: Model identifier used, e.g. "claude-sonnet-4-6" (default empty).
    session_id: Pipeline session ID from session_bootstrap(); when set, also
        records a result event in session_events (default empty string).

Returns:
    A confirmation message naming the agent and task that were logged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
agent_slugYes
complexityNostandard
input_pathNo
session_idNo
output_pathNo
input_tokensNo
task_summaryYes
output_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description bears full burden. It discloses the logging action, dashboard appearance, and side effect of writing a session event when session_id is present. However, it does not specify idempotency, error behavior, or authentication requirements, leaving some ambiguity.

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?

Well-structured with separate sections for purpose, usage, parameters, and returns. Each sentence contributes value, though slightly wordy. Front-loaded with the main action and purpose.

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 the complexity (9 params, no annotations, output schema present), the description covers purpose, when to call, parameter details, return value, and side effects. It lacks error conditions and exact return format, but the output schema may fill those gaps.

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?

The schema has 0% description coverage, but the documentation-style parameter explanations add significant meaning, such as clarifying that 'complexity' maps to status values and that 'session_id' triggers an additional event. Some defaults (e.g., 'standard' for complexity) are slightly inconsistent with the listed statuses, but overall adds value.

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 description clearly states the tool logs a completed agent run for audit and dashboard tracking, with a specific verb ('Log') and resource ('agent run'). It distinguishes from siblings like get_agent_runs and other logging tools by emphasizing the 'completed run' context and integration with the dashboard and session events.

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 advises to call it 'after writing an output file, per the output contract' and explains the conditional behavior when session_id is supplied. No explicit exclusions or alternatives are provided, but the context is clear enough for proper use.

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