Skip to main content
Glama

text_transform

Apply an ordered sequence of text transformations—case conversion, line cleanup, sorting, wrapping, Unicode normalization, accent removal, and line-ending fixes—to text or files.

Instructions

Text ops in order: case (upper lower title sentence camel pascal snake kebab constant slug), trim_lines trim_trailing dedupe_lines(_ci) sort_lines(_desc) sort_by_length reverse_lines shuffle_lines number_lines remove_blank_lines squeeze_blank_lines count_lines, wrap:N unwrap collapse_spaces, nfc nfkc nfd strip_accents ascii remove_invisible smart_quotes_to_ascii, tabs_to_spaces lf crlf reverse trim.

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": {
      "ops": "<ops>"
    },
    "name": "text_transform"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYes
pathNoor a file
textNo
in_placeNo
out_pathNo
overwriteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

C2.4/5.0
Behavior2/5

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

The only annotation is destructiveHint=false, so the description carries the burden of disclosing side effects, and it is silent on them. It does not say whether `in_place`/`overwrite` modify files on disk, what happens on an unrecognized op token, whether ops fail fast or are skipped, or what the response contains. "in order" is the sole ordering hint and is not reinforced with error or short-circuit semantics.

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

Conciseness2/5

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

The description is a single comma-separated token dump with no grouping, delimiters, or front-loaded summary of intent. Duplicated and dangling items ("reverse" listed twice, "reverse_lines", and a terminal "trim") create ambiguity about whether these are aliases or separate ops. Length is devoted to enumeration rather than to the information an agent needs to call the tool correctly.

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

Completeness3/5

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

For a tool whose primary semantic payload is the op vocabulary, the description does supply the full token set, which is genuinely useful since no enums exist. But with no output schema and a file-mutation surface implied by four undocumented parameters, the absence of any statement about return value, file writes, or failure behavior leaves the definition incomplete for correct invocation.

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

Parameters2/5

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

Schema coverage is 17% with 6 parameters, only `path` being described ("or a file"). The op vocabulary does add real meaning for the required `ops` array since there are no enums, which is the one bright spot. But the four file-related parameters (in_place, out_path, overwrite, and the text-vs-path choice) receive no explanation in either schema or description, leaving most of the surface undocumented.

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

Purpose3/5

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

"Text ops in order" conveys that a sequence of text transformations is applied to input text, and the token list makes the resource concrete. However, it never states plainly that this is a pipeline transformer, and nothing hints that it can read from a file and write results to disk, which the schema's path/out_path/in_place/overwrite parameters clearly imply. The trailing "reverse trim." fragment and the duplicate "reverse"/"reverse_lines" entries muddy rather than sharpen the purpose.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool rather than siblings such as text_stats, diff, encode, or markdown. It also gives no rule for choosing between supplying inline `text` and a `path`, nor between returning output and writing it via `out_path`/`in_place`. Usage must be entirely inferred from the schema.

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