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. Enables precise prompt management and version control.

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

  • The handler function for the 'get-prompt-version' tool. It takes a prompt_version_id, makes a GET request to the Phoenix API endpoint /v1/prompt_versions/{prompt_version_id}, and returns the response data as a JSON-formatted text content block.
    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), }, ], }; }
  • Registration of the 'get-prompt-version' tool using server.tool(), including the tool name, description constant, input schema, and inline handler function. This is called within initializePromptTools.
    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), }, ], }; } );
  • Zod schema definition for the input parameters of the 'get-prompt-version' tool. Requires a single string parameter: prompt_version_id.
    export const getPromptVersionSchema = z.object({ prompt_version_id: z.string(), });

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