Skip to main content
Glama

ScorpTech x402 Tools

Text Width

text_width
Read-onlyIdempotent

Width of one line in Helvetica or Helvetica-Bold, in points. Glyph widths are the Adobe standard-14 AFM numbers in WinAnsi (the same numbers ReportLab ships). The width is the sum times the font size, rounded half away from zero to 0.001 pt. Characters outside that encoding, and control characters, are rejected. A newline belongs in text-wrap. Returns JSON with: width, chars, font, size, method. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/text-width

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

Input Schema

NameRequiredDescriptionDefault
fontNohelvetica
sizeNoFont size in points12
textYes

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?

Beyond the read-only/idempotent annotations, the description discloses the exact computation (glyph width sum times font size), the rounding rule (half away from zero to 0.001 pt), input rejection behavior, the response fields, and the commercial/auth context (x402 payment, HTTPS endpoint). These are the details an agent could not infer from annotations.

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?

Information is front-loaded: purpose first, then encoding and rounding rules, then the wrap alternative, then output and price. It is dense but nearly every sentence earns its place; the pricing/HTTPS sentence is commercial context rather than invocation guidance, a minor dilution.

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 lists the return fields (width, chars, font, size, method) and defines the numeric semantics, so an agent knows what comes back and in what units. Error behavior for rejected characters is stated as a rejection but not as a response shape, which is the only notable omission for a three-parameter tool.

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 only 33% (only `size` is described), but the description compensates by stating the two font families, that size is in points and multiplies the glyph sum, and that text must be WinAnsi-encodable with no control characters. It leaves the string-typed `size` format (e.g. "12" vs "12pt") unclarified, which is the remaining gap.

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 opening sentence names a specific quantity and unit: the width in points of one line rendered in Helvetica or Helvetica-Bold. The definition of the measurement basis (Adobe standard-14 AFM numbers in WinAnsi) makes the result unambiguous and separates it from layout tools like text_fit or text_block.

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?

It gives one explicit routing rule — 'A newline belongs in text-wrap' — which tells the agent when this tool is the wrong choice, plus an input constraint (characters outside WinAnsi and control characters are rejected). It stops short of stating when to prefer text_width over measurement-adjacent siblings such as text_fit, so guidance is clear but not exhaustive.

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