mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
## Why The paginated memories MCP `search` tool still returned only the matching line text, which made it harder for clients to present useful search results or decide whether they needed to follow up with a separate `read` call. Adding a small amount of surrounding context makes individual hits much more usable while keeping the search response deterministic and line-addressable. ## What changed - add an optional `context_lines` search argument and thread it through the MCP server into the local memories backend - change search matches to return the matched `line_number` plus a `start_line_number` and multi-line `content` block for the requested context window - update the search tool schema and description to document the new request/response shape - extend the local backend tests to cover zero-context matches, contextual results, pagination, and invalid cursors that point past the end of the result set ## Testing - Added targeted unit coverage in `memories/mcp/src/local_tests.rs` - GitHub Actions are running for the branch --------- Co-authored-by: Codex <noreply@openai.com>