Skip to main content
Glama

tg_search

Search messages by text across all chats or within a specified peer, with an optional limit to control the number of results.

Instructions

Search messages by text, across all chats or within one peer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
peerNo
limitNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. The term 'Search' implies a read-only operation, and the scope is mentioned. However, it does not disclose potential limitations (e.g., no media search, case sensitivity) or confirm non-destructiveness explicitly. It adds some context but remains minimal.

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 a single, front-loaded sentence with no redundant information. It earns its place by clearly stating the action and scope without any filler.

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?

Given the tool's moderate complexity (3 params, output schema present), the description is adequate. It explains the core behavior and scope, and the output schema covers return values. It lacks mention of pagination or ordering, but these are not critical for the description to be complete.

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 0%, so the description must compensate. It partially does by explaining 'query' (text to search) and 'peer' (scope: all chats or one peer). However, it does not mention 'limit' or other param-specific details. This adds some value but not comprehensive compensation.

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 tool's function: searching messages by text. It distinguishes itself from sibling tools like tg_list_chats (listing chats) and tg_read_chat (reading messages) by specifying 'search messages by text' and the optional scope ('across all chats or within one peer'). This is a specific verb+resource+scope combination.

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?

The description provides clear context on when to use this tool: when looking for messages containing specific text. It also clarifies scope options (all chats vs. one peer). However, it does not explicitly name alternatives or exclusions, but the context is strong enough to differentiate it from siblings.

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/Abdk4Moura/tg-mcp'

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