Skip to main content
Glama

TinyFn

random_bytes

Generate cryptographically secure random bytes.

Input Schema

NameRequiredDescriptionDefault
lengthNoNumber of bytes
encodingNoOutput encoding: hex, base64hex

Output Schema

NameRequiredDescriptionDefault
bytesYes
valueYes
encodingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / $defs / RandomBytesResponse
      Added value: +{
      +  "properties": {
      +    "bytes": {
      +      "title": "Bytes",
      +      "type": "integer"
      +    },
      +    "encoding": {
      +      "title": "Encoding",
      +      "type": "string"
      +    },
      +    "value": {
      +      "title": "Value",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes",
      +    "encoding",
      +    "value"
      +  ],
      +  "title": "RandomBytesResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__crypto_utils__RandomBytesResponse
      Removed value: -{
      -  "properties": {
      -    "bytes": {
      -      "title": "Bytes",
      -      "type": "integer"
      -    },
      -    "encoding": {
      -      "title": "Encoding",
      -      "type": "string"
      -    },
      -    "value": {
      -      "title": "Value",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "bytes",
      -    "encoding",
      -    "value"
      -  ],
      -  "title": "RandomBytesResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__crypto_utils__RandomBytesResponse"New value: +"RandomBytesResponse"
  2. Changed3 schema fields changed
    • removedOutput schema / $defs / RandomBytesResponse
      Removed value: -{
      -  "properties": {
      -    "bytes": {
      -      "title": "Bytes",
      -      "type": "integer"
      -    },
      -    "encoding": {
      -      "title": "Encoding",
      -      "type": "string"
      -    },
      -    "value": {
      -      "title": "Value",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "bytes",
      -    "encoding",
      -    "value"
      -  ],
      -  "title": "RandomBytesResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__crypto_utils__RandomBytesResponse
      Added value: +{
      +  "properties": {
      +    "bytes": {
      +      "title": "Bytes",
      +      "type": "integer"
      +    },
      +    "encoding": {
      +      "title": "Encoding",
      +      "type": "string"
      +    },
      +    "value": {
      +      "title": "Value",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes",
      +    "encoding",
      +    "value"
      +  ],
      +  "title": "RandomBytesResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"RandomBytesResponse"New value: +"app__routers__crypto_utils__RandomBytesResponse"
  3. Changed3 schema fields changed
    • addedOutput schema / $defs / RandomBytesResponse
      Added value: +{
      +  "properties": {
      +    "bytes": {
      +      "title": "Bytes",
      +      "type": "integer"
      +    },
      +    "encoding": {
      +      "title": "Encoding",
      +      "type": "string"
      +    },
      +    "value": {
      +      "title": "Value",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes",
      +    "encoding",
      +    "value"
      +  ],
      +  "title": "RandomBytesResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__crypto_utils__RandomBytesResponse
      Removed value: -{
      -  "properties": {
      -    "bytes": {
      -      "title": "Bytes",
      -      "type": "integer"
      -    },
      -    "encoding": {
      -      "title": "Encoding",
      -      "type": "string"
      -    },
      -    "value": {
      -      "title": "Value",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "bytes",
      -    "encoding",
      -    "value"
      -  ],
      -  "title": "RandomBytesResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__crypto_utils__RandomBytesResponse"New value: +"RandomBytesResponse"
  4. Changed3 schema fields changed
    • removedOutput schema / $defs / RandomBytesResponse
      Removed value: -{
      -  "properties": {
      -    "bytes": {
      -      "title": "Bytes",
      -      "type": "integer"
      -    },
      -    "encoding": {
      -      "title": "Encoding",
      -      "type": "string"
      -    },
      -    "value": {
      -      "title": "Value",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "bytes",
      -    "encoding",
      -    "value"
      -  ],
      -  "title": "RandomBytesResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__crypto_utils__RandomBytesResponse
      Added value: +{
      +  "properties": {
      +    "bytes": {
      +      "title": "Bytes",
      +      "type": "integer"
      +    },
      +    "encoding": {
      +      "title": "Encoding",
      +      "type": "string"
      +    },
      +    "value": {
      +      "title": "Value",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes",
      +    "encoding",
      +    "value"
      +  ],
      +  "title": "RandomBytesResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"RandomBytesResponse"New value: +"app__routers__crypto_utils__RandomBytesResponse"
  5. Changed3 schema fields changed
    • addedOutput schema / $defs / RandomBytesResponse
      Added value: +{
      +  "properties": {
      +    "bytes": {
      +      "title": "Bytes",
      +      "type": "integer"
      +    },
      +    "encoding": {
      +      "title": "Encoding",
      +      "type": "string"
      +    },
      +    "value": {
      +      "title": "Value",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes",
      +    "encoding",
      +    "value"
      +  ],
      +  "title": "RandomBytesResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__crypto_utils__RandomBytesResponse
      Removed value: -{
      -  "properties": {
      -    "bytes": {
      -      "title": "Bytes",
      -      "type": "integer"
      -    },
      -    "encoding": {
      -      "title": "Encoding",
      -      "type": "string"
      -    },
      -    "value": {
      -      "title": "Value",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "bytes",
      -    "encoding",
      -    "value"
      -  ],
      -  "title": "RandomBytesResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__crypto_utils__RandomBytesResponse"New value: +"RandomBytesResponse"
  6. Changed3 schema fields changed
    • removedOutput schema / $defs / RandomBytesResponse
      Removed value: -{
      -  "properties": {
      -    "bytes": {
      -      "title": "Bytes",
      -      "type": "integer"
      -    },
      -    "encoding": {
      -      "title": "Encoding",
      -      "type": "string"
      -    },
      -    "value": {
      -      "title": "Value",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "bytes",
      -    "encoding",
      -    "value"
      -  ],
      -  "title": "RandomBytesResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__crypto_utils__RandomBytesResponse
      Added value: +{
      +  "properties": {
      +    "bytes": {
      +      "title": "Bytes",
      +      "type": "integer"
      +    },
      +    "encoding": {
      +      "title": "Encoding",
      +      "type": "string"
      +    },
      +    "value": {
      +      "title": "Value",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes",
      +    "encoding",
      +    "value"
      +  ],
      +  "title": "RandomBytesResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"RandomBytesResponse"New value: +"app__routers__crypto_utils__RandomBytesResponse"
  7. Changed3 schema fields changed
    • addedOutput schema / $defs / RandomBytesResponse
      Added value: +{
      +  "properties": {
      +    "bytes": {
      +      "title": "Bytes",
      +      "type": "integer"
      +    },
      +    "encoding": {
      +      "title": "Encoding",
      +      "type": "string"
      +    },
      +    "value": {
      +      "title": "Value",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes",
      +    "encoding",
      +    "value"
      +  ],
      +  "title": "RandomBytesResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__crypto_utils__RandomBytesResponse
      Removed value: -{
      -  "properties": {
      -    "bytes": {
      -      "title": "Bytes",
      -      "type": "integer"
      -    },
      -    "encoding": {
      -      "title": "Encoding",
      -      "type": "string"
      -    },
      -    "value": {
      -      "title": "Value",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "bytes",
      -    "encoding",
      -    "value"
      -  ],
      -  "title": "RandomBytesResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__crypto_utils__RandomBytesResponse"New value: +"RandomBytesResponse"
  8. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The description adds the 'cryptographically secure' behavioral trait beyond the input schema, but with no annotations, it omits details about potential blocking behavior or entropy requirements.

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?

The description is a single sentence that conveys the essential information without any extraneous content.

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 simple and has an output schema (not shown but exists); the description combined with the schema provides sufficient context for this straightforward operation.

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 the description adds no new parameter semantics beyond what the schema already provides.

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?

The description 'Generate cryptographically secure random bytes' uses a specific verb ('Generate') and resource ('cryptographically secure random bytes'), which differentiates it from sibling tools like random_bytes_2 that may not emphasize security.

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?

The description implies use when cryptographically secure randomness is needed but does not specify when not to use or explicitly mention alternatives like random_bytes_2 or random_integer.

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.