Langfuse MCP Servers
Available MCP servers
Server navigation
Langfuse Cloud MCP
Authenticated project-scoped MCP server for Langfuse Cloud projects.
https://cloud.langfuse.com/api/public/mcpCloud EU
https://cloud.langfuse.com/api/public/mcp
Cloud US
https://us.cloud.langfuse.com/api/public/mcp
Cloud Japan
https://jp.cloud.langfuse.com/api/public/mcp
HIPAA US
https://hipaa.cloud.langfuse.com/api/public/mcp
Self-Hosted
https://your-domain.com/api/public/mcp
Local Development
http://localhost:3000/api/public/mcp
Client setup
Cursor mcp.json
json
{
"mcpServers": {
"langfuse-cloud": {
"url": "https://cloud.langfuse.com/api/public/mcp",
"headers": {
"Authorization": "Basic <base64(LANGFUSE_PUBLIC_KEY:LANGFUSE_SECRET_KEY)>"
}
}
}
}Tools
getPrompt
Fetch a specific prompt by name with optional label or version parameter. Retrieval options: - label: Get prompt with specific label (e.g., 'production', 'staging') - version: Get specific version number (e.g., 1, 2, 3) - neither: Returns 'production' version by default Note: label and version are mutually exclusive. Returns full prompt content with resolved dependencies.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"label": {
"description": "Label to retrieve (e.g., \"production\", \"staging\"). Defaults to \"production\".",
"type": "string",
"minLength": 1,
"maxLength": 36,
"pattern": "^[a-z0-9_\\-.]+$"
},
"version": {
"description": "Specific version number to retrieve (e.g., 1, 2, 3)",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"name"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getPrompt",
"arguments": {
"name": "string",
"label": "string",
"version": 1
}
}
}getPromptUnresolved
Fetch a specific prompt by name with optional label or version parameter WITHOUT resolving dependencies. Returns the raw prompt content with dependency tags intact. Useful for: - Understanding prompt composition/stacking before resolution - Debugging prompt dependencies - Analyzing the dependency graph structure Retrieval options: - label: Get prompt with specific label (e.g., 'production', 'staging') - version: Get specific version number (e.g., 1, 2, 3) - neither: Returns 'production' version by default Note: label and version are mutually exclusive. To get resolved prompts, use the 'getPrompt' tool instead.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"label": {
"description": "Label to retrieve (e.g., \"production\", \"staging\"). Defaults to \"production\".",
"type": "string",
"minLength": 1,
"maxLength": 36,
"pattern": "^[a-z0-9_\\-.]+$"
},
"version": {
"description": "Specific version number to retrieve (e.g., 1, 2, 3)",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"name"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getPromptUnresolved",
"arguments": {
"name": "string",
"label": "string",
"version": 1
}
}
}listPrompts
List and filter prompts in the project. Returns metadata including versions, labels, tags, last updated timestamp, and prompt type. Optional filters: - name: Filter by exact prompt name - label: Filter by label on any version - tag: Filter by tag - fromUpdatedAt: Filter prompts updated at or after this timestamp - toUpdatedAt: Filter prompts updated at or before this timestamp Pagination: page (default: 1), limit (default: 50, max: 100)
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"description": "Filter by exact prompt name match",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"label": {
"description": "Filter by label (e.g., 'production', 'staging')",
"type": "string",
"minLength": 1,
"maxLength": 36,
"pattern": "^[a-z0-9_\\-.]+$"
},
"tag": {
"description": "Filter by tag (e.g., 'experimental', 'v1')",
"type": "string"
},
"fromUpdatedAt": {
"description": "Filter prompts updated at or after this timestamp (ISO 8601 with timezone, e.g. 2026-02-02T00:00:00Z)",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"toUpdatedAt": {
"description": "Filter prompts updated at or before this timestamp (ISO 8601 with timezone, e.g. 2026-02-02T00:00:00Z)",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"page": {
"default": 1,
"description": "Page number for pagination (default: 1)",
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"limit": {
"default": 50,
"description": "Number of items to return (1-100, default: 50)",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"required": [
"page",
"limit"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "listPrompts",
"arguments": {
"limit": 50,
"page": 1,
"fromUpdatedAt": "2026-05-15T12:00:00.000Z",
"label": "string",
"name": "string",
"tag": "string",
"toUpdatedAt": "2026-05-15T12:00:00.000Z"
}
}
}createTextPrompt
Create a new text prompt version in Langfuse. Important: - Prompts are immutable - cannot modify existing versions - To update content, create a new version - To promote to production, use updatePromptLabels - Labels are unique across versions - Use {{variable_name}} syntax for dynamic content Accepts: name, prompt (string), optional labels, config, tags, commitMessage
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"prompt": {
"type": "string",
"description": "The prompt text content (supports {{variables}})"
},
"labels": {
"description": "Labels to assign (e.g., ['production', 'staging'])",
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"description": "Optional JSON config (e.g., {model: 'gpt-4', temperature: 0.7})",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"tags": {
"description": "Optional tags for organization (e.g., ['experimental', 'v2'])",
"type": "array",
"items": {
"type": "string"
}
},
"commitMessage": {
"description": "Optional commit message describing the changes",
"type": "string"
}
},
"required": [
"name",
"prompt"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "createTextPrompt",
"arguments": {
"name": "string",
"prompt": "string",
"commitMessage": "string",
"config": {
"property": {}
},
"labels": [
"string"
],
"tags": [
"string"
]
}
}
}createChatPrompt
Create a new chat prompt version in Langfuse. Chat prompts are arrays of messages with roles and content. Important: - Prompts are immutable - cannot modify existing versions - To update content, create a new version - To promote to production, use updatePromptLabels - Labels are unique across versions Message roles: system (instructions), user (input, can contain {{variables}}), assistant (examples) Accepts: name, prompt (array of {role, content}), optional labels, config, tags, commitMessage
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"prompt": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "The role (e.g., 'system', 'user', 'assistant')"
},
"content": {
"type": "string",
"description": "The message content"
}
},
"required": [
"role",
"content"
],
"additionalProperties": false
},
"description": "Array of chat messages with role and content"
},
"labels": {
"description": "Labels to assign (e.g., ['production', 'staging'])",
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"description": "Optional JSON config (e.g., {model: 'gpt-4', temperature: 0.7})",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"tags": {
"description": "Optional tags for organization (e.g., ['experimental', 'v2'])",
"type": "array",
"items": {
"type": "string"
}
},
"commitMessage": {
"description": "Optional commit message describing the changes",
"type": "string"
}
},
"required": [
"name",
"prompt"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "createChatPrompt",
"arguments": {
"name": "string",
"prompt": [
{
"content": "string",
"role": "string"
}
],
"commitMessage": "string",
"config": {
"property": {}
},
"labels": [
"string"
],
"tags": [
"string"
]
}
}
}updatePromptLabels
Update labels for a specific prompt version. Important: - ONLY way to modify existing prompts (labels only) - Specified labels are added to the version (preserving others not mentioned) - Labels are unique across versions - setting a label on one version automatically removes it from others - 'latest' label is auto-managed and cannot be set manually - Cannot modify prompt content, type, or tags - use createTextPrompt or createChatPrompt for new versions Accepts: name, version (required), newLabels (array, can be empty to remove all labels)
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "The name of the prompt"
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The version number to update (required)"
},
"newLabels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of new labels to assign to the prompt version (can be empty to remove all labels)"
}
},
"required": [
"name",
"version",
"newLabels"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "updatePromptLabels",
"arguments": {
"name": "string",
"newLabels": [
"string"
],
"version": 1
}
}
}listObservations
Find and review observations in the current Langfuse project, such as generations, spans, events, agent steps, and tool calls. Use filters to narrow results by trace, name, type, level, environment, time range, or advanced filter conditions. Results are paginated with an opaque cursor. By default this returns compact summary fields. Use fields: ["*"] for the full observation, or pass specific field names to limit the response size. Important: if you request metadata explicitly, for example fields: ["id", "metadata"], metadata values are truncated to 200 UTF-8 characters per key unless you also pass expandMetadataKeys with the keys that may need full values. Requests that project or filter input, output, or metadata must include traceId, an id filter, or both fromStartTime and toStartTime.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"fields": {
"description": "Observation fields to include in the response. Omit for compact defaults, use [\"*\"] for all available fields, or pass specific field names to keep responses small. Call getObservationFieldSchema to list accepted fields.",
"type": "array",
"items": {
"type": "string"
}
},
"expandMetadataKeys": {
"description": "Metadata keys that may need full values. Metadata values are truncated to 200 UTF-8 characters per key by default when metadata is projected without this option.",
"type": "array",
"items": {
"type": "string"
}
},
"limit": {
"default": 50,
"description": "Number of observations to return (1-100, default: 50)",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"cursor": {
"description": "Cursor returned by a previous listObservations call",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"SPAN",
"EVENT",
"GENERATION",
"AGENT",
"TOOL",
"CHAIN",
"RETRIEVER",
"EVALUATOR",
"EMBEDDING",
"GUARDRAIL"
]
},
"name": {
"type": "string"
},
"userId": {
"type": "string"
},
"level": {
"type": "string",
"enum": [
"DEBUG",
"DEFAULT",
"WARNING",
"ERROR"
]
},
"traceId": {
"type": "string"
},
"version": {
"type": "string"
},
"parentObservationId": {
"type": "string"
},
"environment": {
"description": "Environment to filter by. Multiple environments are temporarily unsupported until the public observations API applies allow-multiple environment filters correctly.",
"type": "string"
},
"fromStartTime": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"toStartTime": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"filter": {
"description": "Advanced filters. Each item must be an object with column, operator, value, and optional type. Type is inferred from getObservationFilterSchema columns when omitted.",
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "id"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "traceId"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
">",
"<",
">=",
"<="
]
},
"value": {},
"type": {
"type": "string",
"const": "datetime"
},
"column": {
"type": "string",
"const": "startTime"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
">",
"<",
">=",
"<="
]
},
"value": {},
"type": {
"type": "string",
"const": "datetime"
},
"column": {
"type": "string",
"const": "endTime"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "name"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "type"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "environment"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "version"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "userId"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "sessionId"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "traceName"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "level"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "statusMessage"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "promptName"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "promptVersion"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "modelId"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "providedModelName"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "totalCost"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "inputTokens"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "outputTokens"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "totalTokens"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "inputCost"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "outputCost"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "latency"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "timeToFirstToken"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "input"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "output"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "stringObject"
},
"column": {
"type": "string",
"const": "metadata"
}
},
"required": [
"key",
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of",
"all of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "arrayOptions"
},
"column": {
"type": "string",
"const": "tags"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"<>"
]
},
"value": {
"type": "boolean"
},
"type": {
"type": "string",
"const": "boolean"
},
"column": {
"type": "string",
"const": "hasParentObservation"
}
},
"required": [
"operator",
"value",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "id"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "traceId"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
">",
"<",
">=",
"<="
]
},
"value": {},
"type": {
"type": "string",
"const": "datetime"
},
"column": {
"type": "string",
"const": "startTime"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
">",
"<",
">=",
"<="
]
},
"value": {},
"type": {
"type": "string",
"const": "datetime"
},
"column": {
"type": "string",
"const": "endTime"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "name"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "type"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "environment"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "version"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "userId"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "sessionId"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "traceName"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "level"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "statusMessage"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "promptName"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "promptVersion"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "modelId"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
},
"column": {
"type": "string",
"const": "providedModelName"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "totalCost"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "inputTokens"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "outputTokens"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "totalTokens"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "inputCost"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "outputCost"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "latency"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
},
"column": {
"type": "string",
"const": "timeToFirstToken"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "input"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
},
"column": {
"type": "string",
"const": "output"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "stringObject"
},
"column": {
"type": "string",
"const": "metadata"
}
},
"required": [
"key",
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"any of",
"none of",
"all of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "arrayOptions"
},
"column": {
"type": "string",
"const": "tags"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"=",
"<>"
]
},
"value": {
"type": "boolean"
},
"type": {
"type": "string",
"const": "boolean"
},
"column": {
"type": "string",
"const": "hasParentObservation"
}
},
"required": [
"operator",
"value",
"type",
"column"
],
"additionalProperties": false
}
],
"description": "Advanced observation filter object. Example: {\"column\":\"totalCost\",\"operator\":\">\",\"value\":0.0029}. The explicit form {\"type\":\"number\",\"column\":\"totalCost\",\"operator\":\">\",\"value\":0.0029} is also accepted."
}
}
},
"required": [
"limit"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "listObservations",
"arguments": {
"limit": 50,
"cursor": "string",
"environment": "string",
"expandMetadataKeys": [
"string"
],
"fields": [
"string"
],
"filter": [
{
"column": "id",
"operator": "any of",
"value": [
"string"
],
"type": "stringOptions"
}
],
"fromStartTime": "2026-05-15T12:00:00.000Z",
"level": "DEBUG",
"name": "string",
"parentObservationId": "string",
"toStartTime": "2026-05-15T12:00:00.000Z",
"traceId": "string",
"type": "SPAN",
"userId": "string",
"version": "string"
}
}
}getObservation
Get the details for a single observation in the current Langfuse project by observation ID. Use this when you already know the observation ID and want to inspect its timing, model, status, payload, metadata, usage, cost, or prompt fields. By default this returns compact summary fields. Use fields: ["*"] for the full observation, or pass specific field names to limit the response size. Important: if you request metadata explicitly, for example fields: ["id", "metadata"], metadata values are truncated to 200 UTF-8 characters per key unless you also pass expandMetadataKeys with the keys that may need full values.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"observationId": {
"type": "string",
"minLength": 1
},
"fields": {
"description": "Observation fields to include in the response. Omit for compact defaults, use [\"*\"] for all available fields, or pass specific field names to keep responses small. Call getObservationFieldSchema to list accepted fields.",
"type": "array",
"items": {
"type": "string"
}
},
"expandMetadataKeys": {
"description": "Metadata keys that may need full values. Metadata values are truncated to 200 UTF-8 characters per key by default when metadata is projected without this option.",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"observationId"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getObservation",
"arguments": {
"observationId": "string",
"expandMetadataKeys": [
"string"
],
"fields": [
"string"
]
}
}
}getObservationFieldSchema
Show which observation fields can be requested from listObservations and getObservation. The response marks default fields and fields that may be large or contain sensitive application data.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {},
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getObservationFieldSchema",
"arguments": {}
}
}getObservationFilterSchema
Show which observation fields can be used in listObservations filters, including the supported operators for each field.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {},
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getObservationFilterSchema",
"arguments": {}
}
}getObservationFilterValues
List available values for an observation filter field, such as names, types, levels, environments, model names, tags, users, or sessions. Use the returned cursor to page through long value lists.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"column": {
"type": "string",
"enum": [
"name",
"type",
"environment",
"version",
"userId",
"sessionId",
"traceName",
"level",
"promptName",
"modelId",
"providedModelName",
"tags",
"hasParentObservation"
]
},
"fromStartTime": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"toStartTime": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"observationType": {
"type": "string",
"enum": [
"SPAN",
"EVENT",
"GENERATION",
"AGENT",
"TOOL",
"CHAIN",
"RETRIEVER",
"EVALUATOR",
"EMBEDDING",
"GUARDRAIL"
]
},
"hasParentObservation": {
"type": "boolean"
},
"limit": {
"default": 50,
"description": "Number of observations to return (1-100, default: 50)",
"type": "integer",
"minimum": 1,
"maximum": 100
},
"cursor": {
"type": "string"
}
},
"required": [
"column",
"limit"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getObservationFilterValues",
"arguments": {
"column": "name",
"limit": 50,
"cursor": "string",
"fromStartTime": "2026-05-15T12:00:00.000Z",
"hasParentObservation": true,
"observationType": "SPAN",
"toStartTime": "2026-05-15T12:00:00.000Z"
}
}
}listScores
Find scores in the current Langfuse project. Uses the v2 /api/public/v2/scores semantics for numeric, categorical, boolean, correction, and text scores across traces, observations, sessions, and dataset runs. Results are paginated with page and limit and return exactly data and meta at the top level.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"page": {
"default": 1,
"type": "number",
"exclusiveMinimum": 0
},
"limit": {
"default": 50,
"type": "number",
"maximum": 100
},
"fields": {
"default": [
"score",
"trace"
],
"description": "Response field groups to include. 'score' is always required. Include 'trace' when filtering by userId or traceTags.",
"type": "array",
"items": {
"type": "string",
"enum": [
"score",
"trace"
]
}
},
"userId": {
"type": "string"
},
"dataType": {
"type": "string",
"enum": [
"NUMERIC",
"CATEGORICAL",
"BOOLEAN",
"CORRECTION",
"TEXT"
]
},
"configId": {
"type": "string"
},
"queueId": {
"type": "string"
},
"traceTags": {
"description": "Trace tags to filter by.",
"type": "array",
"items": {
"type": "string"
}
},
"environment": {
"description": "Score environments to filter by.",
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"fromTimestamp": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"toTimestamp": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"source": {
"type": "string",
"enum": [
"API",
"EVAL",
"ANNOTATION"
]
},
"value": {
"type": "number"
},
"operator": {
"type": "string",
"enum": [
"<",
">",
"<=",
">=",
"!=",
"="
]
},
"scoreIds": {
"type": "array",
"items": {
"type": "string"
}
},
"sessionId": {
"type": "string"
},
"traceId": {
"type": "string"
},
"datasetRunId": {
"type": "string"
},
"observationId": {
"type": "array",
"items": {
"type": "string"
}
},
"filter": {
"description": "Advanced score filters as JSON objects with column, operator, value, and type.",
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
">",
"<",
">=",
"<="
]
},
"value": {},
"type": {
"type": "string",
"const": "datetime"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "categoryOptions"
},
"column": {
"type": "string"
},
"key": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"type",
"column",
"key",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"any of",
"none of",
"all of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "arrayOptions"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "stringObject"
},
"column": {
"type": "string"
},
"key": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
}
},
"required": [
"type",
"column",
"key",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "numberObject"
},
"column": {
"type": "string"
},
"key": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
}
},
"required": [
"type",
"column",
"key",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "boolean"
},
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
"<>"
]
},
"value": {
"type": "boolean"
}
},
"required": [
"type",
"column",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "null"
},
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"is null",
"is not null"
]
},
"value": {
"type": "string",
"const": ""
}
},
"required": [
"type",
"column",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "positionInTrace"
},
"column": {
"type": "string"
},
"operator": {
"type": "string",
"const": "="
},
"key": {
"type": "string",
"enum": [
"root",
"first",
"last",
"nthFromEnd",
"nthFromStart"
]
},
"value": {
"type": "number"
}
},
"required": [
"type",
"column",
"operator",
"key"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"page",
"limit",
"fields"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "listScores",
"arguments": {
"fields": [
"score",
"trace"
],
"limit": 50,
"page": 1,
"configId": "string",
"datasetRunId": "string",
"dataType": "NUMERIC",
"environment": [
"string"
],
"filter": [
{
"column": "string",
"operator": ">",
"type": "datetime",
"value": {}
}
],
"fromTimestamp": "2026-05-15T12:00:00.000Z",
"name": "string",
"observationId": [
"string"
],
"operator": "<",
"queueId": "string",
"scoreIds": [
"string"
],
"sessionId": "string",
"source": "API",
"toTimestamp": "2026-05-15T12:00:00.000Z",
"traceId": "string",
"traceTags": [
"string"
],
"userId": "string",
"value": 1.23
}
}
}getScore
Fetch one score by ID from the current Langfuse project using the v2 /api/public/v2/scores/{scoreId} semantics. Returns the public score object directly.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"scoreId": {
"type": "string"
}
},
"required": [
"scoreId"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getScore",
"arguments": {
"scoreId": "string"
}
}
}createScore
Create one score in the current Langfuse project using the v1 /api/public/scores route semantics. This is the v1 fallback because score creation has no v2 public route.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"name": {
"type": "string",
"minLength": 1
},
"traceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sessionId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"datasetRunId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"observationId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"comment": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
]
},
{
"type": "null"
}
]
},
"environment": {
"default": "default",
"type": "string"
},
"queueId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source": {
"default": "API",
"type": "string",
"enum": [
"API",
"ANNOTATION"
]
}
},
"required": [
"name",
"environment",
"source"
],
"additionalProperties": false
},
{
"oneOf": [
{
"type": "object",
"properties": {
"value": {
"type": "number"
},
"dataType": {
"type": "string",
"const": "NUMERIC"
},
"configId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"value",
"dataType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"value": {
"type": "string"
},
"dataType": {
"type": "string",
"const": "CATEGORICAL"
},
"configId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"value",
"dataType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"value": {
"type": "number"
},
"dataType": {
"type": "string",
"const": "BOOLEAN"
},
"configId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"value",
"dataType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"value": {
"type": "string"
},
"dataType": {
"type": "string",
"const": "CORRECTION"
},
"configId": {
"anyOf": [
{},
{
"type": "null"
}
]
}
},
"required": [
"value",
"dataType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"value": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"dataType": {
"type": "string",
"const": "TEXT"
},
"configId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"value",
"dataType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"dataType": {},
"configId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"value"
],
"additionalProperties": false
}
]
}
],
"definitions": {
"__schema0": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
]
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "createScore",
"arguments": {
"environment": "default",
"name": "string",
"source": "API",
"comment": "string",
"datasetRunId": "string",
"id": "string",
"metadata": [
{}
],
"observationId": "string",
"queueId": "string",
"sessionId": "string",
"traceId": "string",
"dataType": "NUMERIC",
"value": 1.23,
"configId": "string"
}
}
}deleteScore
Delete one score from the current Langfuse project using the v1 /api/public/scores/{scoreId} route semantics. This is the v1 fallback because score deletion has no v2 public route.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"scoreId": {
"type": "string"
}
},
"required": [
"scoreId"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "deleteScore",
"arguments": {
"scoreId": "string"
}
}
}listScoreConfigs
List score configurations in the current Langfuse project. Returns exactly data and meta at the top level.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"page": {
"default": 1,
"type": "number",
"exclusiveMinimum": 0
},
"limit": {
"default": 50,
"type": "number",
"maximum": 100
}
},
"required": [
"page",
"limit"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "listScoreConfigs",
"arguments": {
"limit": 50,
"page": 1
}
}
}getScoreConfig
Fetch one score configuration by ID from the current Langfuse project. Returns the public score config object directly.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"configId": {
"type": "string"
}
},
"required": [
"configId"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getScoreConfig",
"arguments": {
"configId": "string"
}
}
}createScoreConfig
Create a score configuration in the current Langfuse project. Supports numeric, categorical, boolean, and text configs. Boolean configs automatically receive True and False categories.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 35,
"pattern": "^[\\p{L}\\p{N}_ .()-]+$",
"description": "Allowed characters: letters, numbers, spaces, underscores, periods, parentheses, and hyphens."
}
},
"required": [
"name"
],
"additionalProperties": false
},
{
"oneOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 35,
"pattern": "^[\\p{L}\\p{N}_ .()-]+$"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"maxValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"minValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"dataType": {
"type": "string",
"const": "NUMERIC"
},
"categories": {
"anyOf": [
{},
{
"type": "null"
}
]
}
},
"required": [
"name",
"dataType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 35,
"pattern": "^[\\p{L}\\p{N}_ .()-]+$"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"maxValue": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"minValue": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"dataType": {
"type": "string",
"const": "CATEGORICAL"
},
"categories": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
]
}
},
"required": [
"name",
"dataType",
"categories"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 35,
"pattern": "^[\\p{L}\\p{N}_ .()-]+$"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"dataType": {
"type": "string",
"const": "BOOLEAN"
},
"categories": {}
},
"required": [
"name",
"dataType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 35,
"pattern": "^[\\p{L}\\p{N}_ .()-]+$"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"dataType": {
"type": "string",
"const": "TEXT"
},
"categories": {},
"maxValue": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"minValue": {
"anyOf": [
{},
{
"type": "null"
}
]
}
},
"required": [
"name",
"dataType"
],
"additionalProperties": false
}
]
}
],
"definitions": {
"__schema0": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
]
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "createScoreConfig",
"arguments": {
"name": "string",
"dataType": "NUMERIC",
"categories": {},
"description": "string",
"maxValue": 1.23,
"minValue": 1.23
}
}
}updateScoreConfig
Update a score configuration in the current Langfuse project. Use this to rename, describe, or adjust allowed numeric/category fields.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"allOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 35,
"pattern": "^[\\p{L}\\p{N}_ .()-]+$",
"description": "Allowed characters: letters, numbers, spaces, underscores, periods, parentheses, and hyphens."
}
},
"additionalProperties": false
},
{
"type": "object",
"properties": {
"configId": {
"type": "string"
}
},
"required": [
"configId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 35,
"pattern": "^[\\p{L}\\p{N}_ .()-]+$"
},
"minValue": {
"type": "number"
},
"maxValue": {
"type": "number"
},
"categories": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
]
},
"description": {
"type": "string"
}
},
"additionalProperties": false
}
],
"definitions": {
"__schema0": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/definitions/__schema0"
}
},
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
]
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "updateScoreConfig",
"arguments": {
"name": "string",
"configId": "string",
"categories": [
{}
],
"description": "string",
"maxValue": 1.23,
"minValue": 1.23
}
}
}deleteScoreConfig
Delete a score configuration from the current Langfuse project by archiving it.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"configId": {
"type": "string"
}
},
"required": [
"configId"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "deleteScoreConfig",
"arguments": {
"configId": "string"
}
}
}queryMetrics
Answer analytics questions about the current Langfuse project, such as usage over time, model costs, latency, errors, scores, or grouped breakdowns by environment, trace, observation, model, user, session, tag, or score name.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"view": {
"type": "string",
"enum": [
"observations",
"scores-numeric",
"scores-categorical"
]
},
"dimensions": {
"default": [],
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
}
},
"required": [
"field"
],
"additionalProperties": false
}
},
"metrics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"measure": {
"type": "string"
},
"aggregation": {
"type": "string",
"enum": [
"sum",
"avg",
"count",
"max",
"min",
"p50",
"p75",
"p90",
"p95",
"p99",
"histogram",
"uniq"
]
}
},
"required": [
"measure",
"aggregation"
],
"additionalProperties": false
}
},
"filters": {
"default": [],
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
">",
"<",
">=",
"<="
]
},
"value": {},
"type": {
"type": "string",
"const": "datetime"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
},
"type": {
"type": "string",
"const": "string"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
},
"type": {
"type": "string",
"const": "number"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "stringOptions"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "categoryOptions"
},
"column": {
"type": "string"
},
"key": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"any of",
"none of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"type",
"column",
"key",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"any of",
"none of",
"all of"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "arrayOptions"
}
},
"required": [
"column",
"operator",
"value",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "stringObject"
},
"column": {
"type": "string"
},
"key": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
"contains",
"does not contain",
"starts with",
"ends with"
]
},
"value": {
"type": "string"
}
},
"required": [
"type",
"column",
"key",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "numberObject"
},
"column": {
"type": "string"
},
"key": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
">",
"<",
">=",
"<="
]
},
"value": {
"type": "number"
}
},
"required": [
"type",
"column",
"key",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "boolean"
},
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"=",
"<>"
]
},
"value": {
"type": "boolean"
}
},
"required": [
"type",
"column",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "null"
},
"column": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"is null",
"is not null"
]
},
"value": {
"type": "string",
"const": ""
}
},
"required": [
"type",
"column",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "positionInTrace"
},
"column": {
"type": "string"
},
"operator": {
"type": "string",
"const": "="
},
"key": {
"type": "string",
"enum": [
"root",
"first",
"last",
"nthFromEnd",
"nthFromStart"
]
},
"value": {
"type": "number"
}
},
"required": [
"type",
"column",
"operator",
"key"
],
"additionalProperties": false
}
]
}
},
"timeDimension": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"granularity": {
"type": "string",
"enum": [
"auto",
"minute",
"hour",
"day",
"week",
"month"
]
}
},
"required": [
"granularity"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"fromTimestamp": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"toTimestamp": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"orderBy": {
"default": null,
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"direction": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
"required": [
"field",
"direction"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"config": {
"type": "object",
"properties": {
"bins": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"row_limit": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 1000
}
},
"additionalProperties": false
}
},
"required": [
"view",
"dimensions",
"metrics",
"filters",
"timeDimension",
"fromTimestamp",
"toTimestamp",
"orderBy"
],
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "queryMetrics",
"arguments": {
"dimensions": [],
"filters": [],
"fromTimestamp": "2026-05-15T12:00:00.000Z",
"metrics": [
{
"aggregation": "sum",
"measure": "string"
}
],
"orderBy": null,
"timeDimension": null,
"toTimestamp": "2026-05-15T12:00:00.000Z",
"view": "observations",
"config": {
"bins": 1,
"row_limit": 1
}
}
}
}getMetricsSchema
Discover which Langfuse metrics can be analyzed and how to group, filter, aggregate, and time-bucket them before calling queryMetrics.
Input schema and generated requestExpandCollapse
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"view": {
"description": "Limit the response to one v2 metrics view",
"type": "string",
"enum": [
"observations",
"scores-numeric",
"scores-categorical"
]
}
},
"additionalProperties": false
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getMetricsSchema",
"arguments": {
"view": "observations"
}
}
}Langfuse Docs MCP
Unauthenticated MCP server for Langfuse documentation search and retrieval.
https://langfuse.com/api/mcpClient setup
Cursor mcp.json
json
{
"mcpServers": {
"langfuse-docs": {
"url": "https://langfuse.com/api/mcp"
}
}
}Tools
searchLangfuseDocs
Semantic search (RAG) over the Langfuse documentation. Use this whenever the user asks a broader question that cannot be answered by a specific single page. Returns a concise answer synthesized from relevant docs. The raw provider response is included in _meta. Prefer this before guessing. If a specific page is needed call getLangfuseDocsPage first.
Input schema and generated requestExpandCollapse
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The user's question in natural language. Include helpful context like SDK/language (e.g., Python v3, JS v4), self-hosted vs cloud, and short error messages (trim long stack traces). Keep under ~600 characters."
}
},
"required": [
"query"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "searchLangfuseDocs",
"arguments": {
"query": "string"
}
}
}getLangfuseDocsPage
Fetch the raw Markdown for a single Langfuse docs page. Accepts a docs path (e.g., /docs/observability/overview) or a full https://langfuse.com URL. Returns the exact Markdown (may include front matter). Use when you need a specific page content (Integration, Features, API, etc.) or code samples. Prefer searchLangfuseDocs for broader questions where there is not one specific page about it.
Input schema and generated requestExpandCollapse
{
"type": "object",
"properties": {
"pathOrUrl": {
"type": "string",
"description": "Docs path starting with \"/\" (e.g., /docs/observability/overview) or a full URL on https://langfuse.com. Do not include anchors (#...) or queries (?foo=bar) — they will be ignored."
}
},
"required": [
"pathOrUrl"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getLangfuseDocsPage",
"arguments": {
"pathOrUrl": "string"
}
}
}getLangfuseOverview
Get a high-level, machine-readable index by downloading https://langfuse.com/llms.txt. Use this at the start of a session when needed to discover key docs endpoints or to seed follow-up calls to searchLangfuseDocs or getLangfuseDocsPage. Returns the plain text contents of llms.txt. Avoid repeated calls within the same session.
Input schema and generated requestExpandCollapse
{
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "getLangfuseOverview",
"arguments": {}
}
}