Skip to main content
Glama
avivsinai

langfuse-mcp

fetch_sessions

Retrieve and analyze user session data from Langfuse projects to monitor application interactions, with options for pagination, time filtering, and multiple output formats.

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
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 of behavioral disclosure. It describes the tool as a read operation ('Get'), which is correct, and details the return format options via output_mode. However, it doesn't mention important behavioral aspects like authentication requirements, rate limits, error handling, or whether the operation is idempotent. The description adds some value but leaves significant gaps.

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 clear sections (purpose, Args, Returns) and uses bullet points effectively. It's appropriately sized for a tool with 4 parameters and multiple output modes. However, the first sentence could be more front-loaded with key information, and some parameter details in the Args section are redundant with the schema.

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 moderate complexity (4 parameters, multiple output modes) and the presence of an output schema (implied by the Returns section), the description is reasonably complete. It explains the core functionality, parameters, and return formats. However, it lacks context about authentication, error cases, and differentiation from sibling tools, which prevents a perfect score.

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 some parameter information in the Args section but doesn't add meaningful semantic context beyond what's in the schema. For example, it doesn't explain why 'age' is required while others have defaults, or provide guidance on parameter combinations. The baseline 3 is appropriate when the schema does the heavy lifting.

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: 'Get a list of sessions in the current project.' It uses a specific verb ('Get') and resource ('sessions'), and specifies scope ('in the current project'). However, it doesn't explicitly distinguish this tool from sibling tools like 'get_user_sessions' or 'get_session_details', which would be needed for a perfect score.

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 sibling tools like 'get_user_sessions' or 'get_session_details', nor does it specify prerequisites or appropriate contexts for use. The only implicit guidance is the 'current project' scope, but this is insufficient for proper 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