Skip to main content
Glama

ScorpTech x402 Tools

Text Wrap

text_wrap
Read-onlyIdempotent

Wrap text to a measure in Helvetica or Helvetica-Bold. Hard breaks are LF, CR, or CRLF. Inside a paragraph, spaces collapse to one and leading and trailing spaces are dropped. A word moves to the next line when it does not fit. A word wider than the whole measure breaks between characters, and those lines are marked broken. The width of each line uses the same AFM rounding as text-width. Returns JSON with: lines, lineCount, maxLineWidth, broken, font, size, width, method. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/text-wrap

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

Input Schema

NameRequiredDescriptionDefault
fontNohelvetica
sizeNo12
textYes
widthYesMeasure in points

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses the wrapping algorithm: LF/CR/CRLF hard breaks, whitespace collapsing, leading/trailing space stripping, word-move-on-overflow, and character-level breaking with a 'broken' marker for over-wide words. It also adds cost and access context ($0.001 USDC per successful call via x402 on Base or Solana, plus an HTTPS endpoint), which is material to whether an agent should 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and font support come first, then the layout rules, then the return shape, then cost and endpoint. Every sentence contributes a distinct behavioral fact with no repetition of the name or title.

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 compensates by enumerating the returned fields (lines, lineCount, maxLineWidth, broken, font, size, width, method), and it covers the non-obvious layout edge cases. Gaps remain around size units and input length limits, but nothing that would cause a wrong invocation.

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 description coverage is only 25% (only width is annotated, as 'Measure in points'), so the description carries extra weight and does add meaning: it clarifies that width is a typographic measure, that font choices map to Helvetica/Helvetica-Bold, and that text is interpreted as paragraphs with specific break and whitespace rules. It still leaves size units and the 8000-character text cap unexplained.

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?

States a specific verb and resource ('Wrap text to a measure') plus the supported fonts, and ties itself to the sibling measurement tool by noting it uses the same AFM rounding as text-width. An agent can distinguish it from text_width, text_fit, and text_block without opening any schema.

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 purpose strongly implies when to reach for it (you need wrapped lines rather than a measurement), and the text-width reference hints at the measurement relationship. However, there is no explicit 'use this instead of X when Y' routing or statement of preconditions, so guidance is only implied.

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