Skip to main content
Glama

Islam West Africa Collection (IWAC)

Get document details

get_document
Read-onlyIdempotent

Get one archival document (by id): full metadata, AI description, and OCR text, in 25k-char parts (follow next_offset). Pass a keyword to get ~2000-char excerpts around each match instead, useful for long documents.

Input Schema

NameRequiredDescriptionDefault
offsetNoRead from this character on: the previous part's next_offset
keywordNoReturn excerpts around matches instead of the full OCR (accent-insensitive)
document_idYes
max_excerptsNoDefault 10, max 25
context_charsNoDefault 2000, max 5000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed7 schema fields changed
    • removedInput schema / properties / context_chars / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / context_chars / minimum
      Removed value: --9007199254740991
    • removedInput schema / properties / document_id / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / document_id / minimum
      Removed value: --9007199254740991
    • removedInput schema / properties / max_excerpts / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / max_excerpts / minimum
      Removed value: --9007199254740991
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Read from this character on: the previous part's next_offset",
      +  "type": "integer"
      +}
  3. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. Changed7 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / context_chars / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / context_chars / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / document_id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / document_id / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / max_excerpts / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / max_excerpts / minimum
      Added value: +-9007199254740991
  5. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior: results are chunked into 25k-character parts with a `next_offset` continuation, and supplying a keyword changes the return shape to ~2000-char excerpts. Not stated: what happens on an invalid id or whether metadata is still returned in keyword mode.

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

Conciseness5/5

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

Two dense sentences, front-loaded with the primary retrieval mode before the alternate keyword mode. No filler and no repetition of annotation or schema text.

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?

No output schema exists, and the description carries the return-value burden well by naming the three payload components and the pagination contract. It falls slightly short on failure modes and on whether excerpt mode also includes the metadata block.

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 80%, so baseline is 3; the description goes further by tying `offset` to the chaining pattern ('follow next_offset') and framing `keyword` as the long-document alternative with an approximate excerpt size. Only `document_id` and the max_excerpts/context_chars interaction remain schema-only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get one archival document (by id)') and enumerates what comes back: full metadata, AI description, and OCR text. It does not distinguish itself from look-alike siblings such as get_article, get_image, or fetch, so an agent must infer which document type maps to which tool.

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?

Guidance is strong within the tool — 'Pass a keyword to get ~2000-char excerpts around each match instead, useful for long documents' clearly routes between full-text and excerpt mode. However, with 39 siblings including search_documents, fetch, and get_article, there is no guidance on when to call this tool versus those alternatives.

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.