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 €15/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 cover the safety profile (readOnly, idempotent, openWorld), and the description adds substantial operational detail beyond them: server-side execution, files deleted immediately with nothing stored, a free tier of 5 calls/day per IP, and the two paid paths (X-API-Key with a pricing link, or $0.001/call via x402). That is materially useful for an agent deciding whether and how to call it.

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?

Front-loaded with the operation and its variants, followed by two compact sentences on hosting/privacy and pricing/auth. The capability list is dense but each clause maps to a real parameter or behavior; the pricing URLs add length but are actionable.

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?

For a 6-parameter text transformer with no output schema, the description covers input semantics, privacy handling, and access/pricing requirements. The only gap is that the return shape (processed text plus any notes) is left implicit, which is a minor omission for an otherwise self-evident transformation.

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, but the description adds meaning by mapping behaviors to parameters (paragraph-preserving join, comma or custom separator, hyphen rejoining, space trimming, blank-line removal). It does not explain mode/enum trade-offs in more depth than the schema field names already imply.

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 names a specific verb and resource ('Remove or replace unwanted line breaks in text') and scopes the input as text copied from PDFs or emails, which implicitly distinguishes it from file-level siblings like pdf_to_text. It then enumerates the concrete operations (join into one line, keep paragraph breaks, comma/custom separator, rejoin hyphens, trim spaces, drop empty lines).

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?

Usage context is clear: it is for already-copied PDF/email text, with each mode described by the outcome it produces, so an agent can pick 'space' vs 'paragraphs' vs 'comma'. It stops short of explicit when-not-to-use guidance or naming alternatives such as remove_duplicate_lines or 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