get_statistics
Retrieve key statistics, such as total record count, from the ITIS database using the integrated tool on the ITIS MCP Server. Simplify taxonomic data analysis by accessing comprehensive dataset metrics directly.
Instructions
Get basic statistics about the ITIS database (total number of records).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:159-166 (registration)Registration of the 'get_statistics' tool in the tools array, including name, description, and empty input schema (no parameters required).{ name: 'get_statistics', description: 'Get basic statistics about the ITIS database (total number of records).', inputSchema: { type: 'object', properties: {}, }, },
- src/tools.ts:398-411 (handler)MCP tool handler for 'get_statistics': calls itisClient.getStatistics(), extracts totalRecords from response, adds lastUpdated timestamp, and returns as JSON text content.case 'get_statistics': { const result = await itisClient.getStatistics(); return { content: [ { type: 'text', text: JSON.stringify({ totalRecords: result.response.numFound, lastUpdated: new Date().toISOString(), }, null, 2), }, ], }; }
- src/itis-client.ts:326-332 (helper)Core helper method getStatistics() that queries the entire ITIS database (query '*:*', rows=0 for count only) using the general search method to get total number of records.async getStatistics(): Promise<ITISResponse> { return this.search({ query: '*:*', rows: 0, fields: ['tsn'] }); }
- src/tools.ts:162-165 (schema)Input schema for 'get_statistics' tool: empty object properties, indicating no input parameters required.inputSchema: { type: 'object', properties: {}, },