list-datasets
Retrieve available datasets containing inputs, outputs, and metadata for use as experiment inputs in the Arize Phoenix platform.
Instructions
Get a list of all datasets.
Datasets are collections of 'dataset examples' that each example includes an input, (expected) output, and optional metadata. They are primarily used as inputs for experiments.
Example usage: Show me all available datasets
Expected return: Array of dataset objects with metadata. Example: [ { "id": "RGF0YXNldDox", "name": "my-dataset", "description": "A dataset for testing", "metadata": {}, "created_at": "2024-03-20T12:00:00Z", "updated_at": "2024-03-20T12:00:00Z" } ]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Implementation Reference
- Handler function that fetches the list of datasets from the PhoenixClient API using GET /v1/datasets and returns the JSON-stringified data.async ({ limit }) => { const response = await client.GET("/v1/datasets", { params: { query: { limit }, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data?.data, null, 2), }, ], }; }
- Zod input schema defining the optional 'limit' parameter (1-100, default 100).{ limit: z.number().min(1).max(100).default(100), },
- js/packages/phoenix-mcp/src/datasetTools.ts:102-123 (registration)Tool registration call using McpServer.tool() with name 'list-datasets', description, input schema, and handler function.server.tool( "list-datasets", LIST_DATASETS_DESCRIPTION, { limit: z.number().min(1).max(100).default(100), }, async ({ limit }) => { const response = await client.GET("/v1/datasets", { params: { query: { limit }, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data?.data, null, 2), }, ], }; } );