Skip to main content
Glama

@arizeai/phoenix-mcp

Official
by Arize-ai
getDatasetInfo.ts1.26 kB
import invariant from "tiny-invariant"; import { createClient } from "../client"; import { ClientFn } from "../types/core"; import { DatasetSelector, DatasetInfo } from "../types/datasets"; import { getDatasetInfoByName } from "./getDatasetInfoByName"; export type GetDatasetInfoParams = ClientFn & { dataset: DatasetSelector; }; /** * Get an overview of the information in a dataset * Note: this does not include the examples contained in the dataset * Dataset info is not version-specific, only examples are versioned */ export async function getDatasetInfo({ client: _client, dataset, }: GetDatasetInfoParams): Promise<DatasetInfo> { const client = _client || createClient(); if ("datasetName" in dataset) { return await getDatasetInfoByName({ client, datasetName: dataset.datasetName, }); } const datasetResponse = await client.GET("/v1/datasets/{id}", { params: { path: { id: dataset.datasetId, }, }, }); invariant(datasetResponse.data?.data, "Failed to get dataset info"); const datasetInfo = datasetResponse.data.data; return { id: datasetInfo.id, name: datasetInfo.name, description: datasetInfo.description || undefined, metadata: datasetInfo.metadata, }; }

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