Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

get-dataset-examples

Retrieve dataset examples including inputs, outputs, and metadata to test or benchmark model changes. Fetch structured data for application or model inputs in JSON format.

Instructions

Get examples from a dataset.

Dataset examples are an array of objects that each include an input, (expected) output, and optional metadata. These examples are typically used to represent input to an application or model (e.g. prompt template variables, a code file, or image) and used to test or benchmark changes.

Example usage: Show me all examples from dataset RGF0YXNldDox

Expected return: Object containing dataset ID, version ID, and array of examples. Example: { "dataset_id": "datasetid1234", "version_id": "datasetversionid1234", "examples": [ { "id": "exampleid1234", "input": { "text": "Sample input text" }, "output": { "text": "Expected output text" }, "metadata": {}, "updated_at": "YYYY-MM-DDTHH:mm:ssZ" } ] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetIdYes

Implementation Reference

  • Handler function that fetches and returns dataset examples from the Phoenix API using the provided datasetId.
    async ({ datasetId }) => { const response = await client.GET("/v1/datasets/{id}/examples", { params: { path: { id: datasetId }, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
  • Zod schema defining the input parameter 'datasetId' as a required string.
    { datasetId: z.string(), },
  • Registration of the 'get-dataset-examples' tool on the MCP server, including name, description reference, input schema, and handler.
    "get-dataset-examples", GET_DATASET_EXAMPLES_DESCRIPTION, { datasetId: z.string(), }, async ({ datasetId }) => { const response = await client.GET("/v1/datasets/{id}/examples", { params: { path: { id: datasetId }, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arize-ai/phoenix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server