Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

get-dataset-examples

Retrieve dataset examples containing inputs, outputs, and metadata for testing or benchmarking applications and models.

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 dataset examples from the Phoenix API endpoint /v1/datasets/{id}/examples using the provided datasetId and returns the JSON-stringified response as text content.
    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), }, ], }; }
  • Input schema for the tool, defining 'datasetId' as a required string parameter using Zod validation.
    { datasetId: z.string(), },
  • Registration of the 'get-dataset-examples' tool on the McpServer, specifying name, description, input schema, and handler function.
    server.tool( "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), }, ], }; } );
  • Detailed description string for the get-dataset-examples tool, including usage instructions and example input/output formats.
    const GET_DATASET_EXAMPLES_DESCRIPTION = `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" } ] }`;

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