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. Price: $0.001 USDC per successful call (x402, 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.4/5.0
Behavior5/5

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

Goes well past the readOnly/idempotent annotations by disclosing the exact computation (sum of AFM glyph widths times font size, rounded half away from zero to 0.001 pt), the encoding basis, error behavior for rejected characters, and metered pricing of $0.001 USDC per successful call via x402 on Solana, plus an equivalent HTTPS endpoint. Cost and failure modes are exactly the kind of context annotations cannot express.

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 core behavior and its rounding rule are front-loaded in the first two sentences, with constraints, sibling routing, pricing, and the HTTP alternative following in descending priority. Dense but nearly every clause carries information; the pricing/URL sentence is long but materially useful for an agent deciding whether to call.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description fully specifies the return value (width in points, rounded to 0.001 pt), the units, the error conditions, and the cost model. For a three-parameter read-only calculator, nothing an agent needs to invoke it correctly is missing.

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 description coverage is only 33% — just the `size` parameter is documented — so the description carries part of the burden. It does name both allowed fonts and ties size into the width formula, but it never clarifies that size is passed as a string, nor adds constraints on the text argument beyond the encoding restriction. Partial compensation only.

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 precise verb-and-resource outcome: the width in points of one line of text in Helvetica or Helvetica-Bold. It explicitly separates itself from text_wrap by noting a newline belongs there, so an agent can distinguish it from the many other text_* siblings without opening the schema.

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?

Gives a concrete exclusion (characters outside WinAnsi and control characters are rejected) and routes newline handling to the text-wrap sibling. It does not, however, describe the positive use case (e.g., measuring text for layout before rendering) in a way that would distinguish it from text_fit or paper_fit.

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