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
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Dataset UUID | |
| secret | No | Dataset secret key | |
| rows | No | Number 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"] } }, - src/index.js:51-51 (schema)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"] } }, - src/index.js:121-146 (handler)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, }; } });