Skip to main content
Glama

log_agent_run

Record agent task executions to SQLite for audit trails and dashboard analytics, capturing details like token usage, model, and run status.

Instructions

Log an agent run to the SQLite database.

Records that an agent executed a task, for audit and dashboard tracking.

Args:
    agent_slug: Which agent performed the work.
    task_summary: Brief description of what was done.
    input_path: Path to input file(s), if any.
    output_path: Path to output file(s), if any.
    complexity: Run status stored in the `status` column -- "completed", "partial", or "failed".
    input_tokens: Input tokens consumed (for cost tracking).
    output_tokens: Output tokens produced (for cost tracking).
    model: Model used (e.g. "claude-sonnet-4-6", "claude-haiku-4-5").
    session_id: Pipeline session ID from session_bootstrap(), if any.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations provided, so description carries full burden. It states logging to SQLite but lacks details on idempotency, destructive behavior, permissions, or side effects. Additionally, the parameter 'complexity' is described as storing run status, conflicting with the schema default 'standard'.

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?

Description is front-loaded with purpose and follows a clear 'Args:' structure. Could be slightly more concise but effectively organizes parameter details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 9 parameters and no output schema details (though output schema exists), the description omits return value information. The misalignment in 'complexity' and lack of usage example or callback example leave gaps.

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?

Description provides detailed explanations for all 9 parameters, significantly adding meaning beyond the schema's bare titles. However, the description for 'complexity' misstates its purpose (status vs. complexity), which reduces reliability.

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?

Description clearly states 'Log an agent run to the SQLite database' with specific verb 'log' and resource 'agent run'. It distinguishes from sibling logging tools like log_span or log_consent_event by focusing on agent execution tracking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage for audit and dashboard tracking but provides no explicit guidance on when to use this tool versus other logging tools (e.g., log_span, log_consent_event) or any prerequisites.

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