Skip to main content
Glama
This connector has been deprecated

Exact search (diacritics, hamzas, digits)

shamela_search_exact
Read-onlyIdempotent

بحث مطابق مع التشكيل والهمزات والأرقام

Exactness-preserving search the regular search cannot do: it honors diacritics (التشكيل), hamza/alef forms (ٱآأإ vs bare ا, plus ؤ ئ ء ى ة), and digit systems (Arabic-Indic ٠-٩ vs Western 0-9). shamela_search_pages folds all of these away (preserve_* return OPTION_NOT_SUPPORTED). Two-stage, no index change: (1) normalized AND-search gathers candidates; (2) each candidate's FULL raw SQLite text is verified in Node, folding ONLY the features you did NOT ask to preserve. Type the query WITH the diacritics/hamza/digits to enforce; enable at least one flag in preserve. Broad searches may miss matches outside the bounded candidate window (candidate_cap_hit/total_candidates_scanned report it) — pass scope for large libraries. Examples: shamela_search_exact({query:'أحمد', preserve:{preserve_hamza:true}}) won't match «احمد»; shamela_search_exact({query:'عِلْم', preserve:{preserve_diacritics:true}}) won't match «عَلَم».

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (1-100, default 20).
queryYesThe exact Arabic string to find. Type it WITH the diacritics / hamza form / digit system you want preserved (the query is NOT auto-diacritized). Multiple words are matched as written; the `preserve` flags decide which distinctions are enforced.
scopeNoRestrict to books/authors/categories/period. Strongly recommended for large libraries so the candidate window covers the topic.
offsetNoNumber of results to skip for pagination. Use with `limit` to page through large result sets. The response includes `has_more` and `next_offset` to drive paging.
preserveYesWhich distinctions to enforce during stage-2 verification. At least one must be true.
response_formatNoOutput format for the human-readable text. 'markdown' (default) is best for direct display; 'json' returns the same data as a single JSON code block; 'none' skips the rendered text entirely and returns a one-line pointer, leaving `structuredContent` as the whole answer. The structured data is returned in `structuredContent` regardless of this setting, so a caller that parses it should pass 'none' — the character budget is measured over BOTH channels, and the unread copy is otherwise spending most of it. Requires the 'response_format.none' capability (see shamela_brief).markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover safety (readOnlyHint, idempotentHint, destructiveHint=false), and the description layers on genuinely new behavior: the two-stage normalized-candidate then raw-SQLite-verification pipeline, the folding rule, the bounded candidate window with candidate_cap_hit/total_candidates_scanned reporting that broad searches may miss matches, and the OPTION_NOT_SUPPORTED error path. That is rich, non-obvious behavioral detail beyond the structured fields.

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 purpose and the routing constraint are front-loaded, and the concrete examples are high-value. It is dense and slightly long with some restated ideas, but nearly every sentence earns its place given the tool's complexity; no filler.

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 6-parameter, nested-schema, two-stage tool with no output schema, the description covers mechanism, limits, required flags, error signals, and examples. It references response fields (candidate_cap_hit, structuredContent) but does not fully frame the return shape, which is the only notable gap.

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 the baseline is 3, but the description adds real meaning beyond the schema: the query is NOT auto-diacritized and must be typed with the target form, at least one preserve flag must be true, and scope matters specifically to widen the candidate window. It does not add much syntax for limit/offset, but it meaningfully enriches the two mandatory and the scoping parameters.

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?

States a specific verb and resource (exactness-preserving search over pages) and pinpoints the distinguishing feature in the title and first sentence: honor diacritics, hamza/alef forms, and digit systems. It explicitly separates itself from the sibling shamela_search_pages, so an agent can route without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the alternative (shamela_search_pages), states exactly what that tool cannot do (folds these distinctions, preserve_* returns OPTION_NOT_SUPPORTED), and gives operational conditions: type the query WITH the features to enforce, enable at least one preserve flag, and pass scope for large libraries. This is explicit when/when-not/alternative guidance.

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