Skip to main content
Glama

List dataset items

listDatasetItems

List dataset items including inputs, expected outputs, and metadata. Supports pagination and filtering by dataset name or source identifiers.

Instructions

List items in a dataset (inputs / expected outputs / metadata).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default 1)
limitNoItems per page (default 50, max 100)
datasetNameNoFilter by dataset name
sourceTraceIdNo
sourceObservationIdNo

Implementation Reference

  • The handler function executed when the 'listDatasetItems' tool is called. It makes a GET request to the Langfuse API endpoint '/api/public/dataset-items' with the provided arguments (pagination, datasetName, sourceTraceId, sourceObservationId).
      async (args) => asJson(await client.get("/api/public/dataset-items", args)),
    );
  • src/tools.ts:216-229 (registration)
    Registration of the 'listDatasetItems' tool on the MCP server, including its title 'List dataset items', description, and input schema with pagination and optional filters (datasetName, sourceTraceId, sourceObservationId).
    server.registerTool(
      "listDatasetItems",
      {
        title: "List dataset items",
        description: "List items in a dataset (inputs / expected outputs / metadata).",
        inputSchema: {
          ...paginationShape,
          datasetName: z.string().optional().describe("Filter by dataset name"),
          sourceTraceId: z.string().optional(),
          sourceObservationId: z.string().optional(),
        },
      },
      async (args) => asJson(await client.get("/api/public/dataset-items", args)),
    );
  • Input schema for listDatasetItems, defining filters: pagination (page, limit), datasetName, sourceTraceId, and sourceObservationId.
    inputSchema: {
      ...paginationShape,
      datasetName: z.string().optional().describe("Filter by dataset name"),
      sourceTraceId: z.string().optional(),
      sourceObservationId: z.string().optional(),
    },
  • Helper function 'asJson' used by the handler to format the API response as JSON text content blocks for the MCP response.
    const asJson = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
  • The pagination shape schema reused by listDatasetItems, defining 'page' and 'limit' 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)"),
    };
Behavior2/5

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

No annotations provided, so description carries full burden. Description only states 'List items' without mentioning pagination, default parameters, or side effects. The input schema includes pagination (page, limit) but description does not clarify how they affect behavior.

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?

Description is very concise at 12 words, but it underspecifies. It saves space but lacks essential details like pagination behavior, making it marginally acceptable for a simple list operation.

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?

Given the tool has 5 parameters, no output schema, and no annotations, the description is too minimal. It does not explain return format, default page/limit, or how filters interact. Incomplete for practical use.

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 60% (3 of 5 parameters documented). The description adds no parameter-specific info beyond the generic 'items'. Two parameters (sourceTraceId, sourceObservationId) lack descriptions in both schema and description, leaving their purpose unclear.

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

Purpose4/5

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

The description 'List items in a dataset (inputs / expected outputs / metadata)' clearly states the verb 'List' and the resource 'dataset items', and specifies the type of items (inputs, outputs, metadata). It distinguishes from sibling tools like listDatasets which lists datasets themselves, not items within them.

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 explicit guidance on when to use this tool versus alternatives such as getDatasetItem (single item) or listDatasetRuns (runs). No mention of prerequisites or when not to use it.

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