Skip to main content
Glama
This connector has been deprecated

Format a citation

shamela_get_citation
Read-onlyIdempotent

صياغة إحالة

Format a citation in five styles. style='shamela' (default) replicates Shamela's UI copy-with-citation: «» (/ ):\n«». style='short' is a one-line inline reference: ، ، ص . style='full' is the long form with author death year and book composition year, plus a notes[] array listing missing citation-grade fields (edition/publisher/city/editor — master.db doesn't have these; never fabricate). style='bibtex' and style='ris' export a machine-readable record for Zotero/EndNote/Mendeley (Western digits, Arabic UTF-8, cite key shamelap, same missing-field notes[], no fabricated edition/publisher/city/editor). All other styles use Arabic-Indic digits. Examples: shamela_get_citation({book_id:, page_id:, style:'shamela'}), shamela_get_citation({book_id:, page_id:, text:'', style:'shamela'}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoOptional quoted text. When provided in 'shamela' style, the output includes a two-line block: «<book>» (<part>/ <page>): «<text>».
styleNoCitation style. 'shamela' replicates Shamela's UI copy-with-citation format (default). 'short' is a one-line inline reference. 'full' is the long form including author death year and book year, with notes listing missing fields (publisher/edition/etc are not in master.db). 'bibtex' and 'ris' are machine-readable exports for Zotero/EndNote/Mendeley (Western digits, Arabic UTF-8, stable cite key shamela<book_id>p<page_id>); they carry only fields master.db has, with the same missing-field notes[].shamela
book_idYesThe book id.
page_idNoOptional page_id. When omitted, the citation references the book without a specific page (e.g. for a book-level citation).
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?

Annotations already cover the safety profile (readOnly, idempotent, closed-world, non-destructive), and the description goes well beyond them: it discloses the never-fabricate rule for missing bibliography fields, the notes[] array of gaps, the digit-system split (Western for bibtex/ris vs Arabic-Indic elsewhere), the stable cite key format, and the response_format/character-budget interaction.

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?

It is dense but front-loaded, leading with the five styles before details. There is noticeable overlap between the description and the already-thorough schema prose (style, text, response_format are all re-explained), plus a redundant Arabic heading, keeping it just short of a 5.

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?

With no output schema and five parameters, the description must carry the return-value burden itself, and it does: it documents the two-line shamela block, the notes[] gaps, the cite key, and the digit conventions across styles. Nothing an agent needs to call this correctly is missing.

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?

Schema description coverage is 100%, so the schema already documents all five parameters including the style enum and the text param's two-line behavior. The description restates much of this rather than adding new semantics, so the baseline 3 applies; the examples of parameter combinations add only marginal value.

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?

The title and opening line ('Format a citation in five styles') give a specific verb and resource, and the description then enumerates each of the five styles with their distinct output shapes. An agent can tell this is the citation-formatting tool rather than a retrieval sibling like shamela_get_page without opening any 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?

It states exactly when to pick each style: 'shamela' for UI copy-with-citation, 'short' for one-line inline references, 'full' for long-form with death/composition years, and 'bibtex'/'ris' for Zotero/EndNote/Mendeley. It also flags the conditional behavior of the optional text param and supplies two concrete invocation examples, leaving little to inference.

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