Skip to main content
Glama

MCP Filesystem Server

MIT License
42
  • Apple
  • Linux

head_file

Retrieve the first N lines of a text file from a specified path. Define the number of lines and encoding for efficient file previews in the 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

NameRequiredDescriptionDefault
encodingNoutf-8
linesNo
pathYes

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" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/safurrier/mcp-filesystem'

If you have feedback or need assistance with the MCP directory API, please join our Discord server