Skip to main content
Glama

log_span

Record timing data for completed work as a single span, specifying duration, kind, and optional identifiers. Use for logging retrospective performance metrics.

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
nameYes
duration_msYes
kindNointernal
session_idNo
run_idNo
parent_idNo
statusNook
tagsNo

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 carries full burden. It mentions that it records a completed span and returns a span_id, but does not disclose side effects, authorization needs, or idempotency. The purpose is clear but behavioral gaps remain.

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, front-loading the main purpose in the first sentence, followed by a usage example and clear parameter documentation. No redundant sentences; every line adds value.

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?

With 8 parameters (2 required) and an output schema, the description explains the return value ('Returns the new span_id') and documents all parameters. It could mention session_id grouping or further integration context, but overall it is fairly complete.

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%, but the description includes an Args section that explains each parameter, e.g., 'kind: 'internal' | 'tool' | 'agent' | 'llm'. Default: 'internal'.' This adds meaning beyond the schema's titles and types, providing valid values 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 states 'Record a completed span in one call (no separate start/end needed)', clearly specifying the verb 'record' and resource 'span'. It distinguishes from siblings like start_span and end_span by emphasizing the single-call approach.

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 says 'Useful for logging retrospective timing data (e.g. 'that DB query took 42ms')' and contrasts with start/end span tools. However, it does not explicitly state when not to use it or provide alternatives beyond the sibling contrast.

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