head_file
Extract the first N lines from a text file to quickly preview content. Specify file path, line count, and encoding for efficient file analysis using MCP Filesystem Server.
Instructions
Read the first N lines of a text file.
Args:
path: Path to the file
lines: Number of lines to read (default: 10)
encoding: Text encoding (default: utf-8)
ctx: MCP context
Returns:
First N lines of the file
Input Schema
Name | Required | Description | Default |
---|---|---|---|
encoding | No | utf-8 | |
lines | No | ||
path | Yes |
Input Schema (JSON Schema)
{
"properties": {
"encoding": {
"default": "utf-8",
"title": "Encoding",
"type": "string"
},
"lines": {
"default": 10,
"title": "Lines",
"type": "integer"
},
"path": {
"title": "Path",
"type": "string"
}
},
"required": [
"path"
],
"title": "head_fileArguments",
"type": "object"
}