Skip to main content
Glama
paladini

devutils-mcp-server

generate_password

Create secure random passwords with customizable length, character types, and multiple generation options for enhanced security.

Instructions

Generate a secure random password with configurable options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lengthNoPassword length (4-256, default: 16)
uppercaseNoInclude uppercase letters (default: true)
lowercaseNoInclude lowercase letters (default: true)
numbersNoInclude numbers (default: true)
symbolsNoInclude symbols (default: true)
countNoNumber of passwords to generate (1-50)

Implementation Reference

  • The generate_password tool registration and handler implementation. It uses `server.tool` to define the schema and the async handler logic, including password generation based on character constraints.
    server.tool(
      "generate_password",
      "Generate a secure random password with configurable options.",
      {
        length: z
          .number()
          .int()
          .min(4)
          .max(256)
          .default(16)
          .describe("Password length (4-256, default: 16)"),
        uppercase: z
          .boolean()
          .default(true)
          .describe("Include uppercase letters (default: true)"),
        lowercase: z
          .boolean()
          .default(true)
          .describe("Include lowercase letters (default: true)"),
        numbers: z
          .boolean()
          .default(true)
          .describe("Include numbers (default: true)"),
        symbols: z
          .boolean()
          .default(true)
          .describe("Include symbols (default: true)"),
        count: z
          .number()
          .int()
          .min(1)
          .max(50)
          .default(1)
          .describe("Number of passwords to generate (1-50)"),
      },
      async ({ length, uppercase, lowercase, numbers, symbols, count }) => {
        let charset = "";
        if (uppercase) charset += "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        if (lowercase) charset += "abcdefghijklmnopqrstuvwxyz";
        if (numbers) charset += "0123456789";
        if (symbols) charset += "!@#$%^&*()_+-=[]{}|;:,.<>?";
    
        if (charset.length === 0) {
          return {
            content: [
              {
                type: "text" as const,
                text: "Error: At least one character type must be enabled",
              },
            ],
            isError: true,
          };
        }
    
        const passwords = Array.from({ length: count }, () => {
          const bytes = randomBytes(length);
          return Array.from(bytes)
            .map((b) => charset[b % charset.length])
            .join("");
        });
    
        return {
          content: [{ type: "text" as const, text: passwords.join("\n") }],
        };
      }
    );
Behavior3/5

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

States 'secure' and 'random' implying cryptographic quality, but lacks details on entropy source, algorithm, or side effects. No annotations provided to fill gaps. Does not disclose whether passwords are stored, logged, or purely ephemeral.

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?

Single sentence with no redundancy. However, given zero annotations and six parameters, the brevity leaves gaps in behavioral disclosure that should have been filled with additional sentences.

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?

Input parameters are well-documented in schema, but without an output schema, the description fails to specify return format (single string vs array). Missing behavioral context expected for a security-critical generation tool.

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 has 100% description coverage, so structured fields carry the full semantic load. Description mentions 'configurable options' as vague acknowledgment but adds no syntax details, validation rules, or inter-parameter constraints beyond the schema.

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?

Clear verb ('Generate') and resource ('password') with quality modifiers ('secure random'). However, it does not distinguish from sibling generators like generate_nanoid or generate_uuid, which also produce random strings.

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

Usage Guidelines2/5

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

No guidance provided on when to use this tool versus alternatives (e.g., generate_nanoid for URL-safe IDs, generate_random_hex for hexadecimal keys). No prerequisites or exclusions mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paladini/devutils-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server