memos/server/router
johnnyjoygh 652957c0f9 fix(mcp): expose standard JSON Schema formats in tool schemas
The gnostic OpenAPI generator hardcodes `format: enum`, `format: bytes`,
and `format: field-mask` on string properties. These are OpenAPI-only
markers; MCP clients treat tool schemas as JSON Schema 2020-12 and warn
or fail on them (zod-based parsers log "unknown format" for every tool
on every load, ajv strict mode rejects the definitions).

Normalize schemas as they leave the resolver and when parameter schemas
are cloned: drop `format: enum` (the `enum` keyword is already present),
rewrite `format: bytes` to `contentEncoding: base64`, and drop
`format: field-mask`. The generated openapi.yaml is unchanged.

A catalog test now walks every curated tool's input and output schema
and fails on any format outside the registered allowlist.

Fixes #6262
2026-09-03 21:53:03 +08:00
..
api/v1 fix(attachment): detect heic/heif mime type from filename extension (#6246) 2026-08-30 09:09:53 +08:00
fileserver feat(spaces): add multi-space memo collaboration (#6228) 2026-08-23 19:36:50 +08:00
frontend refactor(server): remove RSS feed support (#6243) 2026-08-28 23:06:25 +08:00
mcp fix(mcp): expose standard JSON Schema formats in tool schemas 2026-09-03 21:53:03 +08:00