Get schema
well_get_schemaDiscover available data types and fields.
USAGE:
well_get_schema() → List ALL available roots, including the accounting graph (ledger_accounts, journals, journal_entries) plus account_balances, tax_rates, exchange_rates — query these for real financial statements (compte de résultat / balance sheet) instead of reconstructing them from raw invoices
well_get_schema({ root: "invoices" }) → List all available fields for invoices
WORKFLOW:
Call well_get_schema(root) to see available fields
Pick the fields you need for your task (typically 5-15)
Call well_query_records with those specific fields
Returns fields with path, type, and (when documented) semantic context:
{ path: "invoices.grand_total", type: "numeric", context: "Total invoice amount incl. tax in the document currency...", enrichment: "AI extraction" } → use _eq, _gt, _lt, etc.
{ path: "invoices.local_currency", type: "enum" } → use ONLY _eq, _neq, _in, _nin, _is_null
{ path: "invoices.issuer.name", type: "text" } → use _eq, _like, _ilike, etc.
"context" (when present) explains what the field MEANS in the domain and how it's used — read it to pick the right field and write correct filters.
"enrichment" (when present) is the value's provenance (e.g. "Bank sync", "AI extraction", "System generated", "Derived", "Manual"). Use the type to choose the right whereClause operators in well_query_records. To use in well_query_records, convert path to array: "invoices.issuer.name" → ["invoices", "issuer", "name"]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Entity root to inspect. Omit to list every available root (call well_get_schema() with no argument first). Includes the accounting graph (ledger_accounts, journals, journal_entries) alongside companies, invoices, transactions, accounts, and more. | |
| depth | No | Relationship depth: 0=scalars only, 1=direct relations (default), 2=nested, 3=level-3 graph | |
| workspace_id | No | Target workspace. Optional: this tool describes the token itself rather than one workspace's data, so omitting it returns the same answer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | ||
| error | No | ||
| roots | No | ||
| total | No | ||
| fields | No | ||
| success | Yes |