Skip to main content
Glama
BenjisCollector

mcp-arabic-toolkit

detect_dialect

Classify Arabic text into dialects (Egyptian, Levantine, Gulf, Maghrebi, MSA) using a keyword heuristic. Returns predicted dialect, confidence, and per-dialect scores.

Instructions

Guess the Arabic dialect using a transparent keyword heuristic.

This is a rule-based heuristic, NOT a trained classifier. It counts hand-picked marker words per dialect (Egyptian, Levantine, Gulf, Maghrebi, MSA) and returns the best match with a crude confidence. See :func:arabic_tools.detect_dialect for the full documented limitations.

Args: text: The Arabic text to classify.

Returns: A dict with the predicted dialect, label, crude confidence, per-dialect scores, and a note documenting that this is a heuristic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Describes the heuristic approach (counts marker words, returns best match with crude confidence) and notes it's not a classifier. No annotations exist, so the description carries the full burden, which it meets adequately, though more detail on limitations would improve it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured with Args and Returns sections. It avoids unnecessary verbosity while providing key details. Slight improvement could condense the Args/Returns into prose.

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?

Given the tool's simplicity and presence of an output schema description (in text, not input schema), the description covers the heuristic nature, return format, and limitations. It is complete for the task.

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?

The single parameter 'text' is described as 'The Arabic text to classify,' which adds meaning beyond the schema's empty description. Schema coverage is 0%, so the description compensates well, though the parameter is straightforward.

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?

Clearly states the tool guesses Arabic dialect using a transparent keyword heuristic. The verb 'guess' and resource 'Arabic dialect' are specific. It distinguishes from siblings which are unrelated (token counting, normalization, etc.).

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?

States it's a rule-based heuristic, not a trained classifier, but lacks explicit guidance on when to use vs alternatives. Users are directed to read full limitations elsewhere, which is helpful but does not provide direct context for selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BenjisCollector/mcp-arabic-toolkit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server