call_module
Invoke a public service method from another bot module via cross-module RPC; calls outside the configured module whitelist are rejected with a reason.
Instructions
调用机器人内某模块的公开服务方法(跨模块 RPC)。
仅允许公开方法;机器人侧可配置 module_call_whitelist 白名单限制可调用范围, 白名单外调用会被拒绝并返回原因。注意:kwargs 中的 timeout 无法透传(被 SDK 占用),RPC 超时请用独立的 rpc_timeout 参数。
Args: name: 目标模块名 method: 目标方法名(可先用 get_module_info 查看模块声明的 services 契约) args: 位置参数列表(可省略) kwargs: 关键字参数对象(可省略;timeout 键会被剔除) rpc_timeout: RPC 超时秒数(可省略;仅对协程方法生效)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"method": "<method>"
},
"name": "call_module"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| name | Yes | ||
| kwargs | No | ||
| method | Yes | ||
| rpc_timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |