categorize_by_memo
Categorizes rows in NetSuite GL exports by scanning memo columns for keyword matches; rows without a match fall into 'Uncategorized'.
Instructions
Tag every row with a derived _category based on case-insensitive substring matches across one or more memo columns. NetSuite GL exports usually carry both 'Memo (main)' and 'Memo (line)'; pass both so the keyword sweep covers all the prose. rules maps category name to a list of keywords; the first rule whose keyword appears in any memo wins; rows matching nothing fall into 'Uncategorized'. Returns the tagged rows plus a per-category count breakdown.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"memo_columns": "<memo_columns>",
"rules": "<rules>"
},
"name": "categorize_by_memo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| memo_columns | Yes | ||
| rules | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| breakdown | Yes |