Originally created by: kumaakh
Originally owned by: joiskash
update_member schema has cloud_activity_command: z.string().min(1) but the description says "pass empty string to clear." The .min(1) validator rejects empty strings at the Zod level, so the documented clearing path is unreachable.
The code at update-member.ts:84 (input.cloud_activity_command || undefined) would handle empty string correctly if it could get past validation, but it never will.
"" = valid JSON, MCP transports it faithfully (JSON-RPC), Zod would see it.min(1) would let "" through → code converts to undefined → field clearedOpen question: is empty string the right UX for "clear"? Alternatives:
.min(1) and let "" mean "clear" (simplest, code already handles it)cloud_activity_command_clear: boolean field (explicit but more complex)Remove .min(1). The code path already handles "" → undefined. One character deleted, no behavior change needed downstream.
User-facing but edge case — most users set the command once and don't clear it.
Code review Round 3, finding [#1]. File: src/tools/update-member.ts:31
Originally posted by: kumaakh
Fixed in main: PR [#166] (commit ca30df) removed the .min(1) validator from cloud_activity_command in src/tools/update-member.ts. An empty string now passes Zod validation and the existing input.cloud_activity_command || undefined logic converts it to undefined, clearing the field as originally documented.
Related
Tickets:
#166Ticket changed by: kumaakh