Skip to main content
Glama

Map Unicode to UTF-8 byte offsets

bpj_utf8_byte_offsets
Read-onlyIdempotent

Map each Unicode code point to its starting UTF-8 byte and UTF-16 unit offsets.

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": "bpj_utf8_byte_offsets"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered elsewhere. The description adds only that output is a per-code-point offset mapping in two encodings; it says nothing about the return container, ordering, or what happens at the 1500-character limit. With annotations carrying the burden, this is adequate but thin.

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?

A single front-loaded sentence with no padding. It is efficient, though the phrase 'its starting ... offsets' relies on the reader inferring that offsets are per code point rather than per grapheme.

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 pure single-argument function this would be nearly complete, but with no output schema the description should at least sketch the shape of the returned mapping (list of pairs? parallel arrays?) and the zero-based indexing convention. That gap matters for an agent trying to consume the result.

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?

Schema description coverage is 0% and the description never mentions the single 'text' parameter, its maxLength of 1500, or whether the input is treated as raw code points versus grapheme clusters. The one parameter is mostly self-evident from its title, but the length constraint and unit assumptions are left entirely to the schema.

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?

States a specific verb ('map') and resource ('each Unicode code point'), and specifies the two coordinate systems produced (UTF-8 byte and UTF-16 unit offsets). This distinguishes it reasonably from siblings like bpj_utf8_byte_histogram or bpj_truncate_utf8_budget, though it never explicitly contrasts with them.

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?

There is no when-to-use guidance, no prerequisites, and no named alternative for related tasks such as byte-length budgeting or offset histograms. The agent must infer applicability from the one-line purpose alone.

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.