Skip to main content
Glama

Metis — Log Span

log_span

Record a completed span for retrospective timing data, such as query duration, in a single call with optional session and run identifiers.

Instructions

Record a completed span in one call (no separate start/end needed).

Useful for logging retrospective timing data (e.g. 'that DB query took 42ms').

Args:
    name:        Span label.
    duration_ms: How long the work took in milliseconds.
    kind:        'internal' | 'tool' | 'agent' | 'llm'. Default: 'internal'.
    session_id:  Session identifier. Optional.
    run_id:      FK to agent_runs. Optional.
    parent_id:   Parent span_id. Optional.
    status:      'ok' | 'error'. Default: 'ok'.
    tags:        JSON string of metadata. Optional.

Returns the new span_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNointernal
nameYes
tagsNo
run_idNo
statusNook
parent_idNo
session_idNo
duration_msYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so description carries full burden. Discloses that it records a span and returns a span_id. Does not cover side effects, idempotency, or storage behavior. Adequate but could be more comprehensive.

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?

Concise and well-structured. Starts with a clear summary sentence, then lists parameters in a readable format. No unnecessary information.

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?

Covers the main use case and parameter details. Mentions return value (span_id) despite output schema existing. Could discuss error handling or constraints, but overall complete for a write operation.

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 description coverage is 0%, so the description compensates by listing all 8 parameters with clear one-line explanations. Adds significant meaning beyond the schema's titles and defaults.

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 it records a completed span in one call, distinguishing from a start/end two-call approach. The sibling tools include start_span and end_span, so the description effectively differentiates.

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?

Provides context for when to use (retrospective timing data) and implies alternative of separate start/end calls. Does not explicitly list when not to use, but the single-call distinction is clear.

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