Skip to main content
Glama

Normalize Arabic text

text_normalize
Read-onlyIdempotent

Canonicalise Arabic text for search, matching or indexing: remove tashkeel and tatweel, fold alef/ya/ta-marbuta, unify Arabic-Indic digits, strip bidi control characters and collapse whitespace. mode=light is lossless; search adds letter folding; index also strips punctuation so the result can be used as a dedup key.

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>"
    },
    "name": "text_normalize"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNolight = whitespace/digits/bidi cleanup; search = + tashkeel removal and letter folding; index = + punctuation stripped.
textYesThe Arabic text to normalize.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds real value on top: what each mode destroys, that light is lossless, and that index output is safe as a dedup key. Minor tension: the opening sentence lists tashkeel removal as universal while only 'search' and 'index' modes actually remove it, which could mislead someone who only reads the first clause.

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 sentences, both front-loaded: the operation and its components come first, the mode trade-offs second. No filler and no restatement of the title.

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 2-parameter, read-only, idempotent transform with full schema coverage and no output schema, the description supplies everything needed to call it correctly. It does not state that the normalized string is returned, but that is safely inferable from the name and annotations.

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 coverage is 100%, so baseline is 3; the description still adds meaning by labelling light as lossless and framing index output as a dedup key, which the enum text does not say. The mapping of modes to transformations largely restates the schema, so this is a modest lift rather than a full one.

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?

Specific verb ('canonicalise') plus resource ('Arabic text') plus the enumerated transformations (tashkeel, tatweel, alef/ya/ta-marbuta folding, digits, bidi, whitespace). This clearly separates it from sibling text tools such as text_chunk, text_diff and text_search without needing to open the schema.

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 the intended contexts ('for search, matching or indexing') and the mode guidance effectively tells the agent which variant to pick and why. It stops short of explicitly naming a sibling tool or stating when not to normalize (e.g. before diffing raw text), so it is clear but not exhaustive.

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.