Skip to main content
Glama

Remove Line Breaks API - unwrap copied PDF/email text & keep paragraphs

remove_line_breaks
Read-onlyIdempotent

Remove or replace unwanted line breaks in text copied from PDFs or emails: join into one line, keep paragraph breaks, replace with comma or custom separator, rejoin hyphenated split words, trim extra spaces and drop empty lines. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/remove-line-breaks.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "paragraphs",
      "text": "This line was bro-\nken by a PDF.\n\nSecond paragraph\nhere.",
      "fixHyphens": true
    },
    "name": "remove_line_breaks"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNospace, none, paragraphs, comma or customparagraphs
textYesInput text with unwanted line breaks
fixHyphensNoRejoin words split by a trailing hyphen at line end
trimSpacesNoCollapse and trim extra spaces
replacementNoCustom separator when mode=custom (optional)
removeBlankLinesNoDelete empty lines

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/idempotent, but the description adds material behavior the annotations cannot: processing runs server-side, files are deleted immediately, nothing is stored, and there are concrete rate limits (5 calls/day per IP free) plus paid access paths. Auth mechanics (X-API-Key header, x402 endpoint) are spelled out, which is exactly the context an agent needs before invoking.

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?

Purpose and capabilities are front-loaded in the first sentence, with operational and pricing details after. The pricing/promo tail (URLs, €9/mo, $0.001/call) is dense but still actionable for an agent deciding whether it can call the tool.

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?

With no output schema, the description should hint at what comes back; it implies transformed text but never states the return shape. Everything else an agent needs for a 6-parameter, non-destructive text transform — behavior, auth, limits, side effects — is covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by mapping mode values to observable outcomes ('join into one line', 'keep paragraph breaks', 'replace with comma or custom separator') and by explaining what fixHyphens and the trimming options actually do to the text. It does not, however, clarify interaction between mode=custom and replacement beyond what the schema already says.

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?

The description opens with a specific verb+resource ('Remove or replace unwanted line breaks in text') and scopes the input to text copied from PDFs or emails. It enumerates the concrete operations (join into one line, keep paragraphs, custom separator, rejoin hyphens, trim spaces, drop empty lines), which makes it clearly distinguishable from siblings such as remove_duplicate_lines or pdf_to_text.

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?

The scenario guidance is explicit — this is for text already copied out of PDFs or emails — and the mode list implies which transformation to pick. It stops short of naming alternatives or stating when not to use it (e.g., when the source is still a PDF file, use pdf_to_text).

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