Skip to main content
Glama

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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

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

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

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