get_rpc_url
Retrieve the current RPC URL for blockchain interactions within the EDUCHAIN Agent Kit, enabling direct access to decentralized exchange operations and token data queries.
Instructions
Get the current RPC URL used for blockchain interactions
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:416-712 (registration)Tool registration and schema definition for 'get_rpc_url' in the ListToolsRequestSchema handler, specifying no input parameters.{ name: 'get_rpc_url', description: 'Get the current RPC URL used for blockchain interactions', inputSchema: { type: 'object', properties: {}, required: [], }, }, { name: 'send_edu', description: 'Send EDU native token to another wallet address', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key of the sender wallet', }, toAddress: { type: 'string', description: 'Recipient wallet address', }, amount: { type: 'string', description: 'Amount of EDU to send', }, }, required: ['privateKey', 'toAddress', 'amount'], }, }, { name: 'get_wallet_address_from_private_key', description: 'Get wallet address from private key with proper checksum formatting', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key of the wallet', }, }, required: ['privateKey'], }, }, { name: 'send_erc20_token', description: 'Send ERC20 token to another wallet address', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key of the sender wallet', }, tokenAddress: { type: 'string', description: 'Token contract address', }, toAddress: { type: 'string', description: 'Recipient wallet address', }, amount: { type: 'string', description: 'Amount of tokens to send', }, confirm: { type: 'boolean', description: 'Confirm the transaction after verifying wallet address (default: true)', }, }, required: ['privateKey', 'tokenAddress', 'toAddress', 'amount'], }, }, { name: 'get_swap_quote', description: 'Get a quote for swapping tokens on SailFish DEX', inputSchema: { type: 'object', properties: { tokenIn: { type: 'string', description: 'Address of the input token', }, tokenOut: { type: 'string', description: 'Address of the output token', }, amountIn: { type: 'string', description: 'Amount of input token to swap', }, fee: { type: 'number', description: 'Fee tier (100=0.01%, 500=0.05%, 3000=0.3%, 10000=1%)', }, }, required: ['tokenIn', 'tokenOut', 'amountIn'], }, }, { name: 'swap_tokens', description: 'Swap tokens on SailFish DEX (token to token)', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key of the sender wallet', }, tokenIn: { type: 'string', description: 'Address of the input token', }, tokenOut: { type: 'string', description: 'Address of the output token', }, amountIn: { type: 'string', description: 'Amount of input token to swap', }, slippagePercentage: { type: 'number', description: 'Slippage tolerance percentage (default: 0.5)', }, fee: { type: 'number', description: 'Fee tier (100=0.01%, 500=0.05%, 3000=0.3%, 10000=1%)', }, }, required: ['privateKey', 'tokenIn', 'tokenOut', 'amountIn'], }, }, { name: 'swap_edu_for_tokens', description: 'Swap EDU for tokens on SailFish DEX', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key of the sender wallet', }, tokenOut: { type: 'string', description: 'Address of the output token', }, amountIn: { type: 'string', description: 'Amount of EDU to swap', }, slippagePercentage: { type: 'number', description: 'Slippage tolerance percentage (default: 0.5)', }, fee: { type: 'number', description: 'Fee tier (100=0.01%, 500=0.05%, 3000=0.3%, 10000=1%)', }, }, required: ['privateKey', 'tokenOut', 'amountIn'], }, }, { name: 'swap_tokens_for_edu', description: 'Swap tokens for EDU on SailFish DEX', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key of the sender wallet', }, tokenIn: { type: 'string', description: 'Address of the input token', }, amountIn: { type: 'string', description: 'Amount of tokens to swap', }, slippagePercentage: { type: 'number', description: 'Slippage tolerance percentage (default: 0.5)', }, fee: { type: 'number', description: 'Fee tier (100=0.01%, 500=0.05%, 3000=0.3%, 10000=1%)', }, }, required: ['privateKey', 'tokenIn', 'amountIn'], }, }, { name: 'get_external_market_data', description: 'Get external market data for EDU from centralized exchanges', inputSchema: { type: 'object', properties: {}, required: [], }, }, { name: 'check_arbitrage_opportunities', description: 'Check for arbitrage opportunities between centralized exchanges and SailFish DEX', inputSchema: { type: 'object', properties: { threshold: { type: 'number', description: 'Minimum price difference percentage to consider as an arbitrage opportunity (default: 1.0)', }, }, required: [], }, }, { name: 'update_external_market_config', description: 'Update the configuration for external market data API', inputSchema: { type: 'object', properties: { apiUrl: { type: 'string', description: 'API URL for external market data', }, apiKey: { type: 'string', description: 'API key for external market data (if required)', }, symbols: { type: 'object', properties: { EDU: { type: 'string', description: 'Symbol for EDU token on the external API', }, USD: { type: 'string', description: 'Symbol for USD on the external API', }, }, description: 'Symbol mappings for the external API', }, }, required: [], }, }, { name: 'get_external_market_config', description: 'Get the current configuration for external market data API', inputSchema: { type: 'object', properties: {}, required: [], }, }, { name: 'wrap_edu', description: 'Wrap EDU to WEDU (Wrapped EDU)', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key of the wallet', }, amount: { type: 'string', description: 'Amount of EDU to wrap', }, }, required: ['privateKey', 'amount'], }, }, { name: 'unwrap_wedu', description: 'Unwrap WEDU (Wrapped EDU) to EDU', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key of the wallet', }, amount: { type: 'string', description: 'Amount of WEDU to unwrap', }, }, required: ['privateKey', 'amount'], }, }, ], }));
- src/index.ts:987-997 (handler)Handler implementation in CallToolRequestSchema that invokes blockchain.getRpcUrl() and returns the RPC URL as JSON text content.case 'get_rpc_url': { const rpcUrl = blockchain.getRpcUrl(); return { content: [ { type: 'text', text: JSON.stringify({ rpcUrl }, null, 2), }, ], };
- src/blockchain.ts:55-57 (helper)Helper function getRpcUrl() that returns the current RPC URL variable used by the blockchain provider.export function getRpcUrl(): string { return rpcUrl; }