Skip to main content
Glama
avivsinai

langfuse-mcp

fetch_sessions

Retrieve sessions from your Langfuse project. Filter by age in minutes, paginate results, and choose output format: compact JSON, full JSON string, or save to file.

Instructions

Get a list of sessions in the current project.

Args:
    ctx: Context object containing lifespan context with Langfuse client
    age: Minutes ago to start looking (e.g., 1440 for 24 hours)
    page: Page number for pagination (starts at 1)
    limit: Maximum number of sessions to return per page
    output_mode: Controls the output format and detail level

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ageYesMinutes ago to start looking (e.g., 1440 for 24 hours)
pageNoPage number for pagination (starts at 1)
limitNoMaximum number of sessions 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
Behavior4/5

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

With no annotations, the description effectively reveals behavior: it paginates, accepts an age filter, and offers three output modes. It does not mention side effects or authorization, but for a read-only listing tool, this is sufficient.

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 Args and Returns sections. Each sentence adds value, though it could be slightly more concise. Still efficient and front-loaded.

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 tool's complexity (4 params, enum, output schema), the description covers the core functionality, pagination, and output modes. It does not explain 'current project' scope or connection to other tools, but overall it provides enough context for correct invocation.

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?

Schema coverage is 100%, so baseline is 3. The description adds significant value by detailing the output_mode parameter and its three options, plus clarifying pagination parameters (page, limit) and the purpose of age. This exceeds the schema.

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 'Get a list of sessions in the current project', identifying the resource and action. However, it does not differentiate from sibling tools like get_session_details or get_user_sessions, which could cause ambiguity.

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 implies usage for listing sessions but provides no explicit guidance on when to use this tool versus alternatives, nor any conditions or exclusions. Agents must infer based on the tool name.

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