Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

get-prompt-version-by-tag

Retrieve a specific prompt version by its tag, including the template, model configuration, and invocation parameters. Example: Fetch the 'production' tagged version of prompt 'article-summarizer'.

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

  • Handler function that fetches the prompt version by tag using PhoenixClient API call to /v1/prompts/{prompt_identifier}/tags/{tag_name} and returns the JSON-formatted response.
    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: requires prompt_identifier and tag_name as strings.
    export const getPromptVersionByTagSchema = z.object({ prompt_identifier: z.string(), tag_name: z.string(), });
  • Registration of the 'get-prompt-version-by-tag' tool on the MCP server, including name, description, schema, and handler.
    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