Retrieve the complete hierarchical span tree of a single trace. Returns detailed trace information with the full span_tree structure showing: - All spans in the trace with parent-child relationships - Full input/output for each span - Timing and performance metrics per span - Model and token usag...
AI agents call get_trace_tree to retrieve information from Respan MCP Server without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
This tool queries and retrieves trace data for monitoring and observability purposes. It returns detailed information about trace execution, span relationships, timing, and token usage, but performs no data modifications, deletions, or external operations. The blast radius of misuse is minimal—an attacker could view trace logs but cannot alter system state or trigger actions.
From the tool's definition Tool description explicitly states 'Retrieve the complete hierarchical span tree' and lists returned fields without any modification capabilities. The verb 'Retrieve' and absence of any create, update, or delete operations confirms read-only behavior.
Risk signalsAdmin/system-level operation
Attacks that exploit this kind of access
Retrieve the complete hierarchical span tree of a single trace. Returns detailed trace information with the full span_tree structure showing: - All spans in the trace with parent-child relationships - Full input/output for each span - Timing and performance metrics per span - Model and token usage per LLM span - Nested children spans forming the execution tree TRACE FIELDS: - trace_unique_id: Unique identifier - start_time, end_time: Trace time range - duration: Total duration in seconds - span_count: Total number of spans - llm_call_count: Number of LLM calls - total_prompt_tokens, total_completion_tokens, total_tokens: Aggregate token usage - total_cost: Total cost in USD - error_count: Number of errors - metadata: Custom metadata object - customer_identifier: User identifier - environment: Environment name SPAN TREE STRUCTURE: Each span in span_tree contains: - span_unique_id: Unique span identifier - span_name: Name of the operation - span_parent_id: Parent span ID (null for root) - log_type: Span type (CHAT, COMPLETION, FUNCTION, TASK, WORKFLOW, etc.) - start_time, timestamp: Span timing - latency: Duration in seconds - input: Full span input data - output: Full span output data - model: Model used (for LLM spans) - prompt_tokens, completion_tokens: Token counts - cost: Cost in USD - status: Status (success, error) - status_code: HTTP-like status code - children: Array of nested child spans Use list_traces first to find trace_unique_id, then use this for full span tree. It is categorised as a Read tool in the Respan MCP Server MCP Server, which means it retrieves data without modifying state.
Register the Respan MCP Server MCP server in PolicyLayer and add a rule for get_trace_tree: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Respan MCP Server. Nothing to install.
get_trace_tree is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_trace_tree rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get_trace_tree. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_trace_tree is provided by the Respan MCP Server MCP server (respanai/respan-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →