Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

list-prompt-versions

Retrieve a paginated list of all versions for a specific prompt, including configurations and metadata, to manage and track prompt iterations effectively.

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
limitNo
prompt_identifierYes

Implementation Reference

  • The asynchronous handler function for the 'list-prompt-versions' tool. It fetches prompt versions for a given prompt_identifier using the PhoenixClient API and returns the response as formatted JSON text.
    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 input schema for the list-prompt-versions tool defining required prompt_identifier (string) and optional limit (number between 1-100, default 100).
    export const listPromptVersionsSchema = z.object({ prompt_identifier: z.string(), limit: z.number().min(1).max(100).default(100), });
  • MCP server tool registration for 'list-prompt-versions', specifying name, description, input schema shape, and inline handler function.
    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), }, ], }; } );

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