Skip to main content
Glama

Text & Number Toolkit

Normalise Arabic text

normalize_arabic
Read-onlyIdempotent

Clean Arabic text for matching, search and storage: strip diacritics and tatweel, unify alef forms, optional ة→ه and ى→ي, Western digits, Latin punctuation, whitespace. Reports exactly which rules changed the text. Response: result plus data_confidence, estimated_items[], sources[], data_version, warnings[]; deterministic (no AI inside), nothing logged.

Input Schema

NameRequiredDescriptionDefault
textYes
unify_alefNoآ أ إ ٱ → ا.
strip_tatweelNoRemove kashida/tatweel elongation.
strip_tashkeelNoRemove diacritics (fatha, damma, shadda…).
digits_to_westernNo٠-٩/۰-۹ → 0-9.
taa_marbuta_to_haaNoة → ه (search normalisation; changes spelling).
alef_maqsura_to_yaaNoى → ي (search normalisation; changes spelling).
collapse_whitespaceNo
punctuation_to_latinNo، ؛ ؟ ٪ ٫ ٬ → , ; ? % . ,

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent and non-destructive semantics, and the description adds genuinely new behavioral facts: "reports exactly which rules changed the text," "deterministic (no AI inside)" and "nothing logged." The privacy and determinism guarantees are meaningful context an agent could not infer from the schema or annotations.

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 dense sentences with zero filler, front-loaded with the operation and its rule set before any response detail. Every clause carries information an agent can act on.

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 9-parameter tool with an output schema, the definition covers the rule set, optionality, determinism and logging behavior, which is enough to call it correctly. Minor gaps remain: no guidance on non-Arabic or empty input, and the response field enumeration largely duplicates the output 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?

At 78% schema description coverage the schema already documents nearly every flag with examples (٠-٩ → 0-9, ة → ه). The description largely restates that list rather than adding new semantics; its only added signal is calling out ة→ه and ى→ي as optional, which the schema's default:false already conveys.

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?

Uses a specific verb-plus-resource opening ("Clean Arabic text") and enumerates the exact transformations applied, immediately separating it from siblings such as detect_script or transliterate. The stated goal ("for matching, search and storage") tells an agent what class of task this serves.

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 gives clear context for when this tool applies (matching, search, storage normalization) and flags the two spelling-changing rules as optional, which is the key usage decision. It stops short of naming alternatives or stating when not to use it (e.g., when detection via detect_script is the actual need).

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.

Resources