Skip to main content
Glama

Measure text

measure_text
Read-onlyIdempotent

Measure how text wraps and renders, without drawing it.

Input Schema

NameRequiredDescriptionDefault
contentYes
opacityNo
font_sizeNo
max_widthNo
font_styleNo
font_familyNo
font_weightNo
line_heightNo
text_anchorNo
letter_spacingNo
vertical_anchorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world behavior, so the safety profile is covered. The description adds that measurement occurs without drawing, a useful behavioral distinction, but it omits what is returned (bounding box, line breaks, dimensions) and any dependency on current document/style context.

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?

A single front-loaded sentence with no filler or redundancy. It is concise and immediately states the tool's function, though its brevity leaves required detail to other dimensions.

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

Completeness2/5

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

For an 11-parameter, no-output-schema tool, the description is not complete: it does not explain the return shape or how the many typography/layout parameters affect measurement. Annotations cover safety but not the missing operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Eleven parameters exist with 0% schema description coverage, including content, font properties, max_width, line_height, and anchors. The description contains no parameter-level semantics and does not compensate by mapping any of these controls to the measurement result.

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 ('Measure') and resource ('text'), and 'without drawing it' distinguishes this from sibling text-drawing tools such as set_text or text_on_path. An agent can identify this as a non-rendering measurement tool 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'without drawing it' implies the tool is for checking text layout when rendering is unnecessary or undesirable, but it does not name alternatives or state explicit when/when-not conditions. Guidance is implied rather than spelled out.

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.