Raw schema
{
"type": "object",
"properties": {
"filterA": {
"type": "object",
"properties": {
"dateStart": {
"type": "string",
"description": "ISO date (YYYY-MM-DD). Inclusive lower bound."
},
"dateEnd": {
"type": "string",
"description": "ISO date (YYYY-MM-DD). Inclusive upper bound."
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code. E.g. \"USD\", \"HKD\"."
},
"text": {
"type": "string",
"description": "Whole-row text search over raw transaction fields (case-insensitive)."
},
"direction": {
"type": "string",
"enum": [
"credit",
"debit"
],
"description": "Semantic direction."
},
"category": {
"type": "string",
"enum": [
"income",
"transfers",
"payroll",
"rent_premises",
"utilities_telecom",
"software_subscriptions",
"professional_services",
"bank_fees_interest",
"taxes_government",
"travel_vehicle",
"meals_entertainment",
"supplies_equipment",
"insurance_health",
"loan_payments",
"groceries_personal",
"cash",
"other"
],
"description": "Category slug, e.g. \"meals_entertainment\", \"groceries_personal\"."
},
"merchant": {
"type": "string",
"description": "Substring match against description or counterparty (case-insensitive)."
},
"amountMin": {
"type": "number",
"description": "Inclusive minimum absolute amount."
},
"amountMax": {
"type": "number",
"description": "Inclusive maximum absolute amount."
}
},
"additionalProperties": false,
"description": "Subset of transactions to operate on. All fields are optional and combined with AND logic."
},
"filterB": {
"type": "object",
"properties": {
"dateStart": {
"type": "string",
"description": "ISO date (YYYY-MM-DD). Inclusive lower bound."
},
"dateEnd": {
"type": "string",
"description": "ISO date (YYYY-MM-DD). Inclusive upper bound."
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code. E.g. \"USD\", \"HKD\"."
},
"text": {
"type": "string",
"description": "Whole-row text search over raw transaction fields (case-insensitive)."
},
"direction": {
"type": "string",
"enum": [
"credit",
"debit"
],
"description": "Semantic direction."
},
"category": {
"type": "string",
"enum": [
"income",
"transfers",
"payroll",
"rent_premises",
"utilities_telecom",
"software_subscriptions",
"professional_services",
"bank_fees_interest",
"taxes_government",
"travel_vehicle",
"meals_entertainment",
"supplies_equipment",
"insurance_health",
"loan_payments",
"groceries_personal",
"cash",
"other"
],
"description": "Category slug, e.g. \"meals_entertainment\", \"groceries_personal\"."
},
"merchant": {
"type": "string",
"description": "Substring match against description or counterparty (case-insensitive)."
},
"amountMin": {
"type": "number",
"description": "Inclusive minimum absolute amount."
},
"amountMax": {
"type": "number",
"description": "Inclusive maximum absolute amount."
}
},
"additionalProperties": false,
"description": "Subset of transactions to operate on. All fields are optional and combined with AND logic."
},
"metric": {
"type": "string",
"enum": [
"sum",
"average",
"count",
"max",
"min"
],
"description": "Metric for both groups."
},
"scope": {
"description": "Optional structural scope (WHO Γ WHEN). Omit to search across all your completed statements. \"accounts\" is a list of account/product chips ({ kind: \"account\" | \"product\", id }, the id of an account descriptor or product returned by a tool); \"dateRange\" bounds by transaction date (YYYY-MM-DD).",
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "account",
"description": "This chip addresses a single account."
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The account id: the `id` of an account descriptor returned by a tool, or of a statement tool `accounts[]` entry."
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "product",
"description": "This chip addresses a product and expands to its child accounts."
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The product id: the `id` of a product returned by a statement tool (`get_statement` / `convert_statement`, `products[].id`)."
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false
}
]
},
"description": "Account/product id chips (kind + id) to scope to. Empty = all accounts."
},
"dateRange": {
"description": "Bounds results to transactions within this date range. Omit for no date filter.",
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Start of the date range (inclusive), YYYY-MM-DD."
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "End of the date range (inclusive), YYYY-MM-DD."
}
},
"required": [
"from",
"to"
]
}
},
"required": [
"accounts"
]
}
},
"required": [
"filterA",
"filterB",
"metric"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}