gws 0.6.0: drafts.create rejects valid --params with 'expected a map'; works in 0.15.0+
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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.
- Langage dominant
- Rust
- Étoiles
- 32.3k
- Forks
- 2k
- Merge moyen
- 16 h 3 min
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de googleworkspace/cli
-
`gws auth login` keeps the old token cache, so API calls use a token from the previous grantOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
googleworkspace/cli#984 ·
Les mainteneurs répondent en général sous 1 jour
-
auth export masks secrets by default with no warning; consumers fail later with invalid_clientOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
googleworkspace/cli#983 ·
Les mainteneurs répondent en général sous 1 jour
-
Replace gemini with agyOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
googleworkspace/cli#958 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
googleworkspace/cli#921 ·
Les mainteneurs répondent en général sous 1 jour
-
Add cli to awesome-ai-plugins?Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
googleworkspace/cli#920 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de googleworkspace/cli
Issues similaires
-
benchmark-review
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
Les mainteneurs répondent en général sous 1 jour
-
area:filesystem bug need-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Captions panel does not offer to show an existing transcriptPeut-être pris @thedavidweng l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
CapSoftware/Cap#4276 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
libracoder/kiri#364 ·
Les mainteneurs répondent en général sous 1 jour