List projects
listProjectsRetrieve projects accessible to your Langfuse API key, typically a single project. Use this tool to identify which project you are working with.
Instructions
List projects accessible to the current API key (typically a single project).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:328-337 (handler)The handler for the 'listProjects' tool. It is registered via server.registerTool with the name 'listProjects', has no input schema, and calls GET /api/public/projects on the Langfuse client, formatting the result as JSON.
// ---------- Projects ---------- server.registerTool( "listProjects", { title: "List projects", description: "List projects accessible to the current API key (typically a single project).", inputSchema: {}, }, async () => asJson(await client.get("/api/public/projects")), ); - src/tools.ts:328-337 (registration)Registration of the 'listProjects' tool via server.registerTool on lines 329-337. The registerTools function (line 12) is called from src/index.ts (line 59) to wire up all tools.
// ---------- Projects ---------- server.registerTool( "listProjects", { title: "List projects", description: "List projects accessible to the current API key (typically a single project).", inputSchema: {}, }, async () => asJson(await client.get("/api/public/projects")), ); - src/tools.ts:392-420 (registration)The TOOL_NAMES const array includes 'listProjects' at line 415, used as a type-level list of all tool names for external reference.
export const TOOL_NAMES = [ "listTraces", "getTrace", "listObservations", "getObservation", "listSessions", "getSession", "listScores", "getScore", "listScoreConfigs", "getScoreConfig", "listPrompts", "getPrompt", "listDatasets", "getDataset", "listDatasetItems", "getDatasetItem", "listDatasetRuns", "getDatasetRun", "getMetrics", "getDailyMetrics", "listModels", "getModel", "listProjects", "listComments", "getComment", "getMedia", "getHealth", ] as const;