Skip to main content
Glama
avivsinai

langfuse-mcp

fetch_observations

Retrieve Langfuse observations by type, time range, and filters like name or user ID for debugging and analysis of LLM applications.

Instructions

Get observations filtered by type and other criteria.

Args:
    ctx: Context object containing lifespan context with Langfuse client
    type: The observation type to filter by (SPAN, GENERATION, or EVENT)
    age: Minutes ago to start looking (e.g., 1440 for 24 hours)
    name: Optional name filter (string pattern to match)
    user_id: Optional user ID filter (exact match)
    trace_id: Optional trace ID filter (exact match)
    parent_observation_id: Optional parent observation ID filter (exact match)
    page: Page number for pagination (starts at 1)
    limit: Maximum number of observations to return per page
    output_mode: Controls the output format and detail level

Returns:
    Based on output_mode:
    - compact: List of summarized observation objects
    - full_json_string: String containing the full JSON response
    - full_json_file: List of summarized observation objects with file save info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoThe observation type to filter by ('SPAN', 'GENERATION', or 'EVENT')
ageYesMinutes ago to start looking (e.g., 1440 for 24 hours)
nameNoOptional name filter (string pattern to match)
user_idNoOptional user ID filter (exact match)
trace_idNoOptional trace ID filter (exact match)
parent_observation_idNoOptional parent observation ID filter (exact match)
pageNoPage number for pagination (starts at 1)
limitNoMaximum number of observations to return per page
output_modeNoControls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized as a string. 'full_json_file': Returns a summarized JSON object AND saves the complete data to a file.compact

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns paginated results and describes output modes, which is useful behavioral context. However, it doesn't mention potential side effects, rate limits, authentication needs, or error handling, which are gaps for a tool with 9 parameters.

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

Conciseness3/5

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

The description is structured with sections for Args and Returns, which is helpful, but it's verbose due to repeating schema information. The first sentence is front-loaded, but the parameter listings could be more concise since they duplicate schema content.

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 complexity (9 parameters, pagination, multiple output modes) and 100% schema coverage with an output schema (implied by Returns section), the description is fairly complete. It explains the output modes in detail, which compensates for the lack of annotations. However, it could better address usage context relative to siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description repeats parameter information in the 'Args' section without adding significant meaning beyond what's in the schema. The baseline is 3 when schema coverage is high.

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 the tool's purpose with 'Get observations filtered by type and other criteria,' which specifies the verb (get/fetch) and resource (observations). However, it doesn't explicitly distinguish this tool from its sibling 'fetch_observation' (singular), which appears to fetch a single observation rather than multiple filtered ones.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'fetch_observation' (singular) or other filtering tools like 'fetch_traces,' leaving the agent without context for tool selection.

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/avivsinai/landfuse-mcp'

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