Skip to main content
Glama

Lovie Company Formation

Preview Categorization Rule

transaction_preview_categorization_rule
Read-only

Count how many existing transactions a categorization rule would match, without writing anything, and list the live rules it collides with: a duplicate, a rule that shadows it or that it would shadow, an overlap booking a different account, or a redundant rule booking the same one — each with how many of the last twelve months' transactions both match and how many this rule would take from the other. Use this to check a rule before creating or applying it. The rule does not have to exist yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
conflictsNo
splitPreviewNo
matchingCountNo
ruleHeldCountNo
closedMonthCountNo
personBookedCountNo
sampleTransactionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed29 schema fields changed
    • addedInput schema / properties / rule / properties / actionType
      Added value: +{
      +  "enum": [
      +    "RULE_ACTION_TYPE_UNSPECIFIED",
      +    "RULE_ACTION_TYPE_BOOK",
      +    "RULE_ACTION_TYPE_EXCLUDE",
      +    "RULE_ACTION_TYPE_SPLIT"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / actions
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "fieldCode": {
      +        "maxLength": 100,
      +        "minLength": 1,
      +        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
      +        "type": "string"
      +      },
      +      "optionPath": {
      +        "maxLength": 255,
      +        "minLength": 1,
      +        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*(/[a-z0-9]+(-[a-z0-9]+)*)*$",
      +        "type": "string"
      +      },
      +      "target": {
      +        "enum": [
      +          "RULE_ACTION_TARGET_COUNTERPARTY",
      +          "RULE_ACTION_TARGET_TRANSACTION"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
    • addedInput schema / properties / rule / properties / appliedCount
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / rule / properties / appliedThisMonth
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / rule / properties / approvedAt
      Added value: +{
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / approvedBy
      Added value: +{
      +  "description": "UUID value wrapper.",
      +  "properties": {
      +    "value": {
      +      "format": "uuid",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / rule / properties / autoPostConsentedAt
      Added value: +{
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / autoPostMaxAmount
      Added value: +{
      +  "maxLength": 30,
      +  "pattern": "^([0-9]+(\\.[0-9]{1,4})?)?$",
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / cleanBookingsInWindow
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / rule / properties / conditions
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "amountMax": {
      +        "maxLength": 30,
      +        "pattern": "^([0-9]+(\\.[0-9]{1,4})?)?$",
      +        "type": "string"
      +      },
      +      "amountMin": {
      +        "maxLength": 30,
      +        "pattern": "^([0-9]+(\\.[0-9]{1,4})?)?$",
      +        "type": "string"
      +      },
      +      "group": {
      +        "maximum": 19,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "kind": {
      +        "enum": [
      +          "RULE_CONDITION_KIND_COUNTERPARTY",
      +          "RULE_CONDITION_KIND_NAME_CONTAINS",
      +          "RULE_CONDITION_KIND_DESCRIPTOR_REGEX",
      +          "RULE_CONDITION_KIND_MERCHANT_REGEX",
      +          "RULE_CONDITION_KIND_MCC",
      +          "RULE_CONDITION_KIND_PROVIDER",
      +          "RULE_CONDITION_KIND_ACCOUNT_ID",
      +          "RULE_CONDITION_KIND_CURRENCY",
      +          "RULE_CONDITION_KIND_AMOUNT_RANGE",
      +          "RULE_CONDITION_KIND_DIRECTION",
      +          "RULE_CONDITION_KIND_CARD",
      +          "RULE_CONDITION_KIND_TEAM_MEMBER",
      +          "RULE_CONDITION_KIND_CATEGORY",
      +          "RULE_CONDITION_KIND_ALL"
      +        ],
      +        "type": "string"
      +      },
      +      "negate": {
      +        "type": "boolean"
      +      },
      +      "reviewStatus": {
      +        "enum": [
      +          "RULE_CONDITION_REVIEW_STATUS_UNSPECIFIED",
      +          "RULE_CONDITION_REVIEW_STATUS_APPROVED",
      +          "RULE_CONDITION_REVIEW_STATUS_IN_REVIEW"
      +        ],
      +        "type": "string"
      +      },
      +      "textValue": {
      +        "maxLength": 500,
      +        "type": "string"
      +      },
      +      "uuidValue": {
      +        "maxLength": 36,
      +        "pattern": "^([0-9a-fA-F-]{36})?$",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "maxItems": 100,
      +  "type": "array"
      +}
    • addedInput schema / properties / rule / properties / correctionCount
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / rule / properties / dead
      Added value: +{
      +  "type": "boolean"
      +}
    • removedInput schema / properties / rule / properties / glAccountPath / minLength
      Removed value: -1
    • changedInput schema / properties / rule / properties / glAccountPath / pattern
      Previous value: -"^[a-z0-9]+(-[a-z0-9]+)*(/[a-z0-9]+(-[a-z0-9]+)*)*$"New value: +"^([a-z0-9]+(-[a-z0-9]+)*(/[a-z0-9]+(-[a-z0-9]+)*)*)?$"
    • addedInput schema / properties / rule / properties / lastAppliedAt
      Added value: +{
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / origin
      Added value: +{
      +  "enum": [
      +    "RULE_ORIGIN_UNSPECIFIED",
      +    "RULE_ORIGIN_USER",
      +    "RULE_ORIGIN_AI",
      +    "RULE_ORIGIN_PLATFORM",
      +    "RULE_ORIGIN_HABIT"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / posting
      Added value: +{
      +  "enum": [
      +    "RULE_POSTING_UNSPECIFIED",
      +    "RULE_POSTING_REVIEW",
      +    "RULE_POSTING_AUTO_POST"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / proposalId
      Added value: +{
      +  "description": "UUID value wrapper.",
      +  "properties": {
      +    "value": {
      +      "format": "uuid",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / rule / properties / ruleCode
      Added value: +{
      +  "maxLength": 255,
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / splitLines
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "glAccountPath": {
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "pattern": "^[a-z0-9]+(-[a-z0-9]+)*(/[a-z0-9]+(-[a-z0-9]+)*)*$",
      +        "type": "string"
      +      },
      +      "isRemainder": {
      +        "type": "boolean"
      +      },
      +      "position": {
      +        "type": "integer"
      +      },
      +      "splitAmount": {
      +        "maxLength": 30,
      +        "pattern": "^([0-9]+(\\.[0-9]{1,4})?)?$",
      +        "type": "string"
      +      },
      +      "splitPercent": {
      +        "maxLength": 12,
      +        "pattern": "^([0-9]+(\\.[0-9]{1,4})?)?$",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / properties / rule / properties / status
      Added value: +{
      +  "enum": [
      +    "RULE_STATUS_UNSPECIFIED",
      +    "RULE_STATUS_DRAFT",
      +    "RULE_STATUS_ACTIVE",
      +    "RULE_STATUS_PAUSED",
      +    "RULE_STATUS_SUPERSEDED",
      +    "RULE_STATUS_REJECTED"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / rule / properties / trackRecordWindow
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / rule / properties / version
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / closedMonthCount
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / conflicts
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "kind": {
      +        "enum": [
      +          "RULE_CONFLICT_KIND_UNSPECIFIED",
      +          "RULE_CONFLICT_KIND_DUPLICATE",
      +          "RULE_CONFLICT_KIND_SHADOWED",
      +          "RULE_CONFLICT_KIND_OVERLAP",
      +          "RULE_CONFLICT_KIND_REDUNDANT",
      +          "RULE_CONFLICT_KIND_CATCH_ALL"
      +        ],
      +        "type": "string"
      +      },
      +      "overlapCount": {
      +        "type": "integer"
      +      },
      +      "previewedRuleFirst": {
      +        "type": "boolean"
      +      },
      +      "ruleCode": {
      +        "type": "string"
      +      },
      +      "ruleId": {
      +        "anyOf": [
      +          {
      +            "description": "UUID value wrapper.",
      +            "properties": {
      +              "value": {
      +                "format": "uuid",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "ruleName": {
      +        "anyOf": [
      +          {
      +            "description": "Human-readable name (1-255 Unicode chars).",
      +            "properties": {
      +              "value": {
      +                "maxLength": 255,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "takenCount": {
      +        "type": "integer"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / personBookedCount
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / ruleHeldCount
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / sampleTransactions
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "amount": {
      +        "type": "string"
      +      },
      +      "currencyCode": {
      +        "type": "string"
      +      },
      +      "date": {
      +        "type": "string"
      +      },
      +      "descriptorText": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "anyOf": [
      +          {
      +            "description": "UUID value wrapper.",
      +            "properties": {
      +              "value": {
      +                "format": "uuid",
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / splitPreview
      Added value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "exampleAmount": {
      +          "type": "string"
      +        },
      +        "exampleTransactionId": {
      +          "anyOf": [
      +            {
      +              "description": "UUID value wrapper.",
      +              "properties": {
      +                "value": {
      +                  "format": "uuid",
      +                  "type": "string"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "lines": {
      +          "items": {
      +            "properties": {
      +              "exampleAmount": {
      +                "type": "string"
      +              },
      +              "glAccountPath": {
      +                "type": "string"
      +              },
      +              "isRemainder": {
      +                "type": "boolean"
      +              },
      +              "splitAmount": {
      +                "type": "string"
      +              },
      +              "splitPercent": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  2. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.