Skip to main content
Glama

batch_get_recent_context

Retrieve recent message history for multiple QQ chat targets in a single operation, reducing API calls compared to individual queries.

Instructions

Batch query recent message context for multiple targets.

More efficient than calling get_recent_context multiple times: uses at most 2 OneBot API calls (group list + friend list) regardless of how many targets are queried.

Args: targets: List of dicts, each with "target" (ID) and optional "target_type" ("group" or "private", default "group"). Example: [{"target": "123", "target_type": "group"}, {"target": "456", "target_type": "private"}] limit: Number of recent messages per target (default 50).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetsYes
limitNo
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the efficiency aspect (uses at most 2 API calls) and the default behavior for target_type. However, it lacks details on error handling, rate limits, authentication needs, or what the output looks like, which are important for a batch query tool.

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?

The description is well-structured and front-loaded with the core purpose, followed by efficiency rationale and parameter details. Every sentence adds value without redundancy, and the example is concise yet illustrative. It's appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given no annotations and no output schema, the description does a decent job covering purpose, usage, and parameters. However, it lacks information on return values, error conditions, or performance implications beyond API call count. For a batch tool with 2 parameters and no structured output, this leaves gaps in operational context.

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

Parameters4/5

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

The schema description coverage is 0%, so the description must compensate. It provides clear semantics for both parameters: 'targets' is explained with structure, optional fields, and an example, and 'limit' specifies the default and meaning. This adds substantial value beyond the bare schema, though it could benefit from more detail on ID formats or constraints.

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

Purpose5/5

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

The description clearly states the specific action ('batch query recent message context') and resource ('for multiple targets'), distinguishing it from the sibling tool 'get_recent_context' by emphasizing batch efficiency. It explicitly contrasts with the single-target version, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool vs. alternatives: it states it's 'more efficient than calling get_recent_context multiple times' and explains the API call optimization. This directly addresses the sibling tool comparison and gives clear context for choosing this batch method.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JulesLiu390/Amadeus-QQ-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server