Skip to main content
Glama
bale-mcp

bale-mcp

by sepehr071

Bot: search messages

bot_search_messages

Search stored messages sent to your Bale bot by text, newest first, with Persian/Arabic character matching and optional chat filter.

Instructions

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

Long texts are cut with a '...(+N chars)' marker; bot_read_chat shows them whole.

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

A3.9/5.0
Behavior4/5

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

Annotations only carry generic hints (openWorldHint=true, readOnlyHint=false, destructive=false), so the description earns credit for disclosing real behavior: newest-first ordering, Persian/Arabic yeh/kaf/digit/ZWNJ normalization equivalence, and the '...(+N chars)' truncation marker with a pointer to bot_read_chat for full text. These are non-obvious traits an agent could not derive from the schema.

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 tight sentences with zero filler; the core purpose is front-loaded and the normalization/truncation caveats follow as needed detail. Every clause carries information an agent needs.

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?

With no output schema, the description does the important work of explaining result ordering, matching rules, and truncation behavior. It leaves the default all-chats scope (chat_id default null) and limit/pagination behavior to the schema, which is a minor gap rather than a blocking one.

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?

Schema description coverage is 100%, so the 3 baseline applies, but the description adds genuine meaning beyond it: it explains what max_chars produces in the output (a '...(+N chars)' marker) and clarifies that query matching is normalization-aware, which the schema's bare "Text to find." does not convey.

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?

The description gives a specific verb and resource ("Search stored messages by text") plus the result ordering ("newest first"), and names a sibling (bot_read_chat) as the alternative for untruncated text. It does not explicitly distinguish itself from bot_get_new_messages, so sibling differentiation is partial rather than complete.

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 implied ("search stored messages") and one routing rule is given for the truncation case (use bot_read_chat for full text). There is no explicit statement of when to prefer this over bot_get_new_messages or bot_list_chats, so guidance remains inferential.

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