Skip to main content
Glama

set_rpc_url

Configure the RPC URL to enable blockchain interactions on EDUCHAIN Agent Kit, ensuring seamless data queries and transaction execution.

Instructions

Set the RPC URL for blockchain interactions

Input Schema

NameRequiredDescriptionDefault
urlYesRPC URL to use for blockchain interactions

Input Schema (JSON Schema)

{ "properties": { "url": { "description": "RPC URL to use for blockchain interactions", "type": "string" } }, "required": [ "url" ], "type": "object" }

Implementation Reference

  • The core handler function that sets the global `rpcUrl` variable, which is used by `getProvider()` to create the ethers.JsonRpcProvider instance.
    export function setRpcUrl(url: string): void { rpcUrl = url; }
  • src/index.ts:970-984 (registration)
    MCP tool dispatch/registration in the CallToolRequestSchema handler. Validates input and calls the blockchain.setRpcUrl function.
    case 'set_rpc_url': { if (!args.url || typeof args.url !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'RPC URL is required'); } blockchain.setRpcUrl(args.url); return { content: [ { type: 'text', text: JSON.stringify({ success: true, rpcUrl: args.url }, null, 2), }, ], };
  • Tool schema definition provided in ListToolsRequestSchema response, defining input validation schema.
    name: 'set_rpc_url', description: 'Set the RPC URL for blockchain interactions', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'RPC URL to use for blockchain interactions', }, }, required: ['url'], },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SailFish-Finance/educhain-ai-agent-kit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server