Skip to main content
Glama

internet-archive-mcp-server

Get Internet Archive Item Text

ia_get_text
Read-onlyIdempotent

Retrieve readable OCR DjVuTXT or plain text from an Internet Archive item, including public-domain books, documents, scanned periodicals, and transcripts. Set max_chars for page size, then pass next_continuation as continuation with the same identifier and omit char_offset. Direct char_offset access remains available. To confirm a text file exists, call ia_get_item with format "DjVuTXT".

Input Schema

NameRequiredDescriptionDefault
max_charsNoMaximum number of characters to return in this response. Defaults to the server-configured maximum (IA_MAX_SNAPSHOT_CHARS, typically 50 000); a larger value is served at that maximum, with a notice. Lower values reduce token usage.
identifierYesInternet Archive item identifier, e.g. "prideprejudice00aust" (Pride and Prejudice). Obtain from ia_search_items results.
char_offsetNoCharacter offset to start reading from (default 0). For sequential pages use next_continuation as continuation instead. Omit char_offset when using continuation.
continuationNoOpaque next_continuation from the previous page. Omit char_offset when using it; blank is omitted.

Output Schema

NameRequiredDescriptionDefault
textNoThe text slice starting at char_offset up to max_chars characters.
errorNoPresent when the call failed. Absent on success.
noticeNoExplains a max_chars clamp or why efficient continuation is unavailable, with the next char_offset or end-of-document status.
has_moreNoTrue when there is more text beyond this slice. Use next_continuation, or add max_chars to char_offset if no token is available.
max_charsNoMaximum characters this response could hold — the requested max_chars, or the server maximum when the request exceeded it.
char_offsetNoCharacter offset used for this response.
source_fileNoFilename of the source text file fetched from the item.
next_continuationNoOpaque next-page token; use as continuation with the same identifier and omit char_offset. Expires after one hour.
source_file_bytesNoSize of the source text file in bytes, from the item manifest — a byte count, not a character count (non-ASCII text takes several bytes per character). Omitted when the manifest lists no size.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • removedInput schema / properties / char_offset / default
      Removed value: -0
    • changedInput schema / properties / char_offset / description
      Previous value: -"Character offset to start reading from (default 0). To read the next page, add max_chars to the previous char_offset."New value: +"Character offset to start reading from (default 0). For sequential pages use next_continuation as continuation instead. Omit char_offset when using continuation."
    • addedInput schema / properties / continuation
      Added value: +{
      +  "description": "Opaque next_continuation from the previous page. Omit char_offset when using it; blank is omitted.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `item_not_found`: The identifier does not exist in the Internet Archive. `no_text_file`: The item exists but contains no readable text file (DjVuTXT or plain-text). `download_forbidden`: Access to this item is restricted — it is in a login-required or limited collection. `archive_unavailable`: The Internet Archive Metadata API or the text file download did not answer within the request timeout, could not be reached, answered HTTP 5xx after retries, 429, or another 4xx, or the metadata response was unreadable. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_continuation`: A continuation is unknown, expired, belongs to another item, or its file changed. `range_unavailable`: The download ignored or returned an invalid conditional byte range. `ambiguous_pagination`: Both a nonblank continuation and char_offset were supplied. `item_not_found`: The identifier does not exist in the Internet Archive. `no_text_file`: The item exists but contains no readable text file (DjVuTXT or plain-text). `download_forbidden`: Access to this item is restricted — it is in a login-required or limited collection. `archive_unavailable`: The Internet Archive Metadata API or the text file download did not answer within the request timeout, could not be reached, answered HTTP 5xx after retries, 429, or another 4xx, or the metadata response was unreadable. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "item_not_found",
      -  "no_text_file",
      -  "download_forbidden",
      -  "archive_unavailable"
      -]New value: +[
      +  "invalid_continuation",
      +  "range_unavailable",
      +  "ambiguous_pagination",
      +  "item_not_found",
      +  "no_text_file",
      +  "download_forbidden",
      +  "archive_unavailable"
      +]
    • changedOutput schema / properties / has_more / description
      Previous value: -"True when there is more text beyond this slice. Increment char_offset by max_chars to read the next page."New value: +"True when there is more text beyond this slice. Use next_continuation, or add max_chars to char_offset if no token is available."
    • addedOutput schema / properties / next_continuation
      Added value: +{
      +  "description": "Opaque next-page token; use as continuation with the same identifier and omit char_offset. Expires after one hour.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Set when max_chars exceeded the server maximum (IA_MAX_SNAPSHOT_CHARS) and was served at it, naming the char_offset of the next page, or saying the page reaches the end of the document."New value: +"Explains a max_chars clamp or why efficient continuation is unavailable, with the next char_offset or end-of-document status."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile is largely covered. The description adds useful behavioral context about page sizing, continuation handling, and the fallback check for whether a text file exists, but it does not describe failure modes when no OCR text is available.

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?

The description is front-loaded with purpose, then moves efficiently into pagination mechanics and an alternative tool for file-existence checks. Every sentence carries operational value with no unnecessary repetition.

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?

Given rich annotations, full schema coverage, and an output schema, the description provides everything needed to select and invoke the tool correctly. It covers what is retrieved, how to page through results, and how to verify that a text file exists before using this tool.

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 parameters are already well documented. The description reinforces max_chars as page size and continuation as coming from next_continuation, but most of this restates or lightly contextualizes what the schema already provides.

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 description uses a specific verb and resource: retrieve readable OCR DjVuTXT or plain text from an Internet Archive item. It also scopes the content types and explicitly distinguishes the existence-check path via ia_get_item, so an agent can tell this apart from related item/snapshot tools.

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?

It gives clear operational guidance for pagination: set max_chars, then pass next_continuation as continuation with the same identifier and omit char_offset. It also names ia_get_item as the alternative for confirming a text file exists, though it does not exhaustively contrast against all sibling tools such as ia_get_snapshot or ia_search_items.

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.