/** * @name JsonRpcPaymentIntrospection * @description Small JSON-RPC helpers used by the remote monetization gate without coupling payment logic to MCP tools. */ /** * @name JsonRpcId * @description JSON-RPC request identifier shape accepted by MCP clients. */ export type JsonRpcId = string | number | null; /** * @name JsonRpcRequest * @description Minimal JSON-RPC request shape needed to inspect MCP method and tool names. */ export interface JsonRpcRequest { jsonrpc?: '2.0'; id?: JsonRpcId; method: string; params?: unknown; } /** * @name McpToolCall * @description Tool invocation extracted from a JSON-RPC `tools/call` request. */ export interface McpToolCall { id?: JsonRpcId; toolName: string; arguments?: unknown; } /** * @name ParsedMcpRequest * @description Parsed MCP request metadata relevant to payment decisions. */ export interface ParsedMcpRequest { requests: JsonRpcRequest[]; toolCalls: McpToolCall[]; methods: string[]; isBatch: boolean; } /** * @name isRecord * @description Checks whether a value can be treated as a plain object for protocol introspection. */ export declare function isRecord(value: unknown): value is Record; /** * @name parseJsonRpcBody * @description Parses a JSON-RPC request or batch and extracts MCP tool-call metadata. */ export declare function parseJsonRpcBody(body: unknown): ParsedMcpRequest; //# sourceMappingURL=json-rpc.d.ts.map