list-prompts
Retrieve available prompt templates with their metadata, including IDs, names, and descriptions, for managing LLM input configurations.
Instructions
Get a list of all the prompts.
Prompts (templates, prompt templates) are versioned templates for input messages to an LLM. Each prompt includes both the input messages, but also the model and invocation parameters to use when generating outputs.
Returns a list of prompt objects with their IDs, names, and descriptions.
Example usage: List all available prompts
Expected return: Array of prompt objects with metadata. Example: [{ "name": "article-summarizer", "description": "Summarizes an article into concise bullet points", "source_prompt_id": null, "id": "promptid1234" }]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Implementation Reference
- Handler function that executes the list-prompts tool: Calls PhoenixClient GET /v1/prompts with optional limit query param and returns JSON-formatted list of prompts as text content.async ({ limit }) => { const response = await client.GET("/v1/prompts", { params: { query: { limit, }, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data?.data, null, 2), }, ], }; }
- Zod schema for list-prompts tool input: optional 'limit' number between 1-100 (default 100).export const listPromptsSchema = z.object({ limit: z.number().min(1).max(100).default(100), });
- js/packages/phoenix-mcp/src/promptTools.ts:250-270 (registration)MCP server tool registration for 'list-prompts': Specifies name, description, input schema, and inline handler function."list-prompts", LIST_PROMPTS_DESCRIPTION, listPromptsSchema.shape, async ({ limit }) => { const response = await client.GET("/v1/prompts", { params: { query: { limit, }, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data?.data, null, 2), }, ], }; } );
- js/packages/phoenix-mcp/src/index.ts:40-40 (registration)Calls initializePromptTools which registers the list-prompts tool among others on the MCP server.initializePromptTools({ client, server });
- Multiline description string used for the list-prompts tool registration, explaining purpose and expected output.const LIST_PROMPTS_DESCRIPTION = `Get a list of all the prompts. Prompts (templates, prompt templates) are versioned templates for input messages to an LLM. Each prompt includes both the input messages, but also the model and invocation parameters to use when generating outputs. Returns a list of prompt objects with their IDs, names, and descriptions. Example usage: List all available prompts Expected return: Array of prompt objects with metadata. Example: [{ "name": "article-summarizer", "description": "Summarizes an article into concise bullet points", "source_prompt_id": null, "id": "promptid1234" }]`;