Skip to main content
Glama

list_projects

Retrieve available Langfuse projects to analyze analytics, costs, and usage data across multiple configurations.

Instructions

List configured Langfuse projects available to this MCP server.

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The main handler function for the 'list_projects' tool. It retrieves the current project ID using the client and returns it as a JSON-formatted text content block.
    export async function listProjects(client: LangfuseAnalyticsClient) { const projectId = client.getProjectId(); return { content: [ { type: 'text' as const, text: JSON.stringify({ projects: [projectId] }, null, 2), }, ], }; }
  • Zod validation schema for the 'list_projects' tool input parameters. This tool takes no arguments.
    export const listProjectsSchema = z.object({});
  • src/index.ts:150-157 (registration)
    Registration of the 'list_projects' tool in the allTools array, which is used to respond to ListToolsRequest. Defines name, description, and input schema.
    { name: 'list_projects', description: 'List configured Langfuse projects available to this MCP server.', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:1000-1003 (registration)
    Dispatch logic in the CallToolRequest handler that validates input using listProjectsSchema and invokes the listProjects handler function.
    case 'list_projects': { const args = listProjectsSchema.parse(request.params.arguments); return await listProjects(this.client); }
  • src/index.ts:52-52 (registration)
    Import statement that brings the handler and schema into the main index file for use in tool dispatching.
    import { listProjects, listProjectsSchema } from './tools/list-projects.js';

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-server'

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