Repository navigation
rust(feat): make the MCP update, archive and unarchive tools bulk - #885
Merged
Merged
Conversation
…pport-to-the-remaining-single-item # Conflicts: # rust/crates/sift_cli/CHANGELOG.md # rust/crates/sift_mcp/src/tool/common/mod.rs
liam-sift
marked this pull request as ready for review
November 13, 2026 00:43
bill-sift
approved these changes
Nov 14, 2026
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.
Description
What changes for callers (breaking)
channels, user-defined functions, reports and report templates now take an
itemsarray of 1 to100 objects, the same as the create tools. The old flat parameters are rejected. Pass a
one-element list for a single resource.
successes,failures,not_attemptedandnot_selected.next_step; the call-levelnext_stepcovers the batch.An item has a
warningonly when it needs attention, such as a calculated channel that will notevaluate on some assets.
create_artifactandupdate_artifactitems keep a one-linenext_step, because the Sift chat host finds artifacts by matchingCreated artifact <id>.update_annotationkeeps its input shape and gainsselected_indicesoverannotation_ids.Its result moves to the same per-item body, with a compact
annotation_id,name,state,is_archivedandurlper success, sobatch_archive_errorandarchive_skippedare gone. Under an approval host (sift-cli mcp --chat) it takes at most 100 ids per call.Where to look
tool/common/bulk.rsholds item parsing, the selection mask, the stop rule and the result bodyfor every bulk write. Most tools call
self.bulk_write(op, params, resource, validate, target, write)and supply only the per-item validation and write.create_artifact,create_report,update_artifactandupdate_reportusebulk_write_partial, because one item takes severalRPCs and a failure can follow a committed change.
Op.require_non_emptyandexactly_oneintool/commonreplace the repeated id and one-of checks.selected_indicesanditemsbounds text; theBulkItemsschema documents them.report per-item results.
others. Auth, availability and rate-limit errors stop the remaining items.
archive_ruleandunarchive_rulenow read the rule first. A missing rule used to reportsuccess; it is now a per-item not found.
Verification
cargo test -p sift_mcp: 732 passed.cargo test -p sift_cli: 280 passed.cargo clippy -p sift_mcp --all-targets --all-featuresandcargo fmt --check: clean.e60aacb:
update_annotationover 10 ids with 1 deselected: 9 updated, 1 untouched.