gws 0.6.0: drafts.create rejects valid --params with 'expected a map'; works in 0.15.0+
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by comparing the parameter handling for gmail users drafts create between @googleworkspace/cli 0.6.0 and 0.15.0, using the reproduction commands in the issue. Check whether the behavior is already fixed in the newer release; done means documenting the fix or deciding whether a backport or upgrade-only resolution is appropriate.
Written by the indexing model from the issue text.
Description
Bug Description
In gws 0.6.0, calling gmail users drafts create via the MCP server (or CLI) rejects any --params JSON shape with:
Invalid --params JSON: invalid type: string "{\"userId\":\"me\"}", expected a map at line 1 column 21
The identical params shape works fine for other Gmail endpoints in the same version — messages.list, messages.get, threads.get all accept --params '{"userId":"me", ...}' without issue. Only drafts.create rejects it.
When the call comes from an MCP wrapper (Claude Code's tool-use bridge), the error also surfaces as Request body failed schema validation: $: Expected object when --params is omitted entirely, suggesting the params parser is required and is parsing the value as a string instead of deserializing it as a map.
Repro
npm install -g @googleworkspace/[email protected]
gws gmail users drafts create --params '{"userId":"me"}' --json '{"message":{"raw":"<base64url-mime>"}}'
# → Invalid --params JSON: invalid type: string ..., expected a map
Same params shape works fine on other endpoints:
gws gmail users messages list --params '{"userId":"me","q":"in:inbox","maxResults":5}'
# → works
Status in newer versions
Verified on @googleworkspace/[email protected] (the highest version that still runs on Ubuntu 22.04 / GLIBC 2.35 — 0.22.x requires GLIBC 2.39): the same call passes --params deserialization and progresses to the auth layer (where it then fails because 0.15.0 cannot read 0.6.0's encrypted token cache, an unrelated migration concern).
So the bug is fixed somewhere between 0.6.0 and 0.15.0. This issue is mostly a paper trail / upgrade prompt for anyone still pinned to 0.6.0.
Environment
@googleworkspace/[email protected](installed vianpm install -g)- Ubuntu 22.04 / GLIBC 2.35 / Node v20.19.5
- Used as the MCP server in Claude Code (
gws mcp -s drive,gmail,calendar)
Suggested resolution
If 0.6.0 is no longer supported: close as "upgrade to >= 0.15.0". Otherwise a backport could be considered, though the GLIBC requirement bump in newer versions (0.16+ → GLIBC 2.39) is a separate migration blocker for users on older distros.
— Filed via Claude Code during a paralegal-onboarding outreach session where the drafts_create MCP tool was the last remaining manual step in an otherwise automated pipeline.
- Dominant language
- Rust
- Stars
- 32.3k
- Forks
- 2k
- Avg merge
- 16h 3m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleworkspace/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
googleworkspace/cli#984 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
googleworkspace/cli#983 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
googleworkspace/cli#958 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleworkspace/cli#921 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
googleworkspace/cli#920 ·
Maintainers usually reply within 1 day
All issues in googleworkspace/cli
Similar issues
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
status: new topic: ga4gh-sdk type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
comp-rbac
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ClickHouse/ClickHouse#131875 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug(python): read_transaction raises TypeError on a Rewrite with rewritten indicesPossibly taken @Borg93 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
lance-format/lance#11117 ·
Maintainers usually reply within 2 days