Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

get-prompt-version

Retrieve a specific prompt version by its ID to access its template, model configuration, and invocation parameters for consistent AI interactions.

Instructions

Get a specific version of a prompt using its version ID. Returns the prompt version with its template, model configuration, and invocation parameters.

Example usage: Get a specific prompt version with ID 'promptversionid1234'

Expected return: Prompt version object with template 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_version_idYes

Implementation Reference

  • Registration of the 'get-prompt-version' tool on the MCP server, including the handler function that retrieves a specific prompt version by ID using the PhoenixClient API and returns the JSON response.
    server.tool( "get-prompt-version", GET_PROMPT_VERSION_DESCRIPTION, getPromptVersionSchema.shape, async ({ prompt_version_id }) => { const response = await client.GET( "/v1/prompt_versions/{prompt_version_id}", { params: { path: { prompt_version_id, }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } );
  • The handler function for 'get-prompt-version' tool: takes prompt_version_id, calls PhoenixClient GET /v1/prompt_versions/{id}, and returns the data as text content.
    async ({ prompt_version_id }) => { const response = await client.GET( "/v1/prompt_versions/{prompt_version_id}", { params: { path: { prompt_version_id, }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
  • Zod schema defining the input for 'get-prompt-version': requires a 'prompt_version_id' string.
    export const getPromptVersionSchema = z.object({ prompt_version_id: z.string(), });
  • Invocation of initializePromptTools which registers all prompt tools including 'get-prompt-version' on the MCP server.
    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