Skip to main content
Glama

Search text

text_search
Read-onlyIdempotent

Search Arabic (or any) text with normalisation: tashkeel, alef/ya/ta-marbuta, hamza and Arabic-Indic digit variants are ignored, so فَاطِمَة matches فاطمة and ١٢٣ matches 123. mode=words (default) matches whole words, phrase matches any substring, fuzzy tolerates up to max_distance edits per word. Returns exact start/end offsets into the original text plus a context snippet.

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

Input Schema

NameRequiredDescriptionDefault
modeNowords = whole-word phrase (default); phrase = any substring; fuzzy = edit-distance per word.
textYesThe text to search (the corpus).
queryYesWhat to look for; normalised like the corpus.
max_resultsNoMaximum matches to return.
max_distanceNoEdits allowed per word in fuzzy mode (default 1).
context_charsNoCharacters of context on each side of a match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, so the safety profile is covered. The description adds what annotations cannot: that matching is normalisation-insensitive (tashkeel, alef/ya/ta-marbuta, hamza, Arabic-Indic digits ignored) with concrete examples, and that results are offsets into the ORIGINAL text, which is a crucial non-obvious trait.

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?

Three dense sentences, no filler: normalisation first with examples, mode semantics second, return shape last. Front-loaded and every clause carries information an agent needs to call it correctly.

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 carries the return-shape burden and does so (start/end offsets plus context snippet). Remaining gaps are minor: defaults for max_results and context_chars, and result ordering/truncation behaviour are unstated but recoverable from the schema.

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 six parameters are already documented, and the mode explanation in the description largely restates the enum description. The worked normalisation examples (فَاطِمَة/فاطمة, ١٢٣/123) add a little meaning, but max_results and context_chars get no treatment at all, so the 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?

Specific verb+resource ("Search ... text") with an explicit scope qualifier ("Arabic (or any) text") and the normalisation behaviour that distinguishes it from plain substring search. It is clearly different from siblings like text_normalize or text_metrics by implication, but no sibling is ever named, so it falls short of the 5 benchmark.

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?

Gives genuinely actionable selection guidance between the three modes: words = whole words (default), phrase = any substring, fuzzy = edit distance with max_distance. It never says when NOT to use this tool or when a sibling (e.g. text_normalize then search, or doc_extract for PDFs) is the better entry point.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.