Skip to main content
Glama

Generate

keychain_generate
Read-only

Generate a password or passphrase for vault items without altering the vault. Optionally reveal the secret value, with redaction enforced by default.

Instructions

Generate a password or passphrase with bw generate. This never mutates the vault; pass reveal=true to return the value, and NOREVEAL or KEYCHAIN_NOREVEAL force redaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wordsNoPassphrase word count, between 3 and 50.
lengthNoPassword length in characters, between 5 and 256.
numberNoInclude numeric digits when generating a password.
revealNoWhether secret values are returned; default false and can be forced false by NOREVEAL.
specialNoInclude special characters when generating a password.
ambiguousNoAllow ambiguous characters in generated passwords.
lowercaseNoInclude lowercase letters when generating a password.
minNumberNoMinimum number of digits to include.
separatorNoSeparator to use between words in passphrase mode.
uppercaseNoInclude uppercase letters when generating a password.
capitalizeNoCapitalize passphrase words when supported by bw.
minSpecialNoMinimum number of special characters to include.
passphraseNoGenerate a word-based passphrase instead of a password.
includeNumberNoInclude a number in passphrase mode when supported by bw.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.35
    • removedOutput schema / properties / result / properties / value / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / result / properties / value / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed15 schema fields changedv0.2.19
    • addedInput schema / properties / ambiguous / description
      Added value: +"Allow ambiguous characters in generated passwords."
    • addedInput schema / properties / capitalize / description
      Added value: +"Capitalize passphrase words when supported by bw."
    • addedInput schema / properties / includeNumber / description
      Added value: +"Include a number in passphrase mode when supported by bw."
    • addedInput schema / properties / length / description
      Added value: +"Password length in characters, between 5 and 256."
    • addedInput schema / properties / lowercase / description
      Added value: +"Include lowercase letters when generating a password."
    • addedInput schema / properties / minNumber / description
      Added value: +"Minimum number of digits to include."
    • addedInput schema / properties / minSpecial / description
      Added value: +"Minimum number of special characters to include."
    • addedInput schema / properties / number / description
      Added value: +"Include numeric digits when generating a password."
    • addedInput schema / properties / passphrase / description
      Added value: +"Generate a word-based passphrase instead of a password."
    • addedInput schema / properties / reveal / description
      Added value: +"Whether secret values are returned; default false and can be forced false by NOREVEAL."
    • addedInput schema / properties / separator / description
      Added value: +"Separator to use between words in passphrase mode."
    • addedInput schema / properties / special / description
      Added value: +"Include special characters when generating a password."
    • addedInput schema / properties / uppercase / description
      Added value: +"Include uppercase letters when generating a password."
    • addedInput schema / properties / words / description
      Added value: +"Passphrase word count, between 3 and 50."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "result": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "kind": {
      +          "const": "generated",
      +          "type": "string"
      +        },
      +        "revealed": {
      +          "type": "boolean"
      +        },
      +        "value": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "value",
      +        "revealed"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object"
      +}
  3. Addedv0.1.20

TDQS

A4.4/5.0
Behavior5/5

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

The description reinforces the readOnlyHint annotation by stating 'This never mutates the vault' and adds important behavior about reveal=true returning values and NOREVEAL/KEYCHAIN_NOREVEAL forcing redaction. This goes beyond the structured annotations and gives the agent critical secret-handling context.

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 two sentences with no filler. It front-loads what the tool does, then adds the safety and reveal behavior, every sentence earning its place.

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

Completeness4/5

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

Given the output schema and 100% parameter coverage, the description covers the critical behavioral aspects: read-only operation and secret redaction. It is mostly complete, though it could be improved by explicitly routing username generation to keychain_generate_username.

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 input schema already documents all 14 parameters. The description adds minor extra context around reveal and the KEYCHAIN_NOREVEAL environment variable, but it does not meaningfully explain the broader parameter set beyond what the schema 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 states a specific verb and resource: 'Generate a password or passphrase with bw generate.' This clearly distinguishes the tool from sibling keychain_generate_username by naming password/passphrase generation as its scope.

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

Usage Guidelines4/5

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

The description clearly implies this tool is for password or passphrase generation, and the sibling keychain_generate_username covers usernames, but it does not explicitly say 'use X for usernames' or provide when-not-to-use guidance. The context is clear, but there are no explicit exclusions or alternatives stated.

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