list-datasets
Retrieve a list of all available datasets, including their metadata, for use in experiments. Each dataset contains inputs, expected outputs, and optional metadata.
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
- The handler function for the 'list-datasets' tool. It calls the PhoenixClient GET /v1/datasets endpoint with an optional limit parameter and returns the JSON-stringified list of datasets.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 for the tool (1-100, default 100).limit: z.number().min(1).max(100).default(100), },
- js/packages/phoenix-mcp/src/datasetTools.ts:103-105 (registration)Registration of the 'list-datasets' tool using server.tool, including name, description reference, and schema."list-datasets", LIST_DATASETS_DESCRIPTION, {
- Tool description string used in registration, detailing purpose, usage, and expected output format.const LIST_DATASETS_DESCRIPTION = `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" } ]`;