Skip to main content
Glama

test_trpc_endpoint

Test tRPC endpoints to verify functionality and receive detailed responses for debugging and validation purposes.

Instructions

Test specific tRPC endpoint with detailed response

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNotRPC method to test (e.g., news.getUnreadNewsCount, user.updateLastAccess)user.updateLastAccess
paramsNoJSON string of parameters (optional)

Implementation Reference

  • MCP tool handler for 'test_trpc_endpoint': parses method and params from input, calls this.api.testTrpcEndpoint(method, parsedParams), returns formatted result or error.
    case "test_trpc_endpoint": { const { method, params } = args as { method: string; params?: string; }; try { const parsedParams = params ? JSON.parse(params) : {}; const result = await this.api.testTrpcEndpoint( method, parsedParams, ); return { content: [ { type: "text", text: `Result of ${method} with params ${JSON.stringify(parsedParams)}:\n\n${JSON.stringify(result, null, 2)}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error testing tRPC endpoint ${method}: ${error instanceof Error ? error.message : "Unknown error"}`, }, ], }; } }
  • src/server.ts:380-398 (registration)
    Tool registration in ListToolsRequestSchema response: defines name, description, and input schema for 'test_trpc_endpoint'.
    { name: "test_trpc_endpoint", description: "Test specific tRPC endpoint with detailed response", inputSchema: { type: "object", properties: { method: { type: "string", description: "tRPC method to test (e.g., news.getUnreadNewsCount, user.updateLastAccess)", default: "user.updateLastAccess", }, params: { type: "string", description: "JSON string of parameters (optional)", }, }, }, },
  • Input schema definition for the test_trpc_endpoint tool.
    inputSchema: { type: "object", properties: { method: { type: "string", description: "tRPC method to test (e.g., news.getUnreadNewsCount, user.updateLastAccess)", default: "user.updateLastAccess", }, params: { type: "string", description: "JSON string of parameters (optional)", }, },

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/minagishl/nlobby-mcp'

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