# Working with XBRL

Use a two-step workflow. First discover what each filing actually reports; then query the selected concept or presentation statement.

## CLI

Use `betterfilings xbrl search` and `betterfilings xbrl query`. Put complex or multi-filing inputs in JSON with `--input FILE|-`. Automatic local processing can use a filing ID plus the XBRL artifact; local files can use `--file package.zip`.

## Hosted MCP

Call `xbrl_search` with one to five metric queries across at most ten filing IDs. Review ranked filing-specific concepts, statements, sample facts, periods, units, and scopes. Then call `xbrl_query` with a separate selection per filing. Poll a returned job with `filing_job_get`.

Do not guess a standard tag or silently equate issuer extensions. Retain reported concept, exact value, unit, period, entity and dimensions, validation state, and source locator. An optional `as` label records your mapping; it does not normalize the source fact. Missing or conflicting facts are not zero.
