Skip to main content
Glama

manage_line_endings

DestructiveIdempotent

Detect inconsistent line endings or convert a file to LF/CRLF while preserving encoding and BOM. Use detect to find mismatched lines, convert to rewrite the file.

Instructions

Detect or fix line endings. action="detect" reports the dominant style (crlf/lf/mixed/none), total lines, and the line numbers that disagree — use it when a file looks inconsistent. action="convert" rewrites the file to style, per code unit for UTF-16/32 and preserving its BOM; no-op if the file already matches. Parameters: path, action ("detect"|"convert"), style ("lf"|"crlf", required for convert), encoding (auto-detected, including most BOM-less UTF-16 — pass utf-16-le/utf-16-be if a very short or unusual file is misread). Example: {"path": "D:\src\unit1.pas", "action": "convert", "style": "crlf"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
styleNo
actionYes
encodingNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
styleYes
changedNo
messageNo
totalLinesNo
linesChangedNo
originalStyleNo
inconsistentLinesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true and non-readonly, and the description is consistent, adding real context: convert rewrites the file preserving the BOM, is a no-op on matching files, and handles UTF-16/32 per code unit. The encoding auto-detection caveat for short/unusual files is a valuable behavioral disclosure 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.

Conciseness4/5

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

Front-loaded with purpose, then mode behavior, then parameters and an example. It is dense but each sentence adds information; the parameter recap is slightly redundant with the schema but compensates for the missing schema descriptions.

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 four-parameter, destructive, idempotent file-mutation tool with an output schema present, the description covers modes, side effects, encoding caveats, enums, and required parameters. Nothing an agent needs to invoke it correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: it documents all four parameters, gives the allowed values for action and style, marks style as required for convert, and explains encoding auto-detection with fallback values. The worked example further anchors the parameter usage.

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 verb pair and resource: 'Detect or fix line endings', then names the two modes explicitly. This clearly distinguishes it from siblings like manage_bom and convert_encoding without needing to open any schema.

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?

Gives an explicit trigger for detect ('use it when a file looks inconsistent') and explains convert semantics. It does not name alternative siblings (e.g. convert_encoding) or state when-not-to-use, so it stops short of full 5.

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