get_blockchain_service
Retrieve blockchain service details including supported RPC methods for networks like Ethereum, Solana, and Polygon to enable proper API integration and query execution.
Instructions
Get details about a specific blockchain service including supported RPC methods
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blockchain | Yes | Blockchain name (e.g., "ethereum", "polygon", "solana") | |
| network | No | Network type (defaults to mainnet) |
Implementation Reference
- The core handler logic for the 'get_blockchain_service' tool. It extracts the blockchain and network from arguments, fetches the service using blockchainService.getServiceByBlockchain, and returns the service details as JSON or an error if not found.case 'get_blockchain_service': { const blockchain = args?.blockchain as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const service = blockchainService.getServiceByBlockchain(blockchain, network); if (!service) { return { content: [ { type: 'text', text: `Blockchain service not found: ${blockchain} (${network})`, }, ], isError: true, }; } return { content: [ { type: 'text', text: JSON.stringify(service, null, 2), }, ], }; }
- src/handlers/blockchain-handlers.ts:42-60 (registration)Tool registration definition in registerBlockchainHandlers function, including name, description, and input schema for 'get_blockchain_service'.{ name: 'get_blockchain_service', description: 'Get details about a specific blockchain service including supported RPC methods', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name (e.g., "ethereum", "polygon", "solana")', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain'], }, },
- src/index.ts:89-89 (registration)Registration of blockchain tools (including get_blockchain_service) by spreading the result of registerBlockchainHandlers into the main tools array used for MCP server....registerBlockchainHandlers(server, blockchainService),
- src/index.ts:115-115 (handler)Dispatch to the blockchain tool handler (handleBlockchainTool) in the main CallToolRequestSchema handler, which will match and execute the get_blockchain_service case.(await handleBlockchainTool(name, args, blockchainService)) ||