Skip to main content
Glama

List prompts

listPrompts

Retrieve a paginated list of prompt definitions from Langfuse, with filters for name, label, and tag to narrow results.

Instructions

List prompt definitions tracked in Langfuse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default 1)
limitNoItems per page (default 50, max 100)
nameNoFilter by exact prompt name
labelNoFilter by label (e.g. 'production')
tagNo

Implementation Reference

  • src/tools.ts:153-166 (registration)
    Registration of the 'listPrompts' tool via server.registerTool() with name, schema, and handler.
    server.registerTool(
      "listPrompts",
      {
        title: "List prompts",
        description: "List prompt definitions tracked in Langfuse.",
        inputSchema: {
          ...paginationShape,
          name: z.string().optional().describe("Filter by exact prompt name"),
          label: z.string().optional().describe("Filter by label (e.g. 'production')"),
          tag: z.string().optional(),
        },
      },
      async (args) => asJson(await client.get("/api/public/v2/prompts", args)),
    );
  • Input schema for listPrompts: paginationShape plus optional 'name', 'label', and 'tag' filters.
      inputSchema: {
        ...paginationShape,
        name: z.string().optional().describe("Filter by exact prompt name"),
        label: z.string().optional().describe("Filter by label (e.g. 'production')"),
        tag: z.string().optional(),
      },
    },
  • Handler that calls client.get('/api/public/v2/prompts', args) and formats the JSON response.
      async (args) => asJson(await client.get("/api/public/v2/prompts", args)),
    );
  • The 'asJson' helper that wraps data into the MCP text content format used by all tool handlers.
    const asJson = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
  • src/tools.ts:392-420 (registration)
    TOOL_NAMES array that includes 'listPrompts' as one of the exported tool name constants.
    export const TOOL_NAMES = [
      "listTraces",
      "getTrace",
      "listObservations",
      "getObservation",
      "listSessions",
      "getSession",
      "listScores",
      "getScore",
      "listScoreConfigs",
      "getScoreConfig",
      "listPrompts",
      "getPrompt",
      "listDatasets",
      "getDataset",
      "listDatasetItems",
      "getDatasetItem",
      "listDatasetRuns",
      "getDatasetRun",
      "getMetrics",
      "getDailyMetrics",
      "listModels",
      "getModel",
      "listProjects",
      "listComments",
      "getComment",
      "getMedia",
      "getHealth",
    ] as const;
Behavior2/5

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

No annotations are present, so the description must carry the full burden. It only says 'list', but does not disclose if it's read-only, pagination behavior, rate limits, or what happens when no results are found. Minimal behavioral context.

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

Conciseness4/5

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

The description is a single sentence, very concise and front-loaded. However, it is arguably too brief, sacrificing informative value. Still, it earns a high score for lack of fluff.

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

Completeness2/5

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

With no output schema, the description should explain return values but does not. The tool has 5 optional parameters and is a list operation, yet no information is given about the structure or content of the results. Incomplete for the complexity level.

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

Parameters3/5

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

Schema description coverage is 80% (4 of 5 parameters have descriptions). The tool description does not add any parameter information beyond the schema. For the undocumented 'tag' parameter, no additional detail is provided. Baseline 3 is appropriate.

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 tool lists prompt definitions tracked in Langfuse. It uses a specific verb 'list' and resource 'prompt definitions', distinguishing it from siblings like getPrompt (fetches a single prompt) and listTraces (different resource).

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, when not to use, or comparison with other list tools like listTraces.

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/hugoles/langfuse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server