fix(mcp): pause/resume tools use PATCH /v1/cues/{id}#1
Merged
Conversation
The `cueapi_pause_cue` and `cueapi_resume_cue` tools previously called
`POST /v1/cues/{id}/pause` and `/resume` respectively. Those endpoints
do not exist on the CueAPI server — calls returned runtime 404s.
Status is mutated via `PATCH /v1/cues/{id}` with body `{status: "..."}`,
matching the CLI's behavior (cueapi-cli/cueapi/cli.py:290-314). The
allowed status values come from the Cue model's CHECK constraint
(cueapi-core/app/models/cue.py:35):
status IN ('active', 'paused', 'completed', 'failed')
Changes:
- src/tools.ts: pause handler now PATCHes with {status: "paused"};
resume handler PATCHes with {status: "active"}.
- tests/tools.test.ts: added 3 behavioral tests that stub the client
and pin the HTTP contract (method, path, body). The original test
suite was surface-only (tool count, names, schemas) and did not
exercise handlers, which is how the bug shipped. 9/9 tests pass.
- package.json: 0.1.2 → 0.1.3.
- README.md: changelog section with entries for 0.1.0, 0.1.2, 0.1.3.
No client.ts changes required — the existing generic `request(method,
path, body?, query?)` method supports PATCH without modification.
No changes to the Zod input schema.
Do NOT publish to npm until this PR is reviewed.
govindkavaturi-art
pushed a commit
that referenced
this pull request
Apr 17, 2026
Actually releases the PR #1 pause/resume PATCH fix to npm. 0.1.3 was published prematurely with this note but without the merged code — the fix landed in PR #1 (merged 2026-04-17, commit de4c6f7). 0.1.4 is the release that actually contains it. Changelog updated to reflect this honestly: 0.1.3 entry is now marked as superseded; 0.1.4 carries the full fix description. No code changes. Build + tests still green (9/9). 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.
Root cause
The `cueapi_pause_cue` and `cueapi_resume_cue` tools call endpoints that don't exist on the CueAPI server:
CueAPI doesn't expose dedicated pause/resume routes. Status is mutated via `PATCH /v1/cues/{id}` with `{"status": "..."}`. The CLI has been doing this correctly all along — see `cueapi-cli/cueapi/cli.py:290-314`.
Allowed status values from the Cue model's CHECK constraint (`cueapi-core/app/models/cue.py:35`):
```python
status IN ('active', 'paused', 'completed', 'failed')
```
Changes
No changes to `src/client.ts` — its generic `request(method, path, body?, query?)` method already supports PATCH.
Test plan
```
$ npm test
✓ tests/tools.test.ts (9 tests) 2ms
Test Files 1 passed (1)
Tests 9 passed (9)
$ npm run build
tsc — clean compile
```
All 9 tests pass (6 existing + 3 new behavioral). TypeScript compiles cleanly.
How this bug was found
Surfaced during a read-only architecture audit for an external prospect evaluating Cue for a multi-agent setup. Comparing the MCP server's tool implementations against the CLI's `pause`/`resume` commands revealed the mismatch. No customer reports yet — the pause/resume tools were likely rarely invoked from MCP hosts.
Not doing in this PR
Test plan checklist