Get metadata for a filing document before downloading it
get_document_metadataRetrieve metadata for a filing document by its document_id to check available formats, page count, size, and source URL before downloading. Use this to decide whether to fetch inline or hand the URL to the user.
Instructions
Retrieve metadata about a filing document by its document_id (obtained from list_filings). Returns available content formats with byte sizes (when known), page count, source URL, and creation date. Raw upstream fields come through verbatim under jurisdiction_data.
Call this before fetch_document when the document might be large or you don't yet know the format — it lets you decide whether to download inline or hand the source_url to the user.
Do NOT construct or guess document_id values — some registries use composite IDs (multi-part, colon- or slash-separated) that must come from a previous list_filings response. Synthesized IDs will 404 or 502.
available_formats may be empty when the body is paywalled or the registry doesn't publish bodies at all — in those cases fetch_document returns 501 / a purchase link. Unsupported jurisdictions return 501. Per-country ID format, pricing, and availability — call list_jurisdictions({jurisdiction:"<code>"}).
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 a previous list_filings call. | |
| fresh | No |
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 | ||
| created_at | No | ||
| pages | No | ||
| available_formats | No | ||
| size_bytes_by_format | No |