Skip to main content
Glama
therealsachin

Langfuse MCP Server

get_projects

Retrieve available Langfuse projects to analyze analytics, cost metrics, and usage data across your AI applications.

Instructions

List available Langfuse projects (alias for list_projects).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the 'get_projects' tool. It retrieves the current project ID using the client and formats it as a JSON response containing a list of projects. This is an alias implementation for list_projects.
    export async function getProjects(client: LangfuseAnalyticsClient) {
      const projectId = client.getProjectId();
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify({ projects: [projectId] }, null, 2),
          },
        ],
      };
    }
  • Zod schema for validating input arguments to the get_projects tool. Defines an empty object schema as the tool takes no parameters.
    export const getProjectsSchema = z.object({});
  • src/index.ts:290-297 (registration)
    Registration of the 'get_projects' tool in the allTools array used by the ListToolsRequestSchema handler. This defines the tool's metadata exposed to MCP clients.
    {
      name: 'get_projects',
      description: 'List available Langfuse projects (alias for list_projects).',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:1031-1034 (registration)
    Tool dispatcher case in the CallToolRequestSchema handler's switch statement. Parses arguments using the schema and delegates execution to the getProjects handler function.
    case 'get_projects': {
      const args = getProjectsSchema.parse(request.params.arguments);
      return await getProjects(this.client);
    }
  • Inclusion of 'get_projects' in the readOnlyTools Set, allowing it in readonly mode configurations.
    'get_projects',
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It states this is a list operation (implying read-only), which is appropriate, but doesn't disclose any behavioral traits like pagination, rate limits, or what 'available' means (e.g., active vs. archived projects). The description adds minimal behavioral context beyond the implied read operation.

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

Conciseness5/5

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

The description is a single, efficient sentence that conveys all essential information: the action, resource, and alias relationship. There's zero waste, and it's perfectly front-loaded with the core purpose.

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 simplicity (0 parameters, no output schema, no annotations), the description is reasonably complete. It clearly states what the tool does and its relationship to list_projects. However, without annotations or output schema, it could benefit from mentioning what information is returned (e.g., project names, IDs, status) or any constraints, keeping it from a perfect score.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the lack of parameters. The description doesn't need to add parameter information, and it appropriately doesn't mention any parameters. A baseline of 4 is appropriate for zero-parameter tools with complete schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 a specific verb ('List') and resource ('Langfuse projects'), and explicitly distinguishes it from its sibling 'list_projects' by noting it's an alias. This provides perfect clarity about what the tool does and its relationship to alternatives.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool by indicating it's an 'alias for list_projects', providing clear guidance on alternatives. This directly tells the agent that this tool and list_projects are interchangeable, which is ideal usage guidance.

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/therealsachin/langfuse-mcp'

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