协议修订: 2024-11-05
请求
请求从客户端发送到服务器或从服务器发送到客户端。- 请求必须包含字符串或整数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;
};
}