Skip to main content
Glama

search_chat

Read-only

Searches QQ private or group chat history backwards for messages containing a keyword, with optional sender and scan-limit filters, to locate past conversations.

Instructions

Find messages containing a keyword (case-insensitive) in one chat by scanning its history backwards.

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": {
      "target": "<target>",
      "keyword": "<keyword>"
    },
    "name": "search_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
scanNoHow many recent messages to scan (max 2000)
targetYesWho to talk to: "qq:<QQ号>" for a friend/private chat, "group:<群号>" for a group, a bare number, or a friend remark/nickname/group name (must be unambiguous).
keywordYesText to look for
from_userNoOnly messages from this QQ number

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so safety is covered. The description adds genuine behavioral detail beyond them, namely case-insensitive matching and a backwards history scan, but says nothing about result ordering, whether the scan cap silently truncates matches, or how many hits are returned.

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?

A single front-loaded sentence with no filler, and the matching semantics arrive before the scan detail. It is efficient, though the compression contributes to the missing guidance noted elsewhere.

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?

With four params fully described, annotations present, and no output schema, the definition is adequate but not complete: it does not explain what the backwards scan means for result order or what happens when the scan limit is reached before any match. Those are the details an agent most needs to interpret results correctly.

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 all four parameters including target, keyword, scan, and from_user are already documented in the schema. The description adds only the case-insensitivity of keyword matching, which is a marginal increment over structured data; 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 ('Find messages containing a keyword') plus scope ('in one chat'), so the agent knows this is a keyword search rather than a full history read. It never names a sibling such as read_chat to draw the contrast explicitly, which keeps it short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: 'in one chat' and the keyword requirement suggest when to prefer this over reading a whole chat, but there is no explicit when-to-use, when-not-to-use, or named alternative. An agent must infer the boundary from the sibling names alone.

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

Deploy Server

Other Tools