Skip to main content
Glama

nanoid

Generate NanoID strings of a chosen length, with the entropy per id. Pure CPU, instant. Use for short, collision-safe ids.

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": {
      "count": "<count>"
    },
    "name": "nanoid"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoLength (default 21)
countYesHow many ids

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / count
      Added value: +{
      +  "description": "How many ids",
      +  "type": "integer"
      +}
    • addedInput schema / properties / size
      Added value: +{
      +  "description": "Length (default 21)",
      +  "type": "integer"
      +}
    • addedInput schema / required
      Added value: +[
      +  "count"
      +]
  4. Added

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose useful behavior: "Pure CPU, instant" tells the agent there is no network call, no side effects and no latency cost. It stops short of stating the return shape (array vs newline-joined string), whether an id can be truncated, or any cap on count for large requests.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with what is generated, followed by the performance characteristic and the use case. No filler, no restatement of the tool name, and each clause adds information an agent can act on.

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 two-parameter pure generator this is close to adequate, and no output schema exists so return-value detail is the description's responsibility. The phrase "with the entropy per id" is ambiguous about how entropy is surfaced in the response, and nothing warns about behavior at high count values.

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 description coverage is 100%, so both parameters (size, count) are already documented with their defaults, and the description adds nothing beyond restating 'chosen length'. The mention of entropy per id is about output rather than an input, so the baseline 3 applies.

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 ("Generate NanoID strings") plus the scope of what is configurable (length) and what accompanies the output (entropy per id). It lets an agent distinguish this from generic random generators, though it never names the closest siblings (uuid, ulid, generate_uuid, random_number) to sharpen the contrast.

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

Usage Guidelines3/5

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

"Use for short, collision-safe ids" supplies a positive trigger condition, so the intended use case is inferable. However, there is no explicit when-not guidance and no routing to alternatives like uuid (longer, standard format) or random_number, which is exactly where an agent hesitates given the crowded sibling set.

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