Skip to main content
Glama

List scores

listScores

Retrieve scores with filters for page, user, name, trace, and time range. Use to query specific score data from Langfuse.

Instructions

List scores with filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default 1)
limitNoItems per page (default 50, max 100)
userIdNo
nameNo
traceIdNo
fromTimestampNo
toTimestampNo

Implementation Reference

  • src/tools.ts:102-118 (registration)
    Registration of the 'listScores' tool via server.registerTool(), including input schema (pagination, userId, name, traceId, fromTimestamp, toTimestamp) and a handler that calls client.get('/api/public/scores', args).
    // ---------- Scores ----------
    server.registerTool(
      "listScores",
      {
        title: "List scores",
        description: "List scores with filters.",
        inputSchema: {
          ...paginationShape,
          userId: z.string().optional(),
          name: z.string().optional(),
          traceId: z.string().optional(),
          fromTimestamp: z.string().datetime().optional(),
          toTimestamp: z.string().datetime().optional(),
        },
      },
      async (args) => asJson(await client.get("/api/public/scores", args)),
    );
  • Handler function for listScores: async (args) => asJson(await client.get('/api/public/scores', args)). Delegates to the LangfuseClient HTTP GET method.
    async (args) => asJson(await client.get("/api/public/scores", args)),
  • Input schema for listScores: spreads paginationShape (page, limit) and adds optional filters: userId, name, traceId, fromTimestamp, toTimestamp.
    inputSchema: {
      ...paginationShape,
      userId: z.string().optional(),
      name: z.string().optional(),
      traceId: z.string().optional(),
      fromTimestamp: z.string().datetime().optional(),
      toTimestamp: z.string().datetime().optional(),
    },
  • Helper function asJson() used by the handler to wrap API response data into MCP text content format.
    const asJson = (data: unknown) => ({
      content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
    });
Behavior2/5

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

No annotations exist, so the description carries full burden. It indicates a read operation ('list'), but does not disclose behavior such as authorization needs, rate limits, or result limits. Pagination is only implied by the schema, not mentioned.

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

Conciseness2/5

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

The description is extremely concise (one sentence), but it is underspecified. Conciseness should not sacrifice necessary detail; here it provides only a vague statement. It could be improved by adding key information without verbosity.

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

Completeness1/5

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

Given 7 parameters, no annotations, and no output schema, the description is severely incomplete. It does not explain what scores represent, how filters combine, pagination details, or the response format. The tool is not adequately documented for an agent to use correctly.

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

Parameters1/5

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

The input schema has 7 parameters with only 29% description coverage (page and limit described). The description adds no semantic meaning for the half dozen filter parameters like userId, name, traceId, toTimestamp, etc. It fails to clarify their format or role.

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

Purpose3/5

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

The description states 'List scores with filters,' which identifies the verb and resource, but it is generic and does not differentiate from sibling list tools such as listComments or listScoreConfigs. It adds minimal information beyond the name and title.

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. The phrase 'with filters' hints at usage context, but there is no explicit when-to-use or when-not-to-use, nor mention of related tools like getScore.

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