Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

sort_lines

Read-onlyIdempotent

Sort, deduplicate, reverse, or filter lines of text. Useful for cleaning import lists, dependencies, log files, and config entries.

Input Schema

NameRequiredDescriptionDefault
trimNoTrim whitespace from each line (default: true)
inputYesMulti-line text to process
filterNoFor "filter": keep lines containing this substring (case-insensitive)
operationNo"sort" (default), "sort_desc", "reverse", "deduplicate", "unique_sort", "filter"
remove_emptyNoRemove empty lines (default: true)

Output Schema

NameRequiredDescriptionDefault
resultNo
removedNo
line_countNo
original_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "input": "b\na\nb\nc",
      +    "operation": "deduplicate"
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "line_count": {
      +    "type": "number"
      +  },
      +  "original_count": {
      +    "type": "number"
      +  },
      +  "removed": {
      +    "type": "number"
      +  },
      +  "result": {
      +    "type": "string"
      +  }
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds no behavioral detail beyond purpose — notably it doesn't disclose that trim and remove_empty default to true, meaning input lines are silently altered, though that is documented in the schema. With annotations carrying the load, a 3 is appropriate.

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, zero waste, with the operation set front-loaded before the use-case examples. Every clause earns its place.

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

Completeness4/5

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

With an output schema present, full schema description coverage, and rich annotations, the description only needs to establish purpose and context, which it does. A brief note on default-altering behavior (trim/remove_empty) would make it fully complete.

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 coverage is 100%, so every parameter is already documented in the schema. The description restates the same operation list the operation parameter enumerates and adds no format or syntax guidance beyond it. Baseline 3 applies when the schema does the heavy lifting.

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

Purpose4/5

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

The description states specific verbs and the resource ('Sort, deduplicate, reverse, or filter lines of text'), which is clearly distinguishable from text-transform siblings like diff_text or normalize_whitespace. It lacks any explicit naming of an alternative tool, but the operation set is unambiguous.

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?

It gives concrete usage contexts ('cleaning import lists, dependencies, log files, and config entries'), which tells the agent when to reach for it. It stops short of stating when NOT to use it or naming a sibling alternative, so it is clear context without exclusions.

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.