MCPDocumentation
On this page

Conversations

Langfuse trace of a conversation

get_conversation_trace
Read
Permission required
conversations.view

When to use it

Per-turn summary of the Langfuse trace: models, tokens, cost, latency, errors and tools, plus the link. Voice (LiveKit): the session is the room. Text: the trace the quality analysis linked. With no trace, or Langfuse not configured, available=false with the reason.

Input

FieldTypeDescription
refRequiredstringConversation id or any external ref: LiveKit room name, LiveKit RM_…/EG_…, ElevenLabs id (conv_…), Instagram thread id, widget session, or a WhatsApp phone with a date (+34600111222@2026-11-20)
organization_idintegerOnly to repeat your organization (or, with an Autonex staff key, pick another one)

Every tool also accepts lang (es | en) for the language of the text answer.

Output

FieldTypeDescription
availableRequiredboolean
reasonRequired"no_trace_linked" | "langfuse_not_configured" | "langfuse_error" | "not_found_in_langfuse" | null
linked_byRequired"session" | "trace" | nullsession = LiveKit room; trace = trace linked by the quality analysis
idRequiredstring | null
urlRequiredstring | nullLangfuse link
totalsRequiredobject | null
turnsRequiredobject[]
turns[].trace_idRequiredstring
turns[].nameRequiredstring | null
turns[].atRequiredstring | null
turns[].latency_msRequirednumber | null
turns[].cost_usdRequirednumber | null
turns[].modelsRequiredstring[]
turns[].input_tokensRequirednumber
turns[].output_tokensRequirednumber
turns[].errorsRequiredstring[]
turns[].toolsRequiredstring[]
tool_callsRequiredobject[]Tool spans in Langfuse (complement get_conversation.tool_calls)
tool_calls[].sourceRequired"langfuse"
tool_calls[].nameRequiredstring
tool_calls[].atRequiredstring | null
tool_calls[].trace_idRequiredstring
tool_calls[].errorRequiredstring | null
truncatedRequiredboolean

Examples

Example 1: Why call 48213 was so slow

Call

JSON
{
  "name": "get_conversation_trace",
  "arguments": {
    "ref": "48213"
  }
}

Equivalent JSON-RPC call (POST /mcp)

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_conversation_trace",
    "arguments": {
      "ref": "48213"
    }
  }
}