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
| Name | Required | Description | Default |
|---|---|---|---|
| term | Yes |
Implementation Reference
- src/tools/registerTools.ts:1129-1151 (handler)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' }], }; }, );