Skip to main content
Glama

data_filter

Filter lines by substring or regular expression and return the matches. Pure CPU, instant.

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>"
    },
    "name": "data_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesLines to filter
patternNoSubstring or regex

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / pattern
      Added value: +{
      +  "description": "Substring or regex",
      +  "type": "string"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Lines to filter",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "text"
      +]
  4. Added

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. 'Pure CPU, instant' is a helpful disclosure of safety and cost, but nothing explains whether matching is case-sensitive, whether non-matching lines are dropped entirely, or how the tool decides between literal substring and regex interpretation when both are plausible - a meaningful ambiguity for a filter.

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 short sentences, zero filler, with the operation stated first and the cost note second. Every clause earns its place.

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 two-parameter utility with no output schema, most of what is missing is minor, but the return shape is only loosely described as 'the matches' - it is unclear whether matched lines, match spans, or counts come back. Combined with the undefined behavior for a missing pattern, the definition is adequate but not 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%, and the schema already labels both fields ('Lines to filter', 'Substring or regex'), so the baseline is 3. The description does not compensate for the schema's silence on an important point: only 'text' is required, so it is unclear what happens when 'pattern' is omitted, or how regex-vs-substring mode is selected.

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?

States a specific verb and resource: filter lines by substring or regex and return the matches. An agent immediately knows the operation and input granularity (lines, not whole documents). It does not name the nearest siblings (regex_test, extract, data_sort, data_dedupe), so differentiation is left to inference.

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

Usage Guidelines3/5

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

The phrase 'filter lines' implies line-oriented usage, which is genuinely useful context, but there is no explicit when-to-use or when-not-to-use guidance. It never mentions regex_test for validating patterns or data_sort for ordering, so an agent choosing among the data_* siblings gets no routing help.

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