Skip to main content
Glama

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

NameRequiredDescriptionDefault
argsNo
nameYes
kwargsNo
methodYes
rpc_timeoutNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the disclosure burden and mostly does: it states the whitelist enforcement and that rejected calls return a reason, and it flags the non-obvious quirk that a timeout key inside kwargs is stripped by the SDK and must be replaced with rpc_timeout. It does not discuss side effects of arbitrary RPC calls, error semantics, or reversibility, leaving a moderate gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Key constraints (public-only, whitelist, timeout caveat) are front-loaded in the opening paragraph, followed by a compact Args block. Slightly repetitive between prose and Args, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An arbitrary-RPC tool with no annotations and an existing output schema has most of its needs met: callability rules, whitelist behavior, and timeout handling are all covered. What remains unstated is the mutation risk of invoking arbitrary module methods and the failure mode when a method does not exist.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: every one of the five parameters is explained, including the non-obvious caveats that kwargs.timeout is silently dropped and that rpc_timeout only applies to coroutine methods. This adds genuine meaning the schema cannot convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific action (invoking a public service method of a module) and scopes it as cross-module RPC, which is distinct from siblings like send_message or get_adapter_status. It does not explicitly say which sibling it replaces, but the verb+resource pairing is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete preconditions: only public methods are callable, a configurable module_call_whitelist can reject calls, and get_module_info should be consulted first to see the declared services contract. No explicit 'when not to use' guidance, but the routing toward get_module_info is a real workflow instruction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.