Add MCP read parity file view#148
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the MCP get_file tool to return a schema-versioned, line-numbered file view with offset/limit pagination, while optionally attaching direct graph context (importers/imports/symbols) for indexed files. It also updates MCP documentation/skill guidance and adds tests covering the new response shape.
Changes:
- Extend
get_filetool schema withoffset/limit(line pagination) andincludeGraphContext, plus new default/max line limits. - Implement a schema-versioned
get_fileresponse that includescontentinnumber<TAB>lineformat, pagination metadata, and optional graph context. - Update docs/skill guidance and reformat generated coverage markdown; add/adjust tests for the new
get_filebehavior.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/mcp-server.test.ts | Adds/updates tests for line-numbered get_file output, pagination, and optional graph context. |
| src/mcp/tools.ts | Extends the MCP tool schema for get_file and introduces file-line bounds constants. |
| src/mcp/server.ts | Implements line pagination/formatting and optional graph context in the get_file handler and response type. |
| docs/mcp.md | Documents the new get_file behavior, output format, and bounding controls. |
| docs/coverage/native.md | Coverage markdown table formatting update (generated output). |
| docs/coverage/js.md | Coverage markdown table formatting update (generated output). |
| codegraph-skill/codegraph/SKILL.md | Updates skill guidance to include get_file usage and its output format/context fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
Previous Review Summary (commit 98f27bd)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 98f27bd)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (7 files)
Reviewed by kimi-k2.6 · Input: 265.1K · Output: 8.7K · Cached: 284.6K |
98f27bd to
ecb0ca1
Compare
Summary
get_fileto return schema-versioned, line-numbered file views withoffset/limitpagination.number<TAB>lineformat and MCP usage guidance.Verification
rtk npx vitest run tests/mcp-server.test.tsrtk npm run buildrtk npm run check