Skip to main content
Glama

x402-truncate

Truncate: Truncate a string to a length.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoN to process
maxNoMax to process
textNoText to process
inputNoInput to process
ellipsisNoEllipsis to process
maxLengthNoMaxLength to process

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / max
      Added value: +{
      +  "description": "Max to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Text to process",
      +  "type": "string"
      +}
  2. First observed

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and supplies only one sentence. It does not say what happens when the string is already shorter than the limit, whether the ellipsis counts toward the length, or whether truncation happens at a word boundary — all decisions that change the result materially.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

'Truncate: Truncate a string to a length.' front-loads the verb, but the leading noun restates the tool name and the second clause is the only real content. Brief and non-padded, yet under-specified rather than concise.

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?

A six-parameter text utility with no annotations and no output schema needs the description to explain parameter roles and edge behavior. The single sentence leaves both unexplained, so an agent cannot call it with confidence.

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

Parameters2/5

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

While schema description coverage is nominally 100%, the schema descriptions are degenerate placeholders ('N to process', 'Max to process', 'MaxLength to process'). With six string parameters and overlapping names (n, max, maxLength, text, input, ellipsis) all optional, the description should disambiguate which parameter holds the source string and which holds the target length, but it adds nothing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Truncate a string to a length'), so the basic operation is identifiable. However it gives no directional scope (start, middle, end) and does not distinguish this tool from siblings like x402-truncate-middle, x402-truncate-words, or x402-truncate-decimal, leaving the agent unable to tell which truncation variant applies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No when-to-use statement, no prerequisites, and no named alternatives despite several closely related truncation siblings. An agent gets no routing signal beyond the generic name.

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