Skip to main content
Glama

detect_line_endings

Read-only

Detect line ending style (CRLF, LF, mixed, or none) and identify inconsistent lines to diagnose cross-platform legacy code issues.

Instructions

Detect line ending style (crlf/lf/mixed/none) and find inconsistent lines. Useful for diagnosing mixed line ending issues in cross-platform legacy codebases. Returns dominant style, total lines, and line numbers with minority endings. Parameters: path (required), encoding (optional, auto-detected including most BOM-less UTF-16 text — pass utf-16-le or utf-16-be if a very short or unusual file is misread).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
encodingNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
styleYes
totalLinesYes
inconsistentLinesYes
Behavior4/5

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

Annotations declare readOnlyHint=true, consistent with a detection tool. The description adds behavioral details: returns dominant style, total lines, line numbers with minority endings, and notes encoding auto-detection with caveats. No contradictions.

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?

Two sentences: first states purpose and output, second adds context and parameter details. No redundant words, well-structured for quick understanding.

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?

Given the tool's moderate complexity and presence of an output schema (handling return values), the description fully covers purpose, usage context, parameter hints, and key behavioral aspects. No gaps.

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 description compensates. It explains path (required) and encoding (optional, auto-detected) with guidance on when to explicitly pass encoding (short or unusual files). This adds meaningful semantics beyond the schema.

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 detects line ending style (crlf/lf/mixed/none) and finds inconsistent lines. It specifies the resource (line endings in files) and the action (detect), distinguishing it from siblings like detect_encoding.

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 provides clear usage context: 'diagnosing mixed line ending issues in cross-platform legacy codebases.' It does not explicitly state when not to use or list alternatives, but the context is sufficient for a typical agent.

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/dimitar-grigorov/mcp-file-tools'

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