listDatasets
Retrieve all available datasets from Axiom to view and manage your data sources.
Instructions
List all available Axiom datasets
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "listDatasets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:153-172 (handler)The handler function for the 'listDatasets' tool. It checks rate limiting, lists all Axiom datasets using client.datasets.list(), and returns them as a JSON string in the MCP response format.
async () => { const remainingTokens = datasetsLimiter.tryRemoveTokens(1); if (!remainingTokens) { throw new Error("Rate limit exceeded for dataset operations"); } try { const datasets = await client.datasets.list(); return { content: [ { type: "text", text: JSON.stringify(datasets), }, ], }; } catch (error) { throw new Error(`Failed to list datasets: ${error.message}`); } } - index.js:149-173 (registration)The registration of the 'listDatasets' tool using server.tool(), including name, description, empty input schema, and inline handler function.
server.tool( "listDatasets", "List all available Axiom datasets", {}, async () => { const remainingTokens = datasetsLimiter.tryRemoveTokens(1); if (!remainingTokens) { throw new Error("Rate limit exceeded for dataset operations"); } try { const datasets = await client.datasets.list(); return { content: [ { type: "text", text: JSON.stringify(datasets), }, ], }; } catch (error) { throw new Error(`Failed to list datasets: ${error.message}`); } } ); - index.js:152-152 (schema)The input schema for the 'listDatasets' tool, which is empty as it takes no parameters.
{},