Skip to main content
Glama

Dividir texto y tomar una parte

text-split-pick
Read-onlyIdempotent

Divide un texto por un delimitador (texto literal, salto de línea o tabulador) y devuelve todas las partes, la primera, la última o la n-ésima, con recorte y descarte de vacías opcionales. Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: conservar o quitar líneas enteras que contienen una subcadena (lines-filter). 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: Splits text on a delimiter (literal text, or newline / tab) and returns all parts, the first, the last or the n-th (1-based; negative counts from the end), optionally trimming parts and dropping empty ones. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: keeping or dropping whole lines that contain a substring (lines-filter). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
nNoPosition for pick "nth" (1-based; -1 is the last) (integer; optional; min -100000; max 100000).
pickNoWhich part(s) (optional; one of: all, first, last, nth; default "all").all
textYesText (string; required).
trimNoTrim whitespace around parts (boolean; optional; default true).
delimiterNoDelimiter; "\n"/"newline" and "\t"/"tab" are special (string; optional; default ","; at least 1 chars; up to 100 chars).,
max_partsNoStop after this many parts (integer; optional; default 10000; min 1; max 100000).
remove_emptyNoDrop empty parts (boolean; optional; default false).

Output Schema

NameRequiredDescriptionDefault
countNo
indexNo
partsNo
valueNoany JSON value
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "Bogotá, Medellín, Cali, ,Barranquilla"
      +]
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, closed-world and non-destructive, and the description reinforces those while adding genuinely new operational context: per-call latency (1 s), result size (1 MB) and input size. That added context is real value beyond structured fields. One caveat: the stated '64 KB' input limit conflicts with the schema's text maxLength of 1,048,576 characters, which could mislead on payload size.

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 the core operation, then when/not-for, then side effects and limits — a sensible order with no filler. It is somewhat long because the same content is given in Spanish and English, but every clause carries information (the English copy is also duplicated inside inputSchema.description).

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 stateless 7-parameter string tool with an output schema already covering return shape, the description supplies everything else an agent needs: scope, exclusions, determinism, absence of side effects, and hard time/size limits.

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 parameters are already fully documented and the baseline is 3. The description restates the delimiter specials (newline/tab) and the 1-based/negative n semantics that the schema also covers, but never mentions max_parts (default 10000), which is the one parameter whose effect on output volume matters most.

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?

Names a specific verb and resource ('divide un texto por un delimitador') plus the exact return modes (all / first / last / n-th) and the optional trim and remove-empty behaviors. It explicitly contrasts itself with the closest sibling, lines-filter, so an agent can distinguish the two 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?

Provides an explicit 'Cuándo' section and a precise 'No para' exclusion naming lines-filter as the alternative, which is the main disambiguation risk in this family. The positive condition ('transformar, comparar o medir un texto con exactitud y no por aproximación') is a little abstract, so the trigger is clearer by exclusion than by inclusion.

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