Skip to main content
Glama
rshade
by rshade

ensure_newline

Ensure files end with POSIX-compliant newline characters. Supports check, fix, and validate modes for development or CI/CD.

Instructions

Validate and fix POSIX newline compliance. Checks if files end with proper newline characters. Modes: check (report only), fix (auto-correct), validate (error if non-compliant for CI/CD).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory (defaults to project root)
modeYescheck=report only, fix=auto-correct, validate=error if non-compliant
excludeNoPatterns to exclude (e.g., ['node_modules/**', '*.min.js'])
patternsYesGlob patterns for files to check (e.g., ['src/**/*.ts', '*.md'])
fileTypesNoFile types to process (e.g., ['*.ts', '*.go', '*.md'])
skipBinaryNoSkip binary files automatically (default: true)
maxFileSizeMBNoMaximum file size to process in MB (default: 10)
Behavior4/5

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

The description discloses the three modes (check, fix, validate) and their behaviors (report only, auto-correct, error if non-compliant). It does not, however, mention details about handling binary files or max file size, nor does it state whether the fix mode is destructive or reversible. Overall, it covers the key behaviors sufficiently for a compliance tool.

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?

The description is extremely concise: two sentences that front-load the purpose and explain key modes. Every sentence adds value without redundancy. It is well-structured for quick comprehension.

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

Completeness3/5

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

With 7 parameters and no output schema, the description is somewhat minimal. It explains the purpose and modes but does not tie the parameters together (e.g., how `patterns` and `exclude` work). The schema covers details, but the description could be more complete by briefly mentioning that parameters refine file selection and processing.

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

Parameters3/5

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

All 7 parameters are described in the input schema (100% coverage), so the baseline is 3. The description only mentions modes but does not add new meaning beyond the schema. It does not explain how parameters like `exclude`, `skipBinary`, or `maxFileSizeMB` affect the tool's operation, but this is acceptable given schema completeness.

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?

The description clearly states the tool's purpose: 'Validate and fix POSIX newline compliance' and explains what it does (checks if files end with proper newline characters). It lists three modes, making the functionality specific and distinct from any sibling tools, none of which appear related to newline compliance.

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

Usage Guidelines4/5

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

The description implicitly indicates when to use the tool (when POSIX newline compliance is needed) but does not explicitly mention when not to use it or suggest alternatives. Given the uniqueness of the tool among siblings, the guidance is adequate but could include more context like 'Use this before committing to ensure POSIX compliance'.

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

Install Server

Other Tools

Latest Blog Posts

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/rshade/mcp-devtools-server'

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