请求
请求由客户端发送到服务器,反之亦然。- 请求 必须 包含字符串或整数 ID。
- 与基础 JSON-RPC 不同,ID 不得 为
null。 - 请求 ID 在同一会话中 不得 被请求者先前使用过。
响应
响应是作为对请求的回复发送的。- 响应 必须 包含与其对应的请求相同的 ID。
result或error必须 设置其中一个。响应 不得 同时设置两者。- 错误代码 必须 是整数。
通知
通知由客户端发送到服务器,反之亦然。它们不期望得到 响应。- 通知 不得 包含 ID。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
{
jsonrpc: "2.0";
id: string | number;
method: string;
params?: {
[key: string]: unknown;
};
}
null。{
jsonrpc: "2.0";
id: string | number;
result?: {
[key: string]: unknown;
}
error?: {
code: number;
message: string;
data?: unknown;
}
}
result 或 error 必须 设置其中一个。响应 不得 同时设置两者。{
jsonrpc: "2.0";
method: string;
params?: {
[key: string]: unknown;
};
}