Skip to main content
Glama

Normalize pasted whitespace

bpj_normalize_whitespace
Read-onlyIdempotent

Collapse repeated whitespace with a choice to preserve line breaks.

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

Input Schema

NameRequiredDescriptionDefault
textYes
keepLinesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds the core transformation semantics (repeated whitespace collapses, line breaks optionally preserved), but says nothing about edge trimming, tab handling, or whether newlines are treated as whitespace when keepLines is false.

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?

A single front-loaded sentence with no filler and the conditional behavior placed where a reader will see it immediately. It is efficient but borders on under-specified rather than over-worded.

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 simple two-parameter pure function with rich annotations and no output schema, the description covers purpose and the boolean flag adequately. Gaps remain around trimming behavior and input size limits, which an agent calling it correctly would benefit from knowing.

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 0%, so the description must carry parameter meaning. It partially does: 'preserve line breaks' explains keepLines and 'text' is self-evident. However, it omits the 12,000-character maxLength constraint and the exact semantics of keepLines=false (does everything collapse to one line?).

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 ('collapse repeated whitespace') plus the conditional behavior ('choice to preserve line breaks'), so the transformation is identifiable. It does not distinguish itself from neighboring text tools such as bpj_chunk_text or bpj_deduplicate_lines, so it stops short of a 5.

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 statement of when to reach for this tool versus other text-processing siblings, nor any when-not condition or prerequisite. The only conditional mentioned ('choice to preserve line breaks') is parameter behavior, not usage guidance.

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.