Skip to main content
Glama

@arizeai/phoenix-mcp

Official
by Arize-ai
getDatasetInfoByName.ts987 B
import { createClient } from "../client"; import { ClientFn } from "../types/core"; import { DatasetInfo } from "../types/datasets"; export type GetDatasetParams = ClientFn & { datasetName: string; }; /** * Get the information of a dataset via the name */ export async function getDatasetInfoByName({ client: _client, datasetName, }: GetDatasetParams): Promise<DatasetInfo> { const client = _client || createClient(); const response = await client.GET("/v1/datasets", { params: { query: { name: datasetName, }, }, }); if (response.data?.data?.length) { const datasetInfo = response.data.data[0]; if (!datasetInfo) { throw new Error(`Dataset with name ${datasetName} not found`); } return { id: datasetInfo.id, name: datasetInfo.name, description: datasetInfo.description || undefined, metadata: datasetInfo.metadata, }; } throw new Error(`Dataset with name ${datasetName} not found`); }

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