Skip to main content
Glama

Decodificar KSUID

ksuid-decode
Read-onlyIdempotent

Decodifica un KSUID de 27 caracteres en fecha y payload de 128 bits. Cuándo: hay que generar un identificador en este formato o leer los campos que lleva dentro. No para: validar un ULID y extraer su marca de tiempo y la parte aleatoria (ulid-decode). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Decodes a 27-char base62 KSUID into its timestamp (epoch 1400000000) and 128-bit payload. When: an identifier has to be generated in this format or its embedded fields decoded. Not for: validating a ULID and extracting its timestamp (ulid-decode). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.

Input Schema

NameRequiredDescriptionDefault
ksuidYesKSUID (string; required; up to 40 chars).

Output Schema

NameRequiredDescriptionDefault
validNo
timestampNo
payload_hexNo
timestamp_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / ksuid / examples
      Added value: +[
      +  "0ujtsYcgvSTl8PAuAdqWYSMnLOv"
      +]
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, not-open-world, idempotent and non-destructive, and the description largely restates those ('read-only, no network access, no stored state', 'deterministic'). It earns credit for the operational limits the annotations do not carry: 64 KB JSON input, 1 s per call, 1 MB result cap.

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?

Well front-loaded with labeled sections (Cuándo / No para / Efectos / Límites), but the entire content is duplicated in Spanish and English, roughly doubling token cost for zero additional information. The duplicate generation hint also adds noise.

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?

An output schema exists, so return values need not be explained; the description covers side effects, determinism and resource limits, which is enough for a single-parameter decoder. The only incompleteness is the inaccurate mention of generation, which could mislead an agent into calling this to create a KSUID.

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 coverage is 100% for the single required parameter, so the baseline is 3. The description goes beyond the schema's bare 'string up to 40 chars' by specifying base62 encoding and the canonical 27-character length, which tells an agent what a valid value actually looks like.

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 and resource with the concrete output shape: decoding a 27-char base62 KSUID into its timestamp (epoch 1400000000) and 128-bit payload. It is clearly distinguishable from ulid-decode, which it names. Minor deduction: the 'When' clause mentions generating an identifier in this format, which this tool does not do.

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?

Explicitly provides both a 'When' and a 'Not for' clause, naming the alternative tool (ulid-decode) and the task it covers (ULID timestamp/randomness extraction). The routing is concrete rather than implied, though the generation use case is misattributed and no other decode siblings (objectid-decode, snowflake-decode) are acknowledged.

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