Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

get-spans

Retrieve trace spans from a Phoenix project with filters for time range, names, status codes, and more. Paginate through results using a cursor for large datasets.

Instructions

Get spans from a project with filtering criteria.

Spans represent individual operations or units of work within a trace. They contain timing information, attributes, and context about the operation being performed.

Example usage: Get recent spans from project "my-project" Get spans in a time range from project "my-project"

Expected return: Object containing spans array and optional next cursor for pagination. Example: { "spans": [ { "id": "span123", "name": "http_request", "context": { "trace_id": "trace456", "span_id": "span123" }, "start_time": "2024-01-01T12:00:00Z", "end_time": "2024-01-01T12:00:01Z", "attributes": { "http.method": "GET", "http.url": "/api/users" } } ], "nextCursor": "cursor_for_pagination" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
namesNo
cursorNo
end_timeNo
parent_idNo
trace_idsNo
span_kindsNo
start_timeNo
status_codesNo
project_identifierNo
include_annotationsNo
Behavior3/5

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

No annotations provided, so description carries full burden. Describes return format with pagination and sample spans. However, does not disclose whether it is read-only, auth requirements, rate limits, or error conditions. A read operation is implied but not stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Contains a clear structure including description, context, and example return. However, the example is verbose and repeats some information from the description. Could be more concise while retaining essential 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?

With 11 parameters, no output schema, and no annotations, the description is insufficient. Provides a return example but does not cover most parameters or explain behavior like pagination limits or filtering logic.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, yet description only hints at filtering by time range and project. Does not explain any of the 11 parameters (e.g., names, cursor, status_codes). Adds little beyond context for example usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states this tool retrieves spans with filtering criteria and explains what spans are. Distinguishes from sibling tools like list-traces by focusing on spans rather than traces, but does not explicitly contrast with similar tools.

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?

Provides example usages (time range, recent spans) but lacks guidance on when to use this tool versus alternatives like get-trace or list-traces. No exclusions or prerequisites mentioned.

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/Arize-ai/phoenix'

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