Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

get-latest-prompt

Retrieve the most recent version of a prompt, including its template, model configuration, and invocation parameters, to ensure accurate and up-to-date execution.

Instructions

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

Example usage: Get the latest version of a prompt named '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

Implementation Reference

  • Handler function that executes the get-latest-prompt tool by calling the PhoenixClient GET API to retrieve the latest prompt version.
    async ({ prompt_identifier }) => { const response = await client.GET( "/v1/prompts/{prompt_identifier}/latest", { params: { path: { prompt_identifier, }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } );
  • Registration of the get-latest-prompt tool via server.tool() within initializePromptTools.
    "get-latest-prompt", GET_LATEST_PROMPT_DESCRIPTION, getLatestPromptSchema.shape, async ({ prompt_identifier }) => { const response = await client.GET( "/v1/prompts/{prompt_identifier}/latest", { params: { path: { prompt_identifier, }, }, } ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } );
  • Input schema validation using Zod for the prompt_identifier parameter.
    export const getLatestPromptSchema = z.object({ prompt_identifier: 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