Fetch document
fetch_documentRetrieve the full content of a corporate filing document by its ID. Returns the document bytes or a link for oversized files, enabling direct access to the numbers and text inside.
Instructions
Read a filing's content by document_id (from list_filings). Filing metadata alone doesn't answer most questions — the numbers and text live inside the document.
RESPONSE SHAPES:
• kind='embedded' (under max_bytes ≈ 20 MB) — returns full bytes_base64, source_url_official (evergreen registry URL), and source_url_direct (short-TTL signed proxy URL). PDFs render as a document block you can read natively.
• kind='resource_link' (oversized) — NO bytes_base64. Returns reason, next_steps, both source URLs, and index_preview {page_count, text_layer, outline_present}. Use get_document_navigation to locate pages, then re-call this tool with pages='N-M' and format='pdf'|'text'|'png' for the content.
CRITICAL: if this tool fails (rate limit, 5xx, timeout), do NOT fill in names / numbers / dates from memory — tell the user what failed and offer retry or source_url_official. Outline titles, previews, and snippets from navigation tools are for LOCATING pages, never for quoting.
source_url_official is auto-resolved from the most recent list_filings call; the optional company_id / transaction_id / filing_type / filing_description inputs are overrides for the rare case where document_id didn't come through list_filings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jurisdiction | Yes | ISO 3166-1 alpha-2 country code (uppercase). All registries are official government sources. Currently supported: AU, BE, CA, CA-BC, CA-NT, CH, CY, CZ, DE, ES, FI, FR, GB, HK, IE, IM, IS, IT, KR, KY, LI, MC, MX, MY, NL, NO, NZ, PL, RU, TW. Per-country capability, ID format, examples, status mapping, and caveats: call `list_jurisdictions({jurisdiction:'<code>'})`. To find which countries support a specific tool: `list_jurisdictions({supports_tool:'<tool>'})`. | |
| document_id | Yes | Document ID from list_filings; do not synthesize (composite IDs will 404). | |
| format | No | Preferred content type: application/xhtml+xml, application/pdf, application/xml, application/json. Omit to let the adapter pick the most structured option (XHTML > XML > JSON > PDF). | |
| max_bytes | No | Inline-size cutoff. Default ~20 MB. Documents above this return as `kind='resource_link'` — call `get_document_navigation` for them. | |
| fresh | No | Bypass R2 cache. Filings are immutable; rarely needed. | |
| company_id | No | Override; auto-resolved from list_filings side-cache. | |
| transaction_id | No | Override; auto-resolved from list_filings side-cache. | |
| filing_type | No | Override; auto-resolved from list_filings side-cache. | |
| filing_description | No | Override; auto-resolved from list_filings side-cache. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queried_at | Yes | ISO-8601 + Europe/London timezone stamp for when the registry was queried. | |
| jurisdiction | No | ||
| document_id | No | ||
| source_url | No | ||
| available_formats | No | ||
| chosen_format | No | ||
| size_bytes | No | ||
| pages | No | ||
| bytes_base64 | No | ||
| bytes_omitted_reason | No |