get-dataset-experiments
Retrieve all experiments conducted on a specific dataset to analyze testing history and metadata.
Instructions
List experiments run on a dataset.
Example usage: Show me all experiments run on dataset RGF0YXNldDox
Expected return: Array of experiment objects with metadata. Example: [ { "id": "experimentid1234", "dataset_id": "datasetid1234", "dataset_version_id": "datasetversionid1234", "repetitions": 1, "metadata": {}, "project_name": "Experiment-abc123", "created_at": "YYYY-MM-DDTHH:mm:ssZ", "updated_at": "YYYY-MM-DDTHH:mm:ssZ" } ]
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datasetId | Yes |
Implementation Reference
- The core handler function for the "get-dataset-experiments" tool. It fetches experiments for the given datasetId via the PhoenixClient API and returns a text content block with the JSON-stringified response data.async ({ datasetId }) => { const response = await client.GET( "/v1/datasets/{dataset_id}/experiments", { params: { path: { dataset_id: datasetId }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- Zod input schema for the tool, defining 'datasetId' as a required string parameter.{ datasetId: z.string(), },
- js/packages/phoenix-mcp/src/datasetTools.ts:146-170 (registration)Registration of the "get-dataset-experiments" MCP tool using McpServer.tool(), including the tool name, description reference, input schema, and inline handler function.server.tool( "get-dataset-experiments", GET_DATASET_EXPERIMENTS_DESCRIPTION, { datasetId: z.string(), }, async ({ datasetId }) => { const response = await client.GET( "/v1/datasets/{dataset_id}/experiments", { params: { path: { dataset_id: datasetId }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } );
- Description constant for the "get-dataset-experiments" tool, providing usage examples and expected return format.const GET_DATASET_EXPERIMENTS_DESCRIPTION = `List experiments run on a dataset. Example usage: Show me all experiments run on dataset RGF0YXNldDox Expected return: Array of experiment objects with metadata. Example: [ { "id": "experimentid1234", "dataset_id": "datasetid1234", "dataset_version_id": "datasetversionid1234", "repetitions": 1, "metadata": {}, "project_name": "Experiment-abc123", "created_at": "YYYY-MM-DDTHH:mm:ssZ", "updated_at": "YYYY-MM-DDTHH:mm:ssZ" } ]`;
- js/packages/phoenix-mcp/src/index.ts:42-42 (registration)Invocation of initializeDatasetTools function during MCP server setup, which registers the dataset tools including "get-dataset-experiments".initializeDatasetTools({ client, server });