Skip to main content
Glama
weixin-grokbot-adapter

weixin-grokbot-adapter

by ma-pony

weixin_poll

Polls Weixin for new inbound messages in one long-poll cycle, caching the context token for follow-up replies. Requires prior CLI login; empty results are normal when no messages arrive.

Instructions

One getUpdates long-poll cycle (default ~35s). Returns new inbound Weixin messages and caches context_token. Empty result is normal when nobody wrote. Requires a prior CLI login.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "weixin_poll"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutMsNoClient long-poll timeout in ms (default 35000).
resetCursorNoIf true, send an empty get_updates_buf.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses blocking duration, that the call caches context_token as a side effect, that empty results are expected, and that authentication requires a prior CLI login. It omits cursor-advancement consequences (relevant to resetCursor) and concurrency/idempotency behavior, keeping it below a 5.

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

Conciseness5/5

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

Four short sentences, front-loaded with the core action and default duration, followed by return content, the empty-result expectation, and the login prerequisite. No filler or redundancy.

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?

For a two-optional-parameter poll tool with no output schema, it covers what comes back, how long it blocks, what an empty result means, and the auth prerequisite. It leaves context_token's purpose (presumably for subsequent sends) unexplained, a minor gap.

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

Parameters3/5

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

Schema description coverage is 100%, so both optional parameters (timeoutMs, resetCursor) are already documented by the schema. The description's 'default ~35s' merely restates the timeoutMs default and adds no new meaning for resetCursor, so baseline 3 applies.

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?

States a specific verb and resource: performs one getUpdates long-poll cycle and returns new inbound Weixin messages. This clearly distinguishes it from weixin_send/weixin_send_media (outbound) and weixin_status, though it does not name those siblings explicitly.

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 real usage context: it is a single poll cycle (default ~35s), an empty result is normal rather than an error, and a prior CLI login is required. It stops short of explicitly saying 'call repeatedly in a loop to receive' or naming alternatives for sending replies, so no exclusions are stated.

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