Skip to main content
Glama

List datasets

listDatasets

Retrieve a paginated list of datasets from Langfuse to view and manage your dataset configurations.

Instructions

List datasets configured in Langfuse.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default 1)
limitNoItems per page (default 50, max 100)

Implementation Reference

  • src/tools.ts:195-203 (registration)
    Tool registration for 'listDatasets' using server.registerTool. It registers the tool with an input schema based on paginationShape (page/limit).
    server.registerTool(
      "listDatasets",
      {
        title: "List datasets",
        description: "List datasets configured in Langfuse.",
        inputSchema: { ...paginationShape },
      },
      async (args) => asJson(await client.get("/api/public/v2/datasets", args)),
    );
  • Handler function for listDatasets: makes a GET request to /api/public/v2/datasets with pagination arguments, returning JSON results via asJson helper.
    async (args) => asJson(await client.get("/api/public/v2/datasets", args)),
  • paginationShape definition used as inputSchema for listDatasets - provides optional 'page' (positive int) and 'limit' (1-100) parameters.
    export const paginationShape = {
      page: z.number().int().positive().optional().describe("Page number (default 1)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Items per page (default 50, max 100)"),
    };
  • asJson helper function used by the handler to wrap response data into MCP text content format.
    const asJson = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
  • TOOL_NAMES constant array includes 'listDatasets' for tool enumeration/registration reference.
      "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 provided, and the description does not disclose behavioral traits such as read-only nature, rate limits, or authentication requirements. It only states what the tool does without addressing potential side effects or constraints.

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 a single sentence, making it concise. However, it is also under-specified given the number of sibling tools and lack of usage context. It earns its place but could benefit from additional details.

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?

For a tool with no output schema and low complexity, the description lacks completeness. It does not explain what a dataset is, what the return format looks like, or how pagination works. The schema covers parameters but the context is thin.

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 coverage is 100%, so baseline is 3. The description adds no further meaning beyond the schema; it does not explain the parameters or their defaults in prose.

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 'List datasets configured in Langfuse.' with a specific verb (list) and resource (datasets). It distinguishes itself from sibling tools like listDatasetItems or listDatasetRuns by focusing on datasets specifically.

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?

There is no guidance on when to use this tool versus alternatives. For example, it does not mention that for individual dataset details one should use getDataset, or that pagination is available via page/limit parameters.

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