feat(cues): add cueapi_bulk_delete_cues tool (cueapi #650 / cli #46 parity)#32
Merged
Conversation
…arity)
Adds cueapi_bulk_delete_cues — wraps POST /v1/cues/bulk-delete (cueapi
PR #650; cli ported via PR #46). Closes (in part) Backlog row cmousydyn
(mistitled 'messages' → corrected to 'cues' by cue-pm 2026-05-09 ~20:45Z).
Surface:
- Schema: bulkDeleteCuesSchema accepts ids: array(string).min(1).max(100)
- Tool: cueapi_bulk_delete_cues with handler that POSTs to
/v1/cues/bulk-delete with body {ids: [...]} + extraHeaders
{"X-Confirm-Destructive": "true"} (server requires it).
- Returns server's flat shape: {deleted: [...], skipped: [...]}.
Schema validation is enforced at MCP boundary (Zod) before any HTTP
call — empty array rejected, > 100 rejected, exactly-100 accepted.
Tests: 4 new in tools.test.ts — registered name, empty rejection,
overflow rejection, exactly-100 boundary, handler HTTP contract pin
(method/path/body/headers). All 117 tests pass (was 113).
Parity-manifest updated: added POST /v1/cues/bulk-delete row mapping
to the new tool, between existing DELETE /v1/cues/{id} and POST
/v1/cues/{id}/fire entries.
Companion ports:
- cueapi-python PR #37 (merged 2026-05-09 20:49Z) — same row, SDK piece
- cueapi-action PR (forthcoming) — same row, action.yml piece
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Adds
cueapi_bulk_delete_cuesMCP tool. Closes (in part) Backlog rowcmousydyn— mistitled "messages" originally; corrected to "cues" by cue-pm 2026-05-09 ~20:45Z after pre-verify caught the title-vs-reality mismatch.What's added
src/tools.ts: newbulkDeleteCuesSchema(Zod) +cueapi_bulk_delete_cuestool.ids: z.array(z.string()).min(1).max(100)./v1/cues/bulk-deletewith body{ids: args.ids}+ extraHeaders{"X-Confirm-Destructive": "true"}(server requires it).tests/tools.test.ts: 4 new tests (registered name, empty rejected, overflow rejected, exactly-100 boundary, HTTP contract pin).parity-manifest.json: addedPOST /v1/cues/bulk-deletemapping to the new tool.Behavior
Per-ID atomic, NOT batch atomic — IDs that don't exist OR aren't owned by the caller land in
skipped(silent skip on miss; no info leak about other tenants' cues). Cascade FK on the server handles executions + dispatch_outbox cleanup.Stats
Test plan
npm test→ 117/117 pass (was 113; 4 new incueapi_bulk_delete_cuesdescribe block)python3 -c "import json; json.load(open('parity-manifest.json'))"validNote re: Backlog row title
Originally
cmousydynwas titled "Parity port: bulk delete messages (#650) → cueapi-python + cueapi-mcp + cueapi-action". Pre-verify caught the mismatch — PR #650 is about cues, not messages; cueapi-core has zero@router.deleteonmessages.py. PM patched the title to 'cues' and confirmed interpretation; this PR ships the cueapi-mcp piece.Related
feat(cues): bulk delete + stale-cue discovery filters)feat(cues): add bulk-delete subcommand)Closes
cmousydyn000004lgs0drkbap— this PR ships the cueapi-mcp piece. Row stays in-progress until cueapi-action also ships.🤖 Generated with Claude Code