list-projects
Retrieve all available projects to organize traces, spans, and observability data for applications or experiments.
Instructions
Get a list of all projects.
Projects are containers for organizing traces, spans, and other observability data. Each project has a unique name and can contain traces from different applications or experiments.
Example usage: Show me all available projects
Expected return: Array of project objects with metadata. Example: [ { "id": "UHJvamVjdDox", "name": "default", "description": "Default project for traces" }, { "id": "UHJvamVjdDoy", "name": "my-experiment", "description": "Project for my ML experiment" } ]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| cursor | No | ||
| includeExperimentProjects | No |
Implementation Reference
- Handler function that fetches projects from the Phoenix API using GET /v1/projects and returns the data as a formatted JSON string in the MCP response format.async ({ limit = 100, cursor, includeExperimentProjects = false }) => { const response = await client.GET("/v1/projects", { params: { query: { limit, cursor, include_experiment_projects: includeExperimentProjects, }, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data?.data, null, 2), }, ], }; }
- Zod input schema for the list-projects tool parameters: limit (1-100), cursor, includeExperimentProjects.{ limit: z.number().min(1).max(100).default(100).optional(), cursor: z.string().optional(), includeExperimentProjects: z.boolean().default(false).optional(), },
- js/packages/phoenix-mcp/src/projectTools.ts:36-63 (registration)Registers the list-projects tool on the MCP server with description, input schema, and handler function.server.tool( "list-projects", LIST_PROJECTS_DESCRIPTION, { limit: z.number().min(1).max(100).default(100).optional(), cursor: z.string().optional(), includeExperimentProjects: z.boolean().default(false).optional(), }, async ({ limit = 100, cursor, includeExperimentProjects = false }) => { const response = await client.GET("/v1/projects", { params: { query: { limit, cursor, include_experiment_projects: includeExperimentProjects, }, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data?.data, null, 2), }, ], }; } );