Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

list-prompt-versions

Retrieve all versions of a specific prompt with pagination support to track changes and configurations over time.

Instructions

Get a list of all versions for a specific prompt. Returns versions with pagination support.

Example usage: List all versions of a prompt named 'article-summarizer'

Expected return: Array of prompt version objects with IDs 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
limitNo

Implementation Reference

  • The handler function for 'list-prompt-versions' tool. It makes a GET request to the Phoenix API endpoint /v1/prompts/{prompt_identifier}/versions with optional limit query param and returns the JSON response as text content.
    async ({ prompt_identifier, limit }) => {
      const response = await client.GET(
        "/v1/prompts/{prompt_identifier}/versions",
        {
          params: {
            path: {
              prompt_identifier,
            },
            query: {
              limit,
            },
          },
        }
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Registration of the 'list-prompt-versions' tool using server.tool(), including name, description, schema, and inline handler.
    server.tool(
      "list-prompt-versions",
      LIST_PROMPT_VERSIONS_DESCRIPTION,
      listPromptVersionsSchema.shape,
      async ({ prompt_identifier, limit }) => {
        const response = await client.GET(
          "/v1/prompts/{prompt_identifier}/versions",
          {
            params: {
              path: {
                prompt_identifier,
              },
              query: {
                limit,
              },
            },
          }
        );
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      }
    );
  • Zod schema for the tool's input parameters: prompt_identifier (required string) and limit (optional number between 1-100, default 100).
    export const listPromptVersionsSchema = z.object({
      prompt_identifier: z.string(),
      limit: z.number().min(1).max(100).default(100),
    });
  • Detailed description string for the 'list-prompt-versions' tool, used during registration.
    const LIST_PROMPT_VERSIONS_DESCRIPTION = `Get a list of all versions for a specific prompt. Returns versions with pagination support.
    
    Example usage: 
      List all versions of a prompt named 'article-summarizer'
    
    Expected return: 
      Array of prompt version objects with IDs 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:\n\n{{article}}"
              }
            ]
          },
          "template_type": "CHAT",
          "template_format": "MUSTACHE",
          "invocation_parameters": {
            "type": "openai",
            "openai": {}
          },
          "id": "promptversionid1234"
        }
      ]`;
  • Top-level call to initializePromptTools, which registers the 'list-prompt-versions' tool among others.
    initializePromptTools({ client, server });
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it returns a paginated list (via 'Returns versions with pagination support'), specifies the return format as an array of prompt version objects, and includes a detailed example of the expected return structure. This covers read-only behavior and output expectations well, though it could mention error handling or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and key behavior, but the lengthy example return (over 20 lines) dominates the text, reducing conciseness. While the example is informative, it could be summarized more briefly. The structure is clear but could be more efficient by trimming redundant details in the example.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 2 parameters with 0% schema coverage, the description does well by explaining the tool's behavior and return format in detail. It covers the list operation, pagination, and provides a comprehensive return example, which compensates for the lack of structured output schema. However, it misses parameter semantics, slightly reducing completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It does not explain the semantics of 'prompt_identifier' (e.g., what format it expects) or 'limit' (beyond the schema's numeric constraints). The example usage mentions 'a prompt named' but lacks details on identifier types. This leaves significant gaps in parameter understanding beyond the basic schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get a list of all versions for a specific prompt') and distinguishes it from sibling tools like 'get-prompt-by-identifier' (which gets a single prompt) and 'list-prompts' (which lists prompts, not versions). The verb 'Get a list' and resource 'versions for a specific prompt' are precise and differentiate its scope from related operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing all versions of a specific prompt, but does not explicitly state when to use this tool versus alternatives like 'get-prompt-version' (for a single version) or 'get-latest-prompt'. It provides an example usage but lacks explicit guidance on exclusions or comparisons with sibling tools, leaving some context to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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