Skip to main content
Glama
This connector has been deprecated

Printed page to library page

shamela_resolve_printed_page
Read-onlyIdempotent

ردُّ رقم الصفحة المطبوعة إلى صفحات البرنامج

Turn a printed citation — «vol. 4, p. 405» — into the internal page ids that carry it, in one indexed query. A printed page number and a page_id are different things with no arithmetic between them, so estimating an id and correcting it by reading is both slow and unreliable. Returns page_ids[]: ONE printed page routinely maps to SEVERAL ids (part='1', page=6 is ids 9, 10 and 11 in the fixture book) because Shamela splits a long printed page across records — read them all, since the first alone is a fragment quoted as the page. Failure is specific rather than null: 'book_not_downloaded', 'no_printed_pagination' (Shamela paginates this entry itself, so no printed page exists to find), 'part_not_found' (with available_parts), 'page_not_in_part' (with the range that does exist). citable false means the numbers are Shamela's own, not a published edition's. Omit part for a single-volume work or a citation with no volume; parts_matched then reports whether the number was ambiguous across volumes. Different printings paginate differently — resolve the title with shamela_resolve_work first and use the printing the citation came from. Examples: shamela_resolve_printed_page({book_id:1681, part:'1', page:6}), shamela_resolve_printed_page({book_id:6910, part:'4', page:405}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYesThe PRINTED page number as the citation gives it (e.g. 405).
partNoThe volume/part label as the book uses it, usually a bare number ('4'). Omit when the citation names no volume or the work is single-volume: the search then runs across every part and the response reports which parts matched, so an ambiguous page number is visible rather than silently resolved to the first volume.
book_idYesThe book. Resolve a cited title with shamela_resolve_work first — and note that different printings of one work paginate differently, so the book_id must be the printing the citation came from.
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.6/5.0
Behavior5/5

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

Adds substantial context beyond the readOnly/idempotent/destructive annotations: the cardinality warning that one printed page maps to several ids and all must be read, the specific error taxonomy ('book_not_downloaded', 'no_printed_pagination', 'part_not_found', 'page_not_in_part'), and the meaning of `citable` false. This is exactly the behavior an agent cannot infer from annotations.

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?

Front-loaded with the core purpose and the cardinality warning early, then failure modes, then parameter notes and examples. It is dense and nearly every sentence earns its place, though the leading Arabic line restating the title is redundant padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, yet the description discharges that burden by naming the return field (`page_ids[]`), its multiplicity semantics, and supporting fields (`parts_matched`, `citable`). Combined with the failure taxonomy, an agent has everything needed to call and interpret the result.

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 schema already documents the four parameters; the description nonetheless adds meaning the schema lacks, notably that different printings paginate differently, that omitted `part` triggers an ambiguity report via `parts_matched`, and worked examples of parameter shapes. It repeats some schema content but the incremental value is real.

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 ('turn a printed citation into the internal page ids') and explicitly frames the transformation problem (a printed page number and a page_id have no arithmetic between them), which distinguishes it from siblings like shamela_get_page and shamela_resolve_work. An agent can tell exactly what this tool produces without opening 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 clear prerequisites and routing: resolve the title with shamela_resolve_work first, use the printing the citation came from, and omit `part` for single-volume works. It doesn't explicitly state when NOT to use the tool, so it stops short of the top band, but the workflow guidance is concrete.

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