mirror of
https://github.com/openai/codex.git
synced 2026-09-07 15:40:00 +00:00
## Why The memories MCP server currently keeps handwritten JSON Schema beside the Rust types that actually serialize and deserialize the tool payloads: [`schema.rs`](2f5c06a29c/codex-rs/memories/mcp/src/schema.rs (L4-L133)), [`server.rs`](2f5c06a29c/codex-rs/memories/mcp/src/server.rs (L44-L75)), and [`backend.rs`](2f5c06a29c/codex-rs/memories/mcp/src/backend.rs (L41-L117)). That duplicates the tool contract and makes schema drift easier as the API evolves. ## What changed - derive `JsonSchema` for the memories tool arguments, responses, and nested response types - replace the handwritten schema builders with shared `schemars` generation - preserve the existing wire shape while generating schemas, including nullable output `Option` fields and non-nullable optional input fields - wire the `list`, `read`, and `search` tools to the generated schemas ## Verification - CI pending
334 KiB
334 KiB