Skip to main content
Glama

Ordenar líneas

lines-sort
Read-onlyIdempotent

Ordena líneas con intercalación por idioma (orden numérico natural opcional). Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: ordenar un arreglo de valores u objetos por una o más claves (array-sort). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Sorts lines with locale-aware collation (natural numeric order optional), ascending or descending, optionally case-insensitive and unique. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: sorting an array of values or objects by one or more keys (array-sort). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.

Input Schema

NameRequiredDescriptionDefault
textYesText with one item per line (string; required).
orderNoOrder (optional; one of: asc, desc; default "asc").asc
localeNoBCP 47 locale (string; optional; default "en"; up to 35 chars; pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$).en
uniqueNoRemove duplicates (boolean; optional; default false).
numericNoNatural numeric order (2 < 10) (boolean; optional; default true).
case_insensitiveNoIgnore case (boolean; optional; default true).

Output Schema

NameRequiredDescriptionDefault
textNo
linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "item10\nitem2\nItem1"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Adds genuine value beyond annotations: determinism, no network/stored state, and concrete operational limits (1 s per call, result up to 1 MB). However, 'read-only' restates readOnlyHint/destructiveHint, and 'input up to 64 KB' sits awkwardly against the schema's maxLength of 1048576, creating ambiguity about the actual input ceiling.

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

Conciseness3/5

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

The content is well front-loaded and labeled (When / Not for / Side effects / Limits), but it is delivered twice in full — Spanish and English — roughly doubling length without adding information. The signal-to-noise ratio is good per sentence but poor per definition size.

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?

With an output schema and full annotations already supplied, the description covers everything an agent needs: purpose, boundaries, alternatives, determinism, side effects and hard limits. Nothing material for correct invocation is missing.

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?

Schema description coverage is 100%, so every parameter (text, order, locale, unique, numeric, case_insensitive) is already documented with defaults and constraints. The description echoes the same features ('natural numeric order optional', 'case-insensitive and unique') but adds no syntax or edge-case meaning beyond the schema, so baseline 3 applies.

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 and resource ('sorts lines') and enumerates the differentiating capabilities: locale-aware collation, natural numeric order, ascending/descending, case-insensitive, unique. It also explicitly names the sibling it is not (array-sort), so an agent can distinguish it without opening either schema.

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

Usage Guidelines5/5

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

Uses explicit 'When' and 'No para' clauses: use it when text must be transformed, compared or measured exactly, and not for sorting arrays of values/objects by keys — routing to array-sort. Both the positive and negative selection conditions are stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources