Skip to main content
Glama
Log-LogN

langfuse-mcp-java

fetch_traces

fetch_traces
Destructive

Retrieve paginated Langfuse traces to monitor LLM pipeline executions, with optional filters for users, sessions, tags, and time ranges.

Instructions

Returns a paginated list of Langfuse traces.

Each trace represents one end-to-end LLM pipeline execution. The response includes: id, name, userId, sessionId, level (DEFAULT | DEBUG | WARNING | ERROR), latency (seconds), totalTokens, totalCost (USD), tags, timestamp.

All filter parameters are optional. Omit any filter you do not need — omitted filters are ignored and do not narrow the result set.

Pagination: page is 1-based (default 1), limit controls page size (default 20, max 100). To page through results, increment page while keeping limit fixed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYesPage number, 1-based. Omit to use default (1).
limitYesResults per page, max 100. Omit to use default (20).
userIdYesFilter by the Langfuse user ID attached to the trace. Omit to return traces for all users.
nameYesFilter by trace name — must be an exact string match. Omit to return all trace names.
sessionIdYesFilter by session ID to return only traces belonging to that session. Omit to return traces across all sessions.
tagsYesFilter by a single tag string. Omit to return traces regardless of tags.
fromTimestampYesStart of time range in ISO-8601 format, e.g. 2025-01-01T00:00:00Z. Omit to include traces from the beginning of the project.
toTimestampYesEnd of time range in ISO-8601 format, e.g. 2025-12-31T23:59:59Z. Omit to include traces up to the current time.
Behavior1/5

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

The description claims this 'Returns' data (a read operation), but the annotations declare 'destructiveHint: true' and 'readOnlyHint: false', implying data destruction. This is a direct contradiction—fetching a paginated list should not be destructive. The description also fails to explain the 'openWorldHint: true' (external calls) behavior.

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

Conciseness4/5

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

The description is well-structured with clear sections: purpose definition, trace explanation, response fields, filter behavior, and pagination mechanics. Sentences are purposeful and information-dense. The field list is slightly verbose but necessary given the lack of output schema.

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?

Given the lack of output schema, the description comprehensively lists return fields (id, name, userId, sessionId, etc.) and explains the filter/pagination behavior in detail. It adequately covers the 8-parameter complexity despite the schema incorrectly marking all fields as required.

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?

Despite 100% schema coverage, the description adds crucial semantic context: it clarifies that 'All filter parameters are optional' (correcting the schema's erroneous 'required' array), provides the default values for pagination (page=1, limit=20), and explains the paging strategy incrementing page while keeping limit fixed.

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?

The description clearly states it 'Returns a paginated list of Langfuse traces' with a specific verb and resource. It adds valuable context by defining what a trace represents ('one end-to-end LLM pipeline execution') and enumerating response fields. However, it misses explicit differentiation from the singular 'fetch_trace' sibling.

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?

The description provides clear guidance on filter usage ('Omit any filter you do not need') and pagination strategy ('To page through results, increment page while keeping limit fixed'). However, it lacks explicit comparison to siblings like 'fetch_trace' or 'get_user_traces' to help the agent choose between bulk retrieval and specific lookups.

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/Log-LogN/langfuse-mcp-java'

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