Skip to main content
Glama
isina-nej
by isina-nej

File head

head_file
Read-only

Read the first N lines from a file to preview its beginning. Use this to quickly inspect file content without loading the entire file.

Instructions

Return the first N lines of a file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, so the read-only nature is already covered. The description adds no further behavioral details (e.g., error handling, size limits, encoding). Given the simplicity of the operation, this is adequate but adds nothing beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence with zero redundancy. It states the action and the target directly, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read operation with an output schema and readOnlyHint annotation, the description is complete. It covers the core functionality without needing to explain return values (handled by output schema) or safety (handled by annotation). No additional information is required for an agent to call this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must carry semantic meaning for parameters. It does: 'first N lines' directly maps to the lines parameter and 'file' maps to path, providing clear meaning. However, it does not mention the default value or that lines is optional, but these are present in the schema structure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific operation (Return) on a specific resource (first N lines of a file), which clearly distinguishes it from tail_file (last lines) and read_file (full file). The verb and object are explicit and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit mention of alternatives or when to use this tool versus tail_file or read_file. The usage is implied by the purpose ('first N lines' indicates a need for the beginning of a file), but there is no direct guidance or exclusionary language.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools