Query Any Baatjie Table
baatjie_queryQuery rows from tanOS or sigscheCore tables with filters, column selection, sorting, and pagination. PII is redacted by default unless explicitly included.
Instructions
Read rows from any table in tanOS or sigscheCore, with filtering, column selection, ordering and pagination.
This is the general-purpose read. For sequencing work prefer baatjie_next_actions, and for the ops snapshot prefer baatjie_dashboard — both are cheaper and better shaped.
Personal identifiers (ID numbers, passport numbers, phone, email, banking details) are withheld unless include_pii is true, and the response reports which fields were withheld.
Args:
project ('tanos' | 'sigsche'): Which system
table (string): Table name — must be in the allowlist
columns (string[], optional): Specific columns; omit for all
filters (Filter[]): AND-combined filters
order_by (string, optional): Column to sort on
ascending (boolean): Sort direction (default: true)
limit (number): Max rows, 1-200 (default: 25)
offset (number): Rows to skip (default: 0)
include_pii (boolean): Include personal identifiers (default: false)
response_format ('markdown' | 'json'): Output format
Returns: { "total": number, "count": number, "offset": number, "items": object[], "has_more": boolean, "next_offset"?: number, "redacted_fields": string[] }
Examples:
"Which todos are still open?" -> project='tanos', table='todos', filters=[{"column":"status","op":"neq","value":"done"}]
"Show agencies signed this month" -> table='locare_accounts', filters=[{"column":"signed_date","op":"gte","value":"2026-08-01"}]
"Biggest BRM books" -> table='brms', order_by='inherited_book_size', ascending=false
Error Handling:
"Unknown table" lists the valid table names for that project
Column errors suggest calling baatjie_describe_schema
tanOS tables: Property: landlords, properties, rooms, tenants, foreign_nationals, leases, lease_agreements, payments, maintenance, notices Commercial: locare_accounts, brms, agents, employers, policies, daily_activity Internal: todos, ai_agents, audit_log
sigscheCore tables: profiles, queue_items, library_items, brand_cards, registration_status
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows to return (1-200, default 25) | |
| table | Yes | Table name (see allowlist) | |
| offset | No | Rows to skip, for pagination | |
| columns | No | Specific columns to return. Omit for all columns. Narrowing columns is the cheapest way to keep large result sets inside the response limit. | |
| filters | No | Filters combined with AND. Example: [{"column":"status","op":"eq","value":"open"}] | |
| project | Yes | Which system: 'tanos' (property OS, pipeline, sequencing) or 'sigsche' (signal scheduler) | |
| order_by | No | Column to sort by | |
| ascending | No | Sort ascending (default true) | |
| include_pii | No | Include direct personal identifiers (ID numbers, passport numbers, phone, email, banking details). Defaults to false so routine queries do not pull personal data unnecessarily. Set true only when the task genuinely needs it. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable | markdown |