Skip to main content
Glama

Filtrar líneas

lines-filter
Read-onlyIdempotent

Conserva (o elimina) líneas que contienen una subcadena. Cuándo: hay que transformar, comparar o medir un texto con exactitud y no por aproximación. No para: aplicar una expresión regular de JavaScript a un texto y listar cada coincidencia con posición y grupos (regex-test). 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: Keeps (or removes) lines containing a substring, case-insensitive optional. Plain substring match only; patterns are handled by regex-test. When: text has to be transformed, compared or measured exactly instead of approximated. Not for: trying a JavaScript regex on a text and listing each match with its position and groups (regex-test). 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).
invertNoRemove matching lines instead (boolean; optional; default false).
containsYesSubstring (string; required; at least 1 chars; up to 1000 chars).
case_insensitiveNoIgnore case (boolean; optional; default true).

Output Schema

NameRequiredDescriptionDefault
textNo
linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / contains / examples
      Added value: +[
      +  "error"
      +]
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "ERROR a\ninfo b\nerror c"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

The read-only/no-network/no-state and determinism statements merely restate readOnlyHint, openWorldHint and idempotentHint, so they earn no credit. The genuine addition is the operational envelope: 64 KB JSON input, 1 s per call, 1 MB result — facts absent from annotations. Minor caveat: '64 KB input' conflicts with the schema's 1 MB maxLength on `text`, which could mislead on large inputs.

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?

Each language block is tightly front-loaded with labeled sections (What / Cuándo / No para / Efectos / Límites) and no filler. The cost is the full bilingual duplication, which roughly doubles the payload for a tool that is conceptually simple.

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?

An output schema exists so return values need no explanation, and the safety profile is in annotations; the description correctly focuses on routing, determinism and limits. The only completeness defect is the size-limit inconsistency (64 KB claimed vs. 1 MB permitted by the schema).

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 the baseline is 3. The description only adds light mapping ('or removes' → invert; 'case-insensitive optional' → case_insensitive), which the schema already spells out with defaults. No extra syntax guidance (e.g., multiline handling, behavior on empty lines) is provided.

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 ('Keeps (or removes) lines containing a substring') and immediately constrains scope: 'Plain substring match only; patterns are handled by regex-test.' An agent can distinguish it from regex-test, lines-dedupe and lines-sort without opening any 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?

Explicit 'When:' clause (transform/compare/measure text exactly rather than approximately) and an explicit 'Not for:' clause naming the alternative (regex-test) with its distinguishing capability (JS regex, match positions and groups). The routing decision is fully determined.

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