Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai

add-prompt-version-tag

Tag specific prompt versions in Phoenix MCP Server to organize and identify them for tracking and deployment purposes.

Instructions

Add a tag to a specific prompt version. The operation returns no content on success (204 status code).

Example usage: Tag prompt version 'promptversionid1234' with the name 'production'

Expected return: Confirmation message of successful tag addition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prompt_version_idYes
nameYes
descriptionNo

Implementation Reference

  • The handler function that implements the tool logic by sending a POST request to add a tag to a specific prompt version using the PhoenixClient.
    async ({ prompt_version_id, name, description }) => {
      await client.POST("/v1/prompt_versions/{prompt_version_id}/tags", {
        params: {
          path: {
            prompt_version_id,
          },
        },
        body: {
          name,
          description,
        },
      });
      return {
        content: [
          {
            type: "text",
            text: `Successfully added tag "${name}" to prompt version ${prompt_version_id}`,
          },
        ],
      };
  • Zod schema for input validation of the tool parameters: prompt_version_id, name, and optional description.
    export const addPromptVersionTagSchema = z.object({
      prompt_version_id: z.string(),
      name: z.string(),
      description: z.string().optional(),
    });
  • Registers the 'add-prompt-version-tag' tool with the MCP server using server.tool(), including name, description, input schema, and handler function.
    server.tool(
      "add-prompt-version-tag",
      ADD_PROMPT_VERSION_TAG_DESCRIPTION,
      addPromptVersionTagSchema.shape,
      async ({ prompt_version_id, name, description }) => {
        await client.POST("/v1/prompt_versions/{prompt_version_id}/tags", {
          params: {
            path: {
              prompt_version_id,
            },
          },
          body: {
            name,
            description,
          },
        });
        return {
          content: [
            {
              type: "text",
              text: `Successfully added tag "${name}" to prompt version ${prompt_version_id}`,
            },
          ],
        };
      }
    );

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