Server capabilities and search pitfalls
shamela_briefبيان قدرات الخادم ومزالق البحث
Capability handshake + operating brief for programmatic callers. Call this FIRST, before sending any argument you are not certain this build accepts. Returns capabilities[] — the arguments and response fields this server supports — plus server_version, limits, and traps[]. Every tool input here is strict, so sending an unknown argument (e.g. shape, response_format:'none') to a server that predates it is a HARD validation error that fails the whole call, not a silently ignored field; and tools/list cannot help, because it proves a tool exists without saying which arguments it takes. Gate each new argument on its capability string. traps[] is the operating half: each entry pairs a way a search result misleads with the exact RESPONSE FIELD that proves it fired (relaxed_min_match, zero_hit_terms, paging_ceiling, coverage.sample_is_complete, scope_resolution.dropped, madhab_source, probes[].qualifiers, …), so a caller checks the envelope instead of trusting prose. brief_hash covers every other field: cache the brief and re-fetch only when it changes. Pure text and constants — no library access, so it answers even when the Shamela install is missing. Examples: shamela_brief({}), shamela_brief({response_format:'json'}).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| response_format | No | Output 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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| traps | No | ||
| limits | No | ||
| truncated | No | ||
| brief_hash | No | ||
| capabilities | No | ||
| rows_dropped | No | ||
| server_version | No | ||
| truncation_message | No |