Skip to main content
Glama

keychain_get_username

Retrieve login usernames from Bitwarden vaults by searching with a specific term, enabling secure credential access for AI agents.

Instructions

Get a login username by search term (bw get username).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termYes

Implementation Reference

  • The handler for the tool `get_username` which uses the keychain SDK to retrieve a username.
      `${deps.toolPrefix}.get_username`,
      {
        title: 'Get Username',
        description: 'Get a login username by search term (bw get username).',
        annotations: { readOnlyHint: true },
        inputSchema: {
          term: z.string(),
        },
        _meta: toolMeta,
      },
      async (input, extra) => {
        const sdk = await deps.getSdk(extra.authInfo);
        const username = await sdk.getUsername(input);
        return {
          structuredContent: toolResult(
            'username',
            username.value,
            username.revealed,
          ),
          content: [{ type: 'text', text: 'OK' }],
        };
      },
    );

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