Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

get-prompt-version-by-tag

Retrieve a specific prompt version using its tag name to access the template, model configuration, and invocation parameters for deployment or reference.

Instructions

Get a prompt version by its tag name. Returns the prompt version with its template, model configuration, and invocation parameters.

Example usage: Get the 'production' tagged version of prompt 'article-summarizer'

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_identifierYes
tag_nameYes

Implementation Reference

  • The tool handler function that performs a GET request to the Phoenix API endpoint /v1/prompts/{prompt_identifier}/tags/{tag_name} using the provided PhoenixClient instance and returns the JSON-stringified response data as text content.
    async ({ prompt_identifier, tag_name }) => { const response = await client.GET( "/v1/prompts/{prompt_identifier}/tags/{tag_name}", { params: { path: { prompt_identifier, tag_name, }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], };
  • Zod schema for input validation, requiring 'prompt_identifier' and 'tag_name' as strings.
    export const getPromptVersionByTagSchema = z.object({ prompt_identifier: z.string(), tag_name: z.string(), });
  • Tool registration call using McpServer.tool(), specifying the tool name, description constant, schema shape, and inline handler function.
    server.tool( "get-prompt-version-by-tag", GET_PROMPT_VERSION_BY_TAG_DESCRIPTION, getPromptVersionByTagSchema.shape, async ({ prompt_identifier, tag_name }) => { const response = await client.GET( "/v1/prompts/{prompt_identifier}/tags/{tag_name}", { params: { path: { prompt_identifier, tag_name, }, }, } ); 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