read_file_section
Extracts specific line ranges from a file in local repositories, enabling targeted code analysis without manual uploads. Supports file path, start and end lines, and optional line number display.
Instructions
读取文件的指定行范围
Input Schema
Name | Required | Description | Default |
---|---|---|---|
endLine | Yes | 结束行号(包含) | |
filePath | Yes | 带前缀的完整文件路径, e.g., '[backend/src]/main.ts' | |
showLineNumbers | No | 是否显示行号 | |
startLine | Yes | 起始行号(从1开始) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"endLine": {
"description": "结束行号(包含)",
"type": "number"
},
"filePath": {
"description": "带前缀的完整文件路径, e.g., '[backend/src]/main.ts'",
"type": "string"
},
"showLineNumbers": {
"default": true,
"description": "是否显示行号",
"type": "boolean"
},
"startLine": {
"description": "起始行号(从1开始)",
"type": "number"
}
},
"required": [
"filePath",
"startLine",
"endLine"
],
"type": "object"
}