/** * @fileoverview Tool for retrieving the plain-text content of a Project Gutenberg book, * stripped of license boilerplate, with offset/limit chunking for context-budget management. * @module mcp-server/tools/definitions/gutenberg-get-text */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const gutenbergGetText: import("@cyanheads/mcp-ts-core").ToolDefinition; limit: z.ZodDefault; }, z.core.$strip>, z.ZodObject<{ id: z.ZodNumber; title: z.ZodString; text: z.ZodString; offset: z.ZodNumber; length: z.ZodNumber; totalChars: z.ZodNumber; remainingChars: z.ZodNumber; hasMore: z.ZodBoolean; provenance: z.ZodString; sourceFormat: z.ZodEnum<{ "text/html": "text/html"; "text/plain; charset=us-ascii": "text/plain; charset=us-ascii"; "text/plain; charset=utf-8": "text/plain; charset=utf-8"; }>; }, z.core.$strip>, readonly [{ readonly reason: "not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "No book exists with the given ID."; readonly recovery: "Verify the ID with gutenberg_search_books. The ID must be a positive integer matching a catalog entry."; }, { readonly reason: "audio_book"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "The book is an audio recording (media_type \"Sound\"), not a text book — no literary plain text is available."; readonly recovery: "This Gutenberg entry is an audio book. Use gutenberg_search_books or gutenberg_get_book to find a text edition of the same work, then call gutenberg_get_text on that ID."; }, { readonly reason: "no_text_format"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "The book has no UTF-8 plain-text or HTML edition available to read (for example an older ASCII-only entry)."; readonly recovery: "Call gutenberg_get_book to inspect the available formats. The book may only exist as EPUB, ASCII-only, or other formats this server cannot read as text."; }, { readonly reason: "offset_out_of_range"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "The offset is greater than or equal to totalChars (past the end of the book)."; readonly recovery: "Use an offset less than totalChars. A prior response's remainingChars field shows how much text is left."; }, { readonly reason: "text_fetch_failed"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "The Gutenberg file server returned an error or did not respond within the timeout."; readonly recovery: "Project Gutenberg file servers are sometimes slow. Retry after a short delay. If the error persists, the file may be temporarily unavailable."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "catalog_unavailable"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "The catalog lookup that precedes reading a book did not answer within the time this server allows."; readonly recovery: "This failed before any text was requested — the catalog, not the file server, is unreachable. Retry in a few seconds, or call gutenberg_get_book to confirm the catalog is answering again."; readonly retryable: true; readonly thrownBy: "service"; }], undefined>; //# sourceMappingURL=gutenberg-get-text.tool.d.ts.map