get_spending_pace
Ritmo observado de despesas e projeção linear explicitamente estimada.
Análises e assinaturas · Analisar · Consulta / prévia
Efeito da chamada
Consulta ou simula sem gravar alterações financeiras nem iniciar uma importação.
Parâmetros
| Campo | Obrigatório | Tipo | Uso |
|---|---|---|---|
personId | Não | texto | Titular declarado. Obtenha seu ID em caderninho_status. |
spaceId | Não | texto | Espaço da instalação. Consulte get_spaces; o espaço inicial é personal. Padrão: "personal". |
accountId | Não | texto | ID de conta devolvido por get_accounts. |
cardNumber | Não | texto | Quatro últimos dígitos do cartão recebidos na identificação da origem. |
categoryId | Não | texto | ID de categoria devolvido por get_categories no mesmo espaço. |
currency | Não | "BRL" / "USD" / "EUR" / "GBP" / "ARS" / "AUD" / "BHD" / "CAD" / "CHF" / "CLP" / "JPY" / "KWD" | Moeda da operação. Valores de moedas diferentes permanecem separados. |
direction | Não | "DEBIT" / "CREDIT" | Direção DEBIT ou CREDIT. Ela não determina, sozinha, despesa ou receita. |
from | Sim | texto | Primeiro dia incluído na seleção, em AAAA-MM-DD. |
include_ignored | Não | booleano | Inclui lançamentos marcados como ignorados na seleção. Padrão: false. |
status | Não | "PENDING" / "POSTED" | Estado do registro ou filtro. Use somente as opções aceitas por esta ferramenta. |
tagId | Não | texto | ID de etiqueta devolvido por get_tags no mesmo espaço. |
text | Não | texto | Texto literal de busca ou condição. Confira as regras de comparação da ferramenta. |
to | Sim | texto | Último dia incluído na seleção, em AAAA-MM-DD. |
uncategorized | Não | booleano | Somente lançamentos sem categoria efetiva. |
Filtros compostos e limites estão no schema completo. Campos não listados são recusados.
Exemplo de chamada
Substitua os IDs fictícios pelos da sua instalação, obtidos nas consultas indicadas nos parâmetros.
{
"name": "get_spending_pace",
"arguments": {
"from": "2026-10-01",
"to": "2026-10-31"
}
}
Interpretar o resultado
Preserve moeda, valores desconhecidos, cobertura e datas de referência informados na resposta. Uma leitura sem registros não comprova ausência de movimentos no banco. Para totais, use agregações de toda a seleção.
O JSON Schema de saída está em Contrato completo.
Contrato completo
Ver JSON Schema de entrada
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"personId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"spaceId": {
"default": "personal",
"type": "string",
"minLength": 1,
"maxLength": 160
},
"accountId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"cardNumber": {
"type": "string",
"pattern": "^\\d{4}$"
},
"categoryId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"currency": {
"type": "string",
"enum": [
"BRL",
"USD",
"EUR",
"GBP",
"ARS",
"AUD",
"BHD",
"CAD",
"CHF",
"CLP",
"JPY",
"KWD"
]
},
"direction": {
"type": "string",
"enum": [
"DEBIT",
"CREDIT"
]
},
"from": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"include_ignored": {
"default": false,
"type": "boolean"
},
"status": {
"type": "string",
"enum": [
"PENDING",
"POSTED"
]
},
"tagId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"text": {
"type": "string",
"maxLength": 240
},
"to": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"uncategorized": {
"description": "Somente lançamentos sem categoria efetiva.",
"type": "boolean"
}
},
"required": [
"from",
"to"
],
"additionalProperties": false
}
Ver JSON Schema de saída
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"coverage": {
"type": "object",
"properties": {
"connectionIds": {
"type": "array",
"items": {
"type": "string"
}
},
"kind": {
"type": "string",
"enum": [
"imported",
"local_only",
"empty"
]
},
"oldestLastSuccessAt": {
"type": [
"string",
"null"
]
},
"partial": {
"type": "boolean"
}
},
"required": [
"connectionIds",
"kind",
"oldestLastSuccessAt",
"partial"
],
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"classification": {
"type": "string"
},
"from": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"groups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amountMinor": {
"type": "string",
"pattern": "^-?\\d+$"
},
"currency": {
"type": "string"
},
"group": {
"type": "string"
},
"categoryId": {
"type": "string"
},
"categoryName": {
"type": "string"
},
"formattedAmount": {
"type": "string"
},
"label": {
"type": "string"
},
"scale": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"amountMinor",
"currency",
"group",
"formattedAmount",
"label",
"scale"
],
"additionalProperties": false
}
},
"partial": {
"type": "boolean"
},
"referenceDay": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"to": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"totals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cashFlowMinor": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+$"
},
{
"type": "null"
}
]
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"currency": {
"type": "string"
},
"expenseMinor": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+$"
},
{
"type": "null"
}
]
},
"incomeMinor": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+$"
},
{
"type": "null"
}
]
},
"knownCashFlowMinor": {
"type": "string",
"pattern": "^-?\\d+$"
},
"knownExpenseMinor": {
"type": "string",
"pattern": "^-?\\d+$"
},
"knownIncomeMinor": {
"type": "string",
"pattern": "^-?\\d+$"
},
"unclassifiedCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"unknownAmountCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"knownUnclassifiedMinor": {
"type": "string",
"pattern": "^-?\\d+$"
},
"unclassifiedMinor": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+$"
},
{
"type": "null"
}
]
},
"unclassifiedUnknownAmountCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"cashFlowMinor",
"count",
"currency",
"expenseMinor",
"incomeMinor",
"knownCashFlowMinor",
"knownExpenseMinor",
"knownIncomeMinor",
"unclassifiedCount",
"unknownAmountCount",
"knownUnclassifiedMinor",
"unclassifiedMinor",
"unclassifiedUnknownAmountCount"
],
"additionalProperties": false
}
},
"dateBasis": {
"type": "string",
"const": "transaction"
},
"eligibility": {
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "POSTED"
},
"throughDay": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
},
"required": [
"status",
"throughDay"
],
"additionalProperties": false
},
"measure": {
"type": "string",
"const": "classified_expense"
},
"selection": {
"type": "object",
"properties": {
"accountId": {
"type": "string"
},
"cardNumber": {
"type": "string"
},
"categoryId": {
"type": "string"
},
"currency": {
"type": "string"
},
"direction": {
"type": "string",
"enum": [
"DEBIT",
"CREDIT"
]
},
"from": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"include_ignored": {
"type": "boolean"
},
"personId": {
"type": "string"
},
"spaceId": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"PENDING",
"POSTED"
]
},
"tagId": {
"type": "string"
},
"text": {
"type": "string"
},
"to": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
},
"required": [
"from",
"include_ignored",
"spaceId",
"to"
],
"additionalProperties": {}
},
"unit": {
"type": "string",
"const": "minor"
},
"elapsedDays": {
"type": "number",
"minimum": 0
},
"estimated": {
"type": "boolean",
"const": true
},
"periodDays": {
"type": "number",
"exclusiveMinimum": 0
},
"projection": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amountMinor": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+$"
},
{
"type": "null"
}
]
},
"currency": {
"type": "string"
}
},
"required": [
"amountMinor",
"currency"
],
"additionalProperties": false
}
}
},
"required": [
"classification",
"from",
"groups",
"partial",
"referenceDay",
"to",
"totals",
"dateBasis",
"eligibility",
"measure",
"selection",
"unit",
"elapsedDays",
"estimated",
"periodDays",
"projection"
],
"additionalProperties": {}
},
"oldestLastSuccessAt": {
"type": [
"string",
"null"
]
},
"partial": {
"type": "boolean"
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"scope": {
"type": "object",
"properties": {
"personId": {
"type": "string"
},
"spaceId": {
"type": "string"
}
},
"required": [
"spaceId"
],
"additionalProperties": false
},
"view": {
"type": "string",
"const": "effective"
}
},
"required": [
"coverage",
"data",
"oldestLastSuccessAt",
"partial",
"revision",
"scope",
"view"
],
"additionalProperties": {}
}
Voltar para Análises e assinaturas · Confirmações e contratos
get_spending_comparison
Comparar gastos com período anterior de igual duração, mesmos dias do mês anterior ou intervalo explícito. Já inclui grupos e totais dos dois períodos.
get_subscriptions
Identificar candidatos a assinaturas e cobranças recorrentes no histórico efetivo, com frequência, valores exatos e evidências. Exclui pendentes, futuros, transferências classificadas e parcelas identificadas. Padrão: últimos 12 meses e 3 ocorrências. Não confirma contratos nem cria recorrências; partial/truncated indicam análise incompleta.