Skip to main content
Glama

Construir ID Snowflake

snowflake-encode
Read-onlyIdempotent

Construye un ID Snowflake (estilo Twitter 41/10/12 bits) desde marca de tiempo, máquina y secuencia. Cuándo: hay que generar un identificador en este formato o leer los campos que lleva dentro. No para: decodificar un ID Snowflake en su marca de tiempo y sus partes (snowflake-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: Builds a 64-bit Snowflake ID (Twitter-style 41/10/12 bit layout) from a timestamp, machine ID and sequence, for a given epoch. When: an identifier has to be generated in this format or its embedded fields decoded. Not for: decoding a Snowflake ID into its timestamp and parts (snowflake-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
epoch_msNoEpoch ms (default Twitter 1288834974657) (integer; optional; default 1288834974657; min 0; max 8640000000000000).
sequenceNo0-4095 (integer; optional; default 0; min 0; max 4095).
machine_idNo0-1023 (integer; optional; default 0; min 0; max 1023).
timestamp_msYesUnix ms (integer; required; min 0; max 8640000000000000).

Output Schema

NameRequiredDescriptionDefault
idNo

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so the bar is lower. The description still adds real context beyond them: no network access, no stored state, determinism of output, and concrete limits (64 KB JSON input, 1 s per call, 1 MB result).

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?

Front-loaded with purpose, then when/not-for, then side effects and limits – a clean, scannable order. The content is duplicated verbatim in Spanish and English, which doubles length without adding information for a single agent.

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?

An output schema exists, so return values need no explanation. Between the description, annotations and schema, an agent has everything needed to call this correctly: purpose, exclusions, determinism, side effects and operational limits.

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%, so the baseline is 3, but the description adds meaning: it names the inputs (timestamp, machine, sequence, epoch) and ties them to the 41/10/12 bit layout, which explains why machine_id and sequence have their ranges. It does not restate defaults or bounds, which the schema already carries.

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 and artifact: builds a 64-bit Snowflake ID with an explicit 41/10/12 bit layout from timestamp, machine ID and sequence. It also names the sibling it is not (snowflake-decode), so an agent can separate construction from decoding without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Has explicit "Cuándo" (generate an ID in this format or read its embedded fields) and an explicit "No para" that routes decoding work to snowflake-decode. The alternative and the condition selecting it are both named.

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