Skip to main content
Glama

Text Analysis & Cleanup Tools (Tanod)

text_lines

Read-onlyIdempotent

utilpeek: Sort, dedupe, trim, shuffle or number the lines of a text. For find and replace use text_replace. Returns the text's lines transformed by operations in order: trim, remove_empty, dedupe (keeps the first), sort (lexical, natural, numeric or length; stable), reverse, shuffle (seeded, repeatable) and number; optionally the most frequent lines with counts. At most 200,000 lines. Typically under 0.3 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. The submitted text is never logged or stored.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>",
      "operations": "<operations>"
    },
    "name": "text_lines"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoShuffle seed: same seed, same order.
textYesThe text (at most 200,000 characters).
top_nNoWith count_unique: how many lines to return.
sort_modeNoFor sort: lexical (by character), natural (item 9 before item 10), numeric (by the first number's value; lines without one last) or length.lexical
descendingNoFor sort: largest first.
operationsYesApplied in order: trim, remove_empty, dedupe, sort, reverse, shuffle, number.
count_uniqueNoAlso return the most frequent lines with counts.
number_startNoFor number: the first line's number.
case_insensitiveNodedupe / sort / count compare casefolded lines.
ignore_invisibleNoDedupe also ignores zero-width chars, BOM, soft hyphen.
number_separatorNoFor number: text between the number and the line..

Output Schema

NameRequiredDescriptionDefault
topNo
seedNo
textNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
sourceNo
removedNo
lines_inNo
lines_outNo
operationsNo
unique_linesNo
lines_without_numberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / sort_mode / description
      Previous value: -"For sort: lexical (by character), natural (item 9 before item 10) or length."New value: +"For sort: lexical (by character), natural (item 9 before item 10), numeric (by the first number's value; lines without one last) or length."
    • changedInput schema / properties / sort_mode / enum
      Previous value: -[
      -  "lexical",
      -  "natural",
      -  "length"
      -]New value: +[
      +  "lexical",
      +  "natural",
      +  "numeric",
      +  "length"
      +]
    • addedOutput schema / properties / lines_without_number
      Added value: +{
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  2. Changed12 schema fields changed
    • removedInput schema / properties / case_insensitive / title
      Removed value: -"Case Insensitive"
    • removedInput schema / properties / count_unique / title
      Removed value: -"Count Unique"
    • removedInput schema / properties / descending / title
      Removed value: -"Descending"
    • removedInput schema / properties / ignore_invisible / title
      Removed value: -"Ignore Invisible"
    • removedInput schema / properties / number_separator / title
      Removed value: -"Number Separator"
    • removedInput schema / properties / number_start / title
      Removed value: -"Number Start"
    • removedInput schema / properties / operations / title
      Removed value: -"Operations"
    • removedInput schema / properties / seed / title
      Removed value: -"Seed"
    • removedInput schema / properties / sort_mode / title
      Removed value: -"Sort Mode"
    • removedInput schema / properties / text / title
      Removed value: -"Text"
    • removedInput schema / properties / top_n / title
      Removed value: -"Top N"
    • removedInput schema / title
      Removed value: -"text_linesArguments"
  3. Changed6 schema fields changed
    • changedInput schema / properties / descending / description
      Previous value: -"For sort: largest first (default false: ascending)."New value: +"For sort: largest first."
    • addedInput schema / properties / ignore_invisible
      Added value: +{
      +  "default": false,
      +  "description": "Dedupe also ignores zero-width chars, BOM, soft hyphen.",
      +  "title": "Ignore Invisible",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / number_separator / description
      Previous value: -"For number: text between the number and the line (at most 10 characters; default \". \")."New value: +"For number: text between the number and the line."
    • changedInput schema / properties / number_start / description
      Previous value: -"For number: the first line's number (-1,000,000 to 1,000,000; default 1)."New value: +"For number: the first line's number."
    • changedInput schema / properties / sort_mode / description
      Previous value: -"For sort: lexical (default, by character), natural (numbers by value: item 9 before item 10) or length (shortest first)."New value: +"For sort: lexical (by character), natural (item 9 before item 10) or length."
    • changedInput schema / properties / top_n / description
      Previous value: -"With count_unique: how many of the most frequent lines to return (1-1000, default 100)."New value: +"With count_unique: how many lines to return."
  4. Changed6 schema fields changed
    • addedInput schema / properties / descending / description
      Added value: +"For sort: largest first (default false: ascending)."
    • addedInput schema / properties / number_separator / description
      Added value: +"For number: text between the number and the line (at most 10 characters; default \". \")."
    • addedInput schema / properties / number_start / description
      Added value: +"For number: the first line's number (-1,000,000 to 1,000,000; default 1)."
    • addedInput schema / properties / sort_mode / description
      Added value: +"For sort: lexical (default, by character), natural (numbers by value: item 9 before item 10) or length (shortest first)."
    • addedInput schema / properties / top_n / description
      Added value: +"With count_unique: how many of the most frequent lines to return (1-1000, default 100)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "lines_in": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "lines_out": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "operations": {
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "removed": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "seed": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "text": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "top": {
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "unique_lines": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent and non-destructive, and the description adds substantial context beyond them: the order operations are applied, that dedupe keeps the first occurrence, that sort is stable, that shuffle is seeded and repeatable, the 200,000-line ceiling, the ~0.3 s latency, the USD 0.001 price and 10 free calls per IP per UTC day, and that submitted text is never logged or stored. These are exactly the behavioral facts an agent needs before committing a call.

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 routing rule to text_replace is front-loaded in the second sentence, before the operational detail. Every remaining sentence carries a distinct constraint (operation order, limits, timing, price, quota, privacy) with no restatement of the name or title.

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?

An output schema exists, so return shape needn't be spelled out; the description instead covers the things the schema cannot — the transformation ceiling, latency, cost, free-tier quota and data-handling guarantee. For an 11-parameter, idempotent text transformer this is complete enough to call correctly on the first try.

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 description coverage is 100%, so the baseline is 3, but the description earns one step above it by stating semantics the schema leaves implicit: dedupe 'keeps the first', sort is 'stable', shuffle is 'seeded, repeatable', and count_unique returns 'the most frequent lines with counts'. It does not explain seed/top_n/number_separator interaction beyond what the schema already says.

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 opens with a specific verb-plus-resource list ('Sort, dedupe, trim, shuffle or number the lines of a text') that tells an agent exactly what class of transformation the tool performs. It also names the sibling it is not ('For find and replace use text_replace'), so it is distinguishable 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 Guidelines4/5

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

It gives one explicit routing rule away from itself: find-and-replace belongs to text_replace, not here. There is no stated when-not beyond that (e.g. no guidance on using text_frequency or check_text_duplicate for pure counting), so it is clear but not exhaustive.

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.