Files
shockbot/mcp
Colin McDonnell 6533ffddae intercept arktype's standard-schema jsonSchema.input for Gemini sanitizer
The previous sanitizer proxied `schema.toJsonSchema()`, but fastmcp 3.x uses
`xsschema.toJsonSchema()` which reads `schema["~standard"].jsonSchema.input(...)`
directly when the StandardJSONSchemaV1 extension is present (arktype 2.x).
Our proxy was never invoked, so the sanitizer was a silent no-op.

Proxy the entire `~standard` → `jsonSchema` → `input` chain so the transform
runs regardless of which path xsschema picks. Also add case 1 (add `type:"string"`
to enum-only schemas) — arktype 2.x emits `{enum:["A","B"]}` without a type
field, which is the exact form Gemini rejects with
"only allowed for STRING type".

Verified locally: wrapped schema now emits `{type:"string", enum:[...]}` and
drops `$schema`; validation still works.
2026-04-16 23:18:05 +00:00
..
2025-11-21 14:08:36 -05:00
2026-01-23 06:28:22 +00:00
2026-01-16 18:43:09 +00:00
2026-01-16 18:43:09 +00:00
2026-01-16 18:43:09 +00:00
2026-03-12 05:22:51 +00:00
2026-03-12 05:22:51 +00:00