Skip to main content
Glama

Decodificar ID Snowflake

snowflake-decode
Read-onlyIdempotent

Decodifica un ID Snowflake de 64 bits (Twitter/X, Discord o época propia) en fecha, trabajador y secuencia. Cuándo: hay que generar un identificador en este formato o leer los campos que lleva dentro. No para: construir un ID Snowflake (snowflake-encode). 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 64-bit Snowflake ID into timestamp, worker/process and sequence using the Twitter/X or Discord layout and epoch, or a custom epoch. When: an identifier has to be generated in this format or its embedded fields decoded. Not for: building a 64-bit Snowflake ID (snowflake-encode). 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
idYesSnowflake ID as decimal string (string; required; pattern ^\d{1,20}$).
flavorNoLayout/epoch (optional; one of: twitter, discord, custom; default "twitter").twitter
epoch_msNoCustom epoch (ms) when flavor=custom (integer; optional; min 0; max 4102444800000).

Output Schema

NameRequiredDescriptionDefault
sequenceNo
timestampNo
worker_idNo
machine_idNo
process_idNo
timestamp_msNo

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A4.2/5.0
Behavior4/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 covered; the description still adds value by stating no network access, no stored state, determinism, and concrete limits (64 KB input, 1 s per call, 1 MB result). The limit numbers read as generic boilerplate for a tool taking a single decimal string, which keeps it below a 5.

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?

Information is well front-loaded and structurally labeled (when / not-for / side effects / limits). The definition is duplicated verbatim in Spanish and English, so roughly half the text is redundant for any single reader, though that appears to be a deliberate bilingual convention.

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

Completeness5/5

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

The tool is a low-complexity deterministic transform with only three simple parameters, an output schema so return values need no prose explanation, and full annotation coverage. Everything an agent needs to call it correctly — scope, alternative, side effects, limits — is present.

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

Parameters3/5

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

Schema coverage is 100% and the enum is already documented, so the baseline is 3. The description adds modest meaning beyond the schema by explaining that `flavor` selects layout/epoch and that `epoch_ms` applies only to the custom flavor, but it doesn't define the Twitter vs Discord bit layouts or the epoch reference points.

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?

States a specific verb (decodes) and resource (64-bit Snowflake ID) plus the exact outputs it yields: timestamp, worker/process and sequence. It names the encoding layouts (Twitter/X, Discord, custom epoch) and explicitly distinguishes itself from snowflake-encode, so an agent can separate it from the sibling without opening either 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?

The 'Cuándo' / 'No para' pair gives explicit context and names the alternative (snowflake-encode) for the opposite task. However, the 'Cuándo' line also says it applies when 'an identifier has to be generated in this format', which is an encoding task and is then contradicted by the 'Not for: building a 64-bit Snowflake ID' line — a small but real routing ambiguity.

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