Skip to main content
Glama

@arizeai/phoenix-mcp

Official
by Arize-ai
promptPlaygroundLoader.tsx776 B
import { LoaderFunctionArgs } from "react-router"; import { fetchPlaygroundPromptAsInstance } from "@phoenix/pages/playground/fetchPlaygroundPrompt"; export const promptPlaygroundLoader = async ({ params, }: LoaderFunctionArgs) => { const { promptId, versionId } = params; if (!promptId) { throw new Error("Prompt ID is required"); } const response = await fetchPlaygroundPromptAsInstance({ promptId, promptVersionId: versionId, }); if (!response) { throw new Error("Prompt not found"); } return { instanceWithPrompt: response.instance, templateFormat: response.promptVersion.templateFormat, requestedVersion: versionId, }; }; export type PromptPlaygroundLoaderData = Awaited< ReturnType<typeof promptPlaygroundLoader> >;

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