Skip to main content
Glama

ScorpTech x402 Tools

Text Fit

text_fit
Read-onlyIdempotent

Largest Helvetica size, on a fixed step, at which one line still fits a width. Sizes run from minSize to maxSize in steps (defaults 6, 72 and 0.5 points). Empty text fits at maxSize. If the line does not fit at minSize, the call is rejected. Width uses the same AFM rounding as text-width, so the size is not a float division of the two widths. Returns JSON with: size, width, chars, font. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/text-fit

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_fit"
  }
}

Input Schema

NameRequiredDescriptionDefault
fontNohelvetica
stepNo0.5
textYes
widthYes
maxSizeNo72
minSizeNo6

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?

Annotations already mark this read-only, idempotent, and non-destructive, and the description layers on genuinely non-obvious behavior: the empty-text case, the rejection path when the line cannot fit even at minSize, and the fact that AFM rounding makes the result not a simple float division of widths. It also discloses cost and the equivalent HTTPS endpoint, which the annotations do not cover.

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 core computation, then edge cases, then return shape and cost. Almost every clause carries information, though the x402 pricing and duplicate HTTPS endpoint, while useful, are somewhat tangential to selecting and invoking the tool.

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?

For a six-parameter computational tool with no output schema, the description supplies the return fields (size, width, chars, font), the failure mode, and the edge case handling. An agent has everything needed to call it correctly and interpret the result.

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 0%, so the description carries the burden and largely does: it gives the semantics and defaults for minSize, maxSize, and step (6, 72, 0.5 points) and explains that width is compared using AFM rounding. The font parameter is left to its enum, which is self-explanatory, but the string encoding of the numeric parameters is never mentioned.

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 states a precise computation: the largest font size on a fixed step at which one line fits a given width. It names the font family, the step constraint, and the fit criterion, and it explicitly references text-width as the rounding counterpart, which separates it from the width-measuring sibling.

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 description defines boundary behavior clearly (empty text returns maxSize; failure at minSize rejects the call), which tells an agent when the tool is applicable. However, it never states when to prefer this over text_width, text_wrap, or text_ellipsis, leaving alternative selection to inference.

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