Skip to main content
Glama

clean_whitespace

Remove extra spaces, tabs, newlines, or all whitespace from text. Choose mode to target spaces, lines, or clean everything.

Instructions

Remove redundant whitespace: extra spaces, tabs, newlines, or all.

Parameters:
    text — Text to clean.
    mode — 'all' (default), 'spaces', or 'lines'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
modeNoall

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations provided, so description bears full burden. It states the action but omits key behavioral traits: does it modify the original? Is it safe? What is the return format? It doesn't disclose edge cases (e.g., empty string, unicode whitespace) or whether mode validation occurs.

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?

The description is short, front-loaded with the main action, then a concise parameter list. No redundant sentences. Slightly less than 5 because it could rephrase to avoid a block of monolithic text; but overall efficient.

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 tool with 2 parameters and output schema present, the description covers basic usage but omits return value description (e.g., 'Returns cleaned string'). It does not mention that whitespace is collapsed to a single space in 'all' mode. Adequate but not thorough.

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 0%, so description must compensate. It adds brief explanations for 'text' and 'mode' including default and options. This is baseline adequate but lacks detail (e.g., 'text' could specify expected encoding, 'mode' could list exact values). Not enough to elevate above 3.

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?

The description clearly states the tool removes redundant whitespace (spaces, tabs, newlines) with a specific verb 'Remove' and resource 'whitespace'. It distinguishes from siblings like 'normalize_text' or 'remove_accents' by focusing on whitespace. Slightly less than 5 because 'all' mode could be more explicit (e.g., collapsing all to single space).

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?

No explicit guidance on when to use this tool versus alternatives like 'normalize_text' or 'whitespace_analyze'. The description does not mention prerequisites, context, or exclusions, leaving the agent without decision support.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scotia1973-bot/api-hub'

If you have feedback or need assistance with the MCP directory API, please join our Discord server