Skip to main content
Glama
shanejonas

openrpc-mpc-server

by shanejonas

rpc_call

Execute JSON-RPC methods on remote servers by specifying the server URL, method name, and parameters to interact with JSON-RPC APIs.

Instructions

Call any JSON-RPC method on a server with parameters. A user would prompt: Call method on with params

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYesServer URL
methodYesJSON-RPC method name to call
paramsNoStringified Parameters to pass to the method

Implementation Reference

  • The switch case handling 'rpc_call': extracts server URL, method, and params from arguments; creates HTTPTransport and Client from @open-rpc/client-js; calls the JSON-RPC method; returns the result as a text content block with formatted JSON.
    case "rpc_call": {
      const server = String(request.params.arguments?.server);
      const method = String(request.params.arguments?.method);
      const params = JSON.parse(String(request.params.arguments?.params));
      let transport = new HTTPTransport(server);
      let client = new Client(new RequestManager([transport]));
      const results = await client.request({ method: method, params: params as any});
      return {
        toolResult: {
          content: [{
            type: "text",
            text: JSON.stringify(results, null, 2)
          }],
          isError: false
        }
      };
    }
  • src/index.ts:45-67 (registration)
    Registers the 'rpc_call' tool in the ListTools response, including its name, description, and inputSchema defining server (string, required), method (string, required), and optional stringified params.
    {
      name: "rpc_call",
      description: "Call any JSON-RPC method on a server with parameters. A user would prompt: Call method <method> on <server url> with params <params>",
      inputSchema: {
        type: "object",
        properties: {
          server: {
            type: "string", 
            description: "Server URL"
          },
          method: {
            type: "string",
            description: "JSON-RPC method name to call"
          },
          // this is a bit of a hack since claude seems to have issues with nested parameters
          params: {
            type: "string",
            description: "Stringified Parameters to pass to the method"
          } 
        },
        required: ["server", "method"]
      }
    },
  • Input schema for rpc_call tool: object with required 'server' and 'method' strings, optional 'params' as string (JSON stringified).
    inputSchema: {
      type: "object",
      properties: {
        server: {
          type: "string", 
          description: "Server URL"
        },
        method: {
          type: "string",
          description: "JSON-RPC method name to call"
        },
        // this is a bit of a hack since claude seems to have issues with nested parameters
        params: {
          type: "string",
          description: "Stringified Parameters to pass to the method"
        } 
      },
      required: ["server", "method"]
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool performs a JSON-RPC call but lacks details on error handling, authentication needs, rate limits, or what the response might look like. The example prompt format adds minimal context but doesn't cover key behavioral traits.

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

Conciseness4/5

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

The description is appropriately concise with two sentences: one stating the purpose and one providing an example prompt. The structure is front-loaded with the core functionality, though the example could be slightly more informative.

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 tool that performs potentially complex remote procedure calls with no annotations and no output schema, the description is insufficient. It lacks details on error cases, response formats, authentication, or how to handle the stringified parameters, leaving significant gaps in understanding the tool's behavior.

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?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds minimal value by mentioning parameters in the example prompt but doesn't provide additional semantics beyond what the schema provides, such as format expectations or usage examples for the 'params' string.

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 tool's purpose: 'Call any JSON-RPC method on a server with parameters.' It specifies the verb ('Call'), resource ('JSON-RPC method'), and scope ('on a server'), though it doesn't explicitly differentiate from the sibling tool 'rpc_discover' beyond the example prompt format.

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 like 'rpc_discover'. It only gives an example user prompt format without explaining the context, prerequisites, or exclusions for using this tool.

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

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/shanejonas/openrpc-mcp-server'

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