langfuse

v0.1.3
com.pulsemcp/langfuse Checked 4 days ago Published 5 months ago

MCP server for Langfuse LLM observability — trace and observation analysis.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_traces

List traces from Langfuse with optional filters and pagination. Returns a summary of each trace: id, name, timestamp, userId, latency, totalCost, tags, and observation/score counts. The input and output fields are omitted from the list view for brevity — use get_trace_detail to see the full trace including I/O. Any field value exceeding 1000 characters is automatically truncated and saved to a /tmp file. The truncated text includes the file path — use grep on that file to search within large values. **Pagination:** Use page and limit to paginate. Response includes meta.totalItems and me…

ParameterTypeDescription
environmentarrayFilter by environment(s). Example: ["production", "staging"].
fromTimestampstringOnly include traces created on or after this ISO 8601 datetime. Example: "2025-01-01T00:00:00Z".
limitnumberNumber of traces per page (1-100). Default: 10. Use smaller values to reduce response size.
namestringFilter by trace name (exact match).
orderBystringSort order as "field.direction". Fields: id, timestamp, name, userId, release, version, public, bookmarked, sessionId. Direction: asc, desc. Example: "timestamp.desc".
pagenumberPage number (starts at 1). Default: 1.
releasestringFilter by release version string.
sessionIdstringFilter by session ID.
tagsarrayFilter to traces containing ALL specified tags. Example: ["production", "important"].
toTimestampstringOnly include traces created before this ISO 8601 datetime. Example: "2025-02-01T00:00:00Z".
userIdstringFilter by user ID associated with traces.
versionstringFilter by trace version string.

get_trace_detail

Get full details for a single Langfuse trace by ID. Returns the complete trace including input, output, metadata, and all nested observations and scores. This is the detailed view — use get_traces to browse and find trace IDs first. Any field value exceeding 1000 characters is automatically truncated and saved to a /tmp file. The truncated text includes the file path — use grep on that file to search within large values (e.g. `grep "keyword" /tmp/langfuse_input_abc123.txt`). **Observations** are returned as a flat list with parentObservationId for tree reconstruction. Each observation i…

ParameterTypeDescription
traceId *stringThe unique Langfuse trace ID to retrieve.

get_observations

List observations from Langfuse with optional filters and pagination. Returns a summary of each observation: id, traceId, type, name, model, timing, level, and usage/cost metrics. The input and output fields are omitted from the list view for brevity — use get_observation with a specific observation ID to see the full I/O. Typically used with traceId filter to list all observations within a specific trace. Can also be used to search across all traces by type, level, etc. Any field value exceeding 1000 characters is automatically truncated and saved to a /tmp file. The truncated text inclu…

ParameterTypeDescription
environmentarrayFilter by environment(s). Example: ["production"].
fromStartTimestringOnly include observations with startTime on or after this ISO 8601 datetime.
levelstringFilter by observation level: DEBUG, DEFAULT, WARNING, or ERROR.
limitnumberNumber of observations per page (1-100). Default: 10.
namestringFilter by observation name (exact match).
pagenumberPage number (starts at 1). Default: 1.
parentObservationIdstringFilter by parent observation ID to get direct children.
toStartTimestringOnly include observations with startTime before this ISO 8601 datetime.
traceIdstringFilter by trace ID. This is the most common filter — use it to get all observations for a specific trace.
typestringFilter by observation type: GENERATION, SPAN, or EVENT.
userIdstringFilter by user ID.
versionstringFilter by observation version string.

get_observation

Get full details for a single Langfuse observation by ID. Returns the complete observation including input, output, metadata, model parameters, usage details, cost details, and timing information. Use get_observations or get_trace_detail first to find observation IDs. Any field value exceeding 1000 characters is automatically truncated and saved to a /tmp file. The truncated text includes the file path — use grep on that file to search within large values (e.g. `grep "keyword" /tmp/langfuse_input_abc123.txt`). **Fields included:** id, traceId, type, name, model, modelParameters, input, ou…

ParameterTypeDescription
observationId *stringThe unique Langfuse observation ID to retrieve.