Skip to main content
Glama
respanai

Respan MCP Server

Official
by respanai

get_spans_summary

Aggregate summary statistics for LLM log spans within a time range, returning total cost, tokens, request count, and evaluator scores to monitor usage without retrieving individual spans.

Instructions

Retrieve aggregated summary statistics for log spans. Returns total_count, total_cost, total_tokens, avg_latency etc.

Useful for getting quick insights into your LLM usage without fetching all individual spans.

PARAMETERS:

  • start_time: Start time in ISO 8601 format (required)

  • end_time: End time in ISO 8601 format (required)

  • filters: Optional object of server-side filters in backend format: { field_name: { operator, value } }

RESPONSE FIELDS:

  • total_cost: Total cost in USD for all filtered spans

  • total_tokens: Total tokens (prompt + completion)

  • number_of_requests: Total number of requests matching filters

  • scores: Aggregated score summaries grouped by evaluator_id

EXAMPLE: { "start_time": "2025-01-01T00:00:00Z", "end_time": "2025-01-31T23:59:59Z", "filters": { "model": { "operator": "", "value": ["gpt-4o"] } } }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNoServer-side filters in backend format. Example: { "model": { "operator": "", "value": ["gpt-4o"] } }
end_timeYesEnd time in ISO 8601 format
start_timeYesStart time in ISO 8601 format
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It clearly states it 'Retrieve[s]' and 'Returns' aggregated statistics, implying a read-only operation. It lists response fields (total_cost, total_tokens, number_of_requests, scores) which adds transparency about output. It does not explicitly state it is read-only or describe side effects, but the nature of the operation is evident. The description is not contradictory and provides useful context about the response.

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 well-structured with labeled sections (PARAMETERS, RESPONSE FIELDS, EXAMPLE). It opens with a clear purpose statement, followed by the use case, then parameter details, response fields, and an illustrative example. Every sentence serves a purpose, and it is appropriately concise, avoiding redundancy.

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?

The description covers the main use case, required parameters, optional filter structure, and response fields. However, the first line mentions 'total_count, avg_latency' but the RESPONSE FIELDS section omits these, creating a minor inconsistency. Additionally, there is no output schema, so the description's listing of response fields is crucial and mostly comprehensive. A small inconsistency prevents a perfect score.

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 input schema covers 100% of parameters, so the baseline is 3. The description adds value by explicitly naming required parameters (start_time, end_time) and describing the optional filters with the format and an example. It also lists response fields, which are not in the schema. This enriches the understanding of parameter usage and expected output, going beyond the schema's basic descriptions.

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 retrieves aggregated summary statistics for log spans, specifying the resource (log spans) and action (retrieve aggregated summary). It distinguishes itself from fetching individual spans by emphasizing 'without fetching all individual spans', which aligns with sibling tools like list_logs or get_log_detail. The verb 'Retrieve' and resource 'log spans' are specific, making the purpose unambiguous.

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 provides clear context for when to use: 'Useful for getting quick insights into your LLM usage without fetching all individual spans.' This implies when summaries are needed rather than detailed logs. It does not explicitly state when not to use or name alternatives, but the guidance is sufficient for most cases. It lacks explicit exclusions, so it scores a 4 rather than a 5.

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/respanai/respan-mcp'

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