Skip to main content
Glama

Truncate to a grapheme budget

bpj_truncate_grapheme_budget
Read-onlyIdempotent

Truncate at a grapheme boundary and count the ellipsis inside the supplied limit.

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

Input Schema

NameRequiredDescriptionDefault
textYes
limitYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive operation. The description adds the important behavioral detail that the ellipsis is counted within the limit, but it does not disclose the return format, what happens when input is already under the limit, or which ellipsis character is used.

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. The key constraint, ellipsis inside the limit, is stated directly.

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

Completeness3/5

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

For a simple two-parameter utility with annotations covering safety, the description gives the core semantics. It is still incomplete on the return value and edge-case behavior, which matters because there is no output schema.

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 must carry parameter meaning. It clarifies that the supplied limit is a grapheme budget that includes the ellipsis, which is a non-obvious semantic beyond the schema titles; however, it leaves the text parameter's role mostly implicit.

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

Purpose4/5

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

The description names a specific operation (truncate), the unit boundary (grapheme), and the budget rule (ellipsis counted inside the limit). This distinguishes it reasonably from the UTF-8 budget sibling, though it does not explicitly name that alternative.

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?

Usage is implied by the phrase 'grapheme boundary' versus a UTF-8 boundary, but there is no explicit when-to-use or when-not-to-use guidance and no direct routing to the sibling truncation tool.

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.