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

TableJSON Schema
NameRequiredDescriptionDefault
urlYesRPC URL to use for blockchain interactions

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'],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it's a 'Set' operation (implying mutation) but doesn't clarify whether this is persistent, requires specific permissions, affects other tools, or has side effects like rate limits. The description is minimal and lacks crucial behavioral context for a configuration tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without any fluff. It's appropriately sized for a simple tool with one parameter and efficiently communicates the core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., confirmation, error messages), how changes propagate, or potential impacts on sibling tools that might use the RPC URL. The lack of behavioral and output context makes it incomplete for safe agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'url' well-documented in the schema as 'RPC URL to use for blockchain interactions'. The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Set') and the resource ('RPC URL for blockchain interactions'), making the purpose immediately understandable. However, it doesn't differentiate from its sibling tool 'get_rpc_url' beyond the obvious verb difference, missing an opportunity to clarify their complementary relationship.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing admin permissions), when it's appropriate (e.g., during setup or troubleshooting), or what happens if used incorrectly, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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