Skip to main content
Glama

Generate

keychain_generate
Read-only

Generate secure passwords or passphrases for Bitwarden vaults with customizable character types, length, and complexity options.

Instructions

Generate a password/passphrase (bw generate). Returning the value requires reveal=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uppercaseNo
lowercaseNo
numberNo
specialNo
passphraseNo
lengthNo
wordsNo
minNumberNo
minSpecialNo
separatorNo
capitalizeNo
includeNumberNo
ambiguousNo
revealNo

Implementation Reference

  • Registration of the 'generate' tool (often referenced as keychain_generate, but registered as ${prefix}.generate in code).
    registerTool(
      `${deps.toolPrefix}.generate`,
      {
        title: 'Generate',
        description:
          'Generate a password/passphrase (bw generate). Returning the value requires reveal=true.',
        annotations: { readOnlyHint: true },
        inputSchema: {
          uppercase: z.boolean().optional(),
          lowercase: z.boolean().optional(),
          number: z.boolean().optional(),
          special: z.boolean().optional(),
          passphrase: z.boolean().optional(),
          length: z.number().int().min(5).max(256).optional(),
          words: z.number().int().min(3).max(50).optional(),
          minNumber: z.number().int().min(0).max(50).optional(),
          minSpecial: z.number().int().min(0).max(50).optional(),
          separator: z.string().optional(),
          capitalize: z.boolean().optional(),
          includeNumber: z.boolean().optional(),
          ambiguous: z.boolean().optional(),
          reveal: z.boolean().optional(),
        },
        _meta: toolMeta,
      },
      async (input, extra) => {
        const sdk = await deps.getSdk(extra.authInfo);
        const result = await sdk.generate(clampReveal(input));
        return {
          structuredContent: toolResult(
            'generated',
            result.value,
            result.revealed,
          ),
          content: [{ type: 'text', text: 'OK' }],
        };
      },
    );
  • The implementation of the generate logic, which calls the underlying bw CLI.
    async generate(
      input: GenerateInput & { reveal?: boolean } = {},
    ): Promise<{ value: string | null; revealed: boolean }> {
      if (!input.reveal) return this.valueResult(null, false);
    
      const args = buildBwGenerateArgs(input);
      const { stdout } = await this.bw.withSession(async (session) =>
        this.bw.runForSession(session, args, { timeoutMs: 30_000 }),
      );
      return this.valueResult(stdout.trim(), true);
    }
Behavior3/5

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

The annotation 'readOnlyHint': true indicates this is a safe read operation, which aligns with the description's focus on generation (a creation-like action that doesn't modify existing data). The description adds value by specifying that 'reveal=true' is required to return the generated value, which is a behavioral constraint not covered by annotations. However, it lacks details on rate limits, error conditions, or how the generation interacts with the system (e.g., whether the password is stored).

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?

The description is very concise—just two short sentences. It front-loads the core purpose and follows with a key behavioral note. There's no wasted text, though it could benefit from slightly more detail given the complexity of the tool.

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

Completeness2/5

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

Given the high complexity (14 parameters, 0% schema coverage, no output schema), the description is inadequate. It doesn't explain what the tool returns (beyond the need for 'reveal'), how parameters affect generation (e.g., 'passphrase' vs. 'length'), or any dependencies. The annotations help with safety, but overall completeness is poor for such a parameter-rich tool.

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

Parameters1/5

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

With 14 parameters and 0% schema description coverage, the schema provides no descriptions for any parameters. The tool description mentions 'reveal' implicitly but doesn't explain its purpose or any other parameters (e.g., 'uppercase', 'length', 'passphrase'). This leaves most parameters undocumented, failing to compensate for the low schema coverage.

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?

The description clearly states the tool's purpose: 'Generate a password/passphrase (bw generate).' It specifies the verb ('generate') and resource ('password/passphrase'), and the parenthetical '(bw generate)' provides additional context. However, it doesn't explicitly differentiate this generation tool from sibling tools like 'keychain_generate_username' or 'keychain_encode', which are also generation-related.

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?

The description provides minimal usage guidance: 'Returning the value requires reveal=true.' This indicates a prerequisite for output visibility but doesn't explain when to use this tool versus alternatives (e.g., 'keychain_generate_username' for usernames or 'keychain_get_password' for retrieving existing passwords). No context on when this generation is appropriate or any exclusions are 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/icoretech/warden-mcp'

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