Skip to main content
Glama
bale-mcp

bale-mcp

by sepehr071

Bot: search messages

bot_search_messages

Search stored Bale bot messages by text, newest first, and filter by chat or limit results. Persian/Arabic yeh, kaf, digits, and ZWNJ variants match each other for accurate retrieval.

Instructions

Search stored messages by text, newest first. Persian/Arabic yeh, kaf, digits and ZWNJ match each other.

Long texts are cut; bot_read_chat shows them whole.

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": {
      "query": "<query>"
    },
    "name": "bot_search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax messages.
queryYesText to find.
chat_idNoOnly this chat.
max_charsNoCut each text to this length.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.2.0
    • removedInput schema / properties / chat_id / title
      Removed value: -"Chat Id"
    • changedInput schema / properties / limit / default
      Previous value: -30New value: +20
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "default": 500,
      +  "description": "Cut each text to this length.",
      +  "maximum": 4096,
      +  "minimum": 50,
      +  "type": "integer"
      +}
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / title
      Removed value: -"bot_search_messagesArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "bot_search_messagesDictOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, the description discloses result ordering (newest first), Persian/Arabic character normalization (yeh, kaf, digits, ZWNJ), and that long texts are truncated — all behavior an agent would otherwise have to discover by calling. Note the annotations set readOnlyHint=false even though the described operation is a read-only search, which is a mild signaling inconsistency rather than a description-side error.

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?

Two short sentences, front-loaded with the core action and ordering, then the normalization caveat, then the redirect to the sibling. Nothing is wasted or buried.

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 four-parameter search with full schema coverage and no output schema, the description supplies the ordering, matching semantics, truncation behavior, and the alternative tool. Only minor gaps remain, such as result pagination or whether search covers chats beyond those the bot can currently access.

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 coverage is 100% and every parameter carries its own description, so the schema already carries the parameter burden. The description only adds that truncation applies per text, without elaborating on limit defaults, chat_id behavior, or max_chars interaction beyond what the schema states.

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 names a specific verb and resource ("Search stored messages by text") and adds the result ordering ("newest first"), which distinguishes it from retrieval siblings like bot_read_chat and bot_get_new_messages at a glance.

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?

It explicitly routes the agent to bot_read_chat when full message text is needed, giving a clear alternative with the condition that selects it. It stops short of saying when to scope with chat_id or how this differs from bot_get_new_messages, so it is strong but not exhaustive.

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