Skip to main content
Glama

util_cbor

Read-only

CBOR decode / encode (RFC 8949) — Decode CBOR to JSON plus diagnostic notation, or encode JSON to deterministic CBOR. Decode: data= hex/base64/base64url (sequence=true for CBOR sequences, RFC 8742); all major types incl. indefinite lengths, half/single/double floats, simple values and tags (epoch time to ISO, bignums to decimal strings, UUID, embedded CBOR, COSE names); byte strings become {$bytes:hex}. Reports deterministic-encoding problems (non-shortest heads, unsorted or duplicate map keys, indefinite lengths, oversized floats), tags used and depth. Recognizes COSE keys (kty/alg/crv with x/y/n/e as base64url) and WebAuthn attestationObjects (fmt, rpIdHash, flags UP/UV/BE/BS/AT/ED, signCount, AAGUID, credential id and public key). Encode: mode=encode&json= (use {$bytes:hex} and {$tag:n,value:v}) returns hex/base64/base64url in RFC 8949 core deterministic form. Max 200,000 bytes; errors return 422 with an offset. Price: $0.002 USDC (Base, via x402).

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": {
      "data": "<data>"
    },
    "name": "util_cbor"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesa26161016162820203

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Far exceeds the annotations: it discloses the output representation (byte strings become {$bytes:hex}), the diagnostic checks reported, supported CBOR types and tag conversions, the 200,000-byte ceiling, that errors return 422 with an offset, and importantly the paid x402 pricing/currency. The readOnlyHint=true annotation is consistent with a pure transformation tool.

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?

Purpose and mode are front-loaded, and nearly every clause carries unique information (limits, error shape, pricing, supported types). The text is a dense, run-on block with semicolon-separated lists, which costs readability but not substance.

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

Completeness4/5

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

With one parameter and no output schema, the description supplies return format, error behavior, size limits, and cost — enough to call it correctly for the decode path. The gap is that encode-mode parameters described in prose are absent from the schema, leaving an inconsistency an agent could trip over.

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?

The schema's only parameter "data" is documented solely by an example value, so the description carries the real semantic load by defining accepted encodings (hex/base64/base64url) and the {$bytes:hex}/{$tag:n,value:v} conventions for encoding. It loses a point because it references inputs (mode, json, sequence, encoding selector) that are not present in the input schema, which could mislead an agent.

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?

Opens with a specific verb+resource pair ("CBOR decode / encode (RFC 8949)") and immediately distinguishes the two directions: decode to JSON plus diagnostic notation, or encode JSON to deterministic CBOR. An agent knows exactly what capability this tool provides without inspecting 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 Guidelines4/5

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

Gives clear in-tool branching — "Decode: data=..." versus "Encode: mode=encode&json=..." — so the agent knows which mode to request and what inputs each needs. It does not name alternatives (e.g. util_base64 for base64 work) or state when not to use it, so it falls short of full when/when-not guidance.

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