Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

list-prompt-versions

Retrieve all versions of a specific prompt with pagination support to track changes and configurations over time.

Instructions

Get a list of all versions for a specific prompt. Returns versions with pagination support.

Example usage: List all versions of a prompt named 'article-summarizer'

Expected return: Array of prompt version objects with IDs and configuration. Example: [ { "description": "Initial version", "model_provider": "OPENAI", "model_name": "gpt-3.5-turbo", "template": { "type": "chat", "messages": [ { "role": "system", "content": "You are an expert summarizer. Create clear, concise bullet points highlighting the key information." }, { "role": "user", "content": "Please summarize the following {{topic}} article:

{{article}}" } ] }, "template_type": "CHAT", "template_format": "MUSTACHE", "invocation_parameters": { "type": "openai", "openai": {} }, "id": "promptversionid1234" } ]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prompt_identifierYes
limitNo

Implementation Reference

  • The handler function for 'list-prompt-versions' tool. It makes a GET request to the Phoenix API endpoint /v1/prompts/{prompt_identifier}/versions with optional limit query param and returns the JSON response as text content.
    async ({ prompt_identifier, limit }) => { const response = await client.GET( "/v1/prompts/{prompt_identifier}/versions", { params: { path: { prompt_identifier, }, query: { limit, }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
  • Registration of the 'list-prompt-versions' tool using server.tool(), including name, description, schema, and inline handler.
    server.tool( "list-prompt-versions", LIST_PROMPT_VERSIONS_DESCRIPTION, listPromptVersionsSchema.shape, async ({ prompt_identifier, limit }) => { const response = await client.GET( "/v1/prompts/{prompt_identifier}/versions", { params: { path: { prompt_identifier, }, query: { limit, }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } );
  • Zod schema for the tool's input parameters: prompt_identifier (required string) and limit (optional number between 1-100, default 100).
    export const listPromptVersionsSchema = z.object({ prompt_identifier: z.string(), limit: z.number().min(1).max(100).default(100), });
  • Detailed description string for the 'list-prompt-versions' tool, used during registration.
    const LIST_PROMPT_VERSIONS_DESCRIPTION = `Get a list of all versions for a specific prompt. Returns versions with pagination support. Example usage: List all versions of a prompt named 'article-summarizer' Expected return: Array of prompt version objects with IDs and configuration. Example: [ { "description": "Initial version", "model_provider": "OPENAI", "model_name": "gpt-3.5-turbo", "template": { "type": "chat", "messages": [ { "role": "system", "content": "You are an expert summarizer. Create clear, concise bullet points highlighting the key information." }, { "role": "user", "content": "Please summarize the following {{topic}} article:\n\n{{article}}" } ] }, "template_type": "CHAT", "template_format": "MUSTACHE", "invocation_parameters": { "type": "openai", "openai": {} }, "id": "promptversionid1234" } ]`;
  • Top-level call to initializePromptTools, which registers the 'list-prompt-versions' tool among others.
    initializePromptTools({ client, server });

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