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. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | ||
| error | No | ||
| roots | No | ||
| total | No | ||
| fields | No | ||
| success | Yes | ||
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. |