Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLI
AssigneesNone

Relationships

#584 model method run: cannot pass arrays, numbers, or booleans via --input

Opened by stack72 · 6/7/2026

swamp model method run --input key=value stringifies every value, so methods whose Zod schema declares keywords: z.array(z.string()), limit: z.number(), etc. cannot be invoked from the CLI.

Repro on swamp 20260606.235053.0-sha.d4ff2b04:

swamp model method run wheelshop search \
  --input intent="parse cron" \
  --input keywords='["timezone","node"]'
# {"error":"Method arguments validation failed: Invalid input: expected array, received string at \"keywords\""}

The JSON-array literal arrives as the raw string ["timezone","node"] and fails Zod array validation. Same issue for numbers (limit=5 arrives as "5") and booleans — anything not declared as z.string().

Requested: a way to pass non-string values. Two shapes from prior art:

  • HTTPie-style suffix: --input keywords:='["a","b"]':= means "parse RHS as JSON"
  • Dedicated flag: --input-json keywords='["a","b"]'

Either parses the RHS as JSON before forwarding to the model. --input key=value continues to behave as today (string).

Current workaround: model authors add a Zod preprocess that accepts a comma-separated string and splits it, but this leaks CLI concerns into every model schema. There's no clean workaround when the input is a number or boolean field.

Co-authored-by: Claude noreply@anthropic.com


Automoved by swampadmin from https://github.com/swamp-club/swamp/issues/1523

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

6/7/2026, 3:24:10 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.