Conversation
Working down a review queue had no good option. mark_transaction_reviewed handles one transaction, and bulk_categorize_transactions can clear the flag but requires a category and rewrites it on every transaction, so using it to mark things reviewed risks flattening categorization worth keeping. Both fan out to one request per transaction, which does not scale to a queue of thousands. Monarch has a real bulk endpoint. The web client calls Common_BulkUpdateTransactionsMutation when you select transactions and change Review status, so a whole queue costs one round trip. The client library does not wrap it, but it exposes gql_call, so no fork of the library is needed. The mutation and the lowercase reviewStatus enum (needs_review / reviewed) were read out of the deployed web bundle, then confirmed against the live API in both directions on three transactions. allSelected is hardcoded False. Set True, Monarch updates everything matching filters rather than the listed ids, which is the difference between marking three transactions and marking an entire account; a test pins it. Monarch refuses a write inside an HTTP 200, and this mutation can report success: false with a null errors object, so the payload success flag is checked explicitly rather than inferring it from the absence of errors.
This was referenced Sep 16, 2026
Author
|
Closing in favor of #151, which generalizes the same endpoint. Both PRs defined
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
mark_transaction_reviewedhandles one transaction at a time.bulk_categorize_transactionscan clear the flag, but it requires a category and rewrites it on every transaction, so reaching for it just to mark things reviewed risks flattening categorization worth keeping.Both fan out to one request per transaction. On a real account that meant about 8,000 mutations.
What
Monarch has a bulk endpoint. The web client calls
Common_BulkUpdateTransactionsMutationwhen you select transactions and change Review status, so a whole queue costs one round trip.monarchmoneycommunity==1.5.2does not wrap it, and none of its 23 mutations is a bulk transaction update. It does exposegql_call, so the library needs no fork.Where the shape came from
Monarch disables introspection for non-admin users and masks GraphQL validation errors, so probing field names tells you nothing. The mutation document and the lowercase
reviewStatusenum (needs_review/reviewed) came out of the deployed web bundle. Both directions then ran against the live API on three transactions:Safety
The tool hardcodes
allSelectedtoFalse. Set itTrueand Monarch updates everything matchingfiltersinstead of the listed ids, which is the difference between marking three transactions and marking an entire account. A test pins it.The tool sends
expectedAffectedTransactionCountas the id count, and reports back Monarch'saffectedCountrather than the number requested.Monarch refuses a write inside an HTTP 200, and this mutation can return
success: falsewith a nullerrorsobject. So the tool checks the payloadsuccessflag on its own rather than inferring it from absent errors.read_only.MUTATING_TOOLSlists the tool, soMONARCH_MCP_READ_ONLYhides it.