Skip to main content
Glama
shanejonas

openrpc-mpc-server

by shanejonas

rpc_discover

Discover available JSON-RPC methods by querying a server's OpenRPC specification to understand what functionality it provides.

Instructions

This uses JSON-RPC to call rpc.discover which is part of the OpenRPC Specification for discovery for JSON-RPC servers. A user would prompt: What JSON-RPC methods does this server have?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYesServer URL

Implementation Reference

  • Handler for the rpc_discover tool. Extracts the server URL from arguments, creates an HTTPTransport and OpenRPC Client, calls rpc.discover method on the server, and returns the formatted result.
    case "rpc_discover": {
      const server = String(request.params.arguments?.server);
      if (!server) {
        throw new Error("Server is required");
      }
      let transport = new HTTPTransport(server);
      let client = new Client(new RequestManager([transport]));
      const results = await client.request({ method: "rpc.discover" });
    
      return  {
        toolResult: {
          content: [{
            type: "text",
            text: JSON.stringify(results, null, 2)
          }],
          isError: false
        }
      };
    }
  • src/index.ts:68-82 (registration)
    Tool registration in the ListToolsRequestHandler. Defines the name, description, and inputSchema (requiring 'server' URL) for the rpc_discover tool.
      {
        name: "rpc_discover",
        description: "This uses JSON-RPC to call `rpc.discover` which is part of the OpenRPC Specification for discovery for JSON-RPC servers. A user would prompt: What JSON-RPC methods does this server have? <server url>",
        inputSchema: {
          type: "object",
          properties: {
            server: {
              type: "string",
              description: "Server URL"
            },
          },
          required: ["server"]
        }
      }
    ]
  • Input schema for rpc_discover tool: object with required 'server' string property.
    inputSchema: {
      type: "object",
      properties: {
        server: {
          type: "string",
          description: "Server URL"
        },
      },
      required: ["server"]
    }

Tool Definition Quality

Score is being calculated. Check back soon.

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-mpc-server'

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