Skip to main content
Glama

datasets_read

Preview rows, columns, and data types from any dataset. Provide a UUID to inspect data structure.

Instructions

Read dataset contents — preview rows, columns, and types.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesDataset UUID
secretNoDataset secret key
rowsNoNumber of rows to preview

Implementation Reference

  • src/index.js:51-51 (registration)
    The 'datasets_read' tool is registered as a static tool definition in the STATIC_TOOLS array. It is a proxy tool — there is no local handler. When the remote client is available (API key set), the CallToolRequestSchema handler (line 121) forwards the call to the remote MCP server. If no remote client is available, it returns an error saying an API key is required.
    { name: "datasets_read", description: "Read dataset contents — preview rows, columns, and types.", inputSchema: { type: "object", properties: { uuid: { type: "string", description: "Dataset UUID" }, secret: { type: "string", description: "Dataset secret key" }, rows: { type: "integer", description: "Number of rows to preview", default: 10 } }, required: ["uuid"] } },
  • Input schema for datasets_read. Requires 'uuid' (string, the dataset UUID), optional 'secret' (string, dataset secret key), and optional 'rows' (integer, default 10, number of rows to preview).
    { name: "datasets_read", description: "Read dataset contents — preview rows, columns, and types.", inputSchema: { type: "object", properties: { uuid: { type: "string", description: "Dataset UUID" }, secret: { type: "string", description: "Dataset secret key" }, rows: { type: "integer", description: "Number of rows to preview", default: 10 } }, required: ["uuid"] } },
  • The generic CallTool handler proxies all tool calls (including datasets_read) to the remote MCP server when connected. If no remote client is available, it returns an error instructing the user to set an API key.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      if (!remoteClient) {
        return {
          content: [
            {
              type: "text",
              text: "MCP Analytics API key required. Set MCP_ANALYTICS_API_KEY in your environment.\nGet a free key at https://app.mcpanalytics.ai",
            },
          ],
          isError: true,
        };
      }
    
      try {
        const result = await remoteClient.callTool({
          name: request.params.name,
          arguments: request.params.arguments || {},
        });
        return result;
      } catch (err) {
        return {
          content: [{ type: "text", text: `Error: ${err.message}` }],
          isError: true,
        };
      }
    });
Behavior2/5

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

With no annotations, the description must carry the full behavioral burden. It states 'Read' and 'preview', implying non-destructive reads, but fails to disclose authentication requirements (e.g., secret needed for private datasets), potential errors, or rate limits. The behavior beyond the stated parameters remains opaque.

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

Conciseness5/5

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

The description is a single, concise sentence that front-loads the action ('Read dataset contents') and specifies the output scope. Every word is purposeful with no redundancy or extraneous information.

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

Completeness3/5

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

Given the tool complexity (3 parameters, no output schema), the description adequately indicates the task but does not specify the return format (e.g., whether it returns rows as JSON, types as list) or pagination. Without annotations, more contextual completeness would be beneficial for correct agent invocation.

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%, with each parameter (uuid, secret, rows) having a description. The description adds 'preview rows, columns, and types' but does not elaborate on parameter semantics beyond what the schema already provides. Baseline 3 is appropriate as the schema does the heavy lifting.

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 'Read dataset contents — preview rows, columns, and types' provides a specific verb ('read') and resource ('dataset contents'), clearly distinguishing it from siblings like datasets_download (download), datasets_list (list metadata), and datasets_update (modify). It conveys the core functionality of previewing structure and sample data.

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?

The description offers no explicit guidance on when to use this tool versus alternatives such as datasets_download or datasets_list. The phrase 'preview rows, columns, and types' implies inspection, but there is no mention of when not to use it or which sibling to choose for full downloads or metadata listing.

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/embeddedlayers/mcp-analytics'

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