keychain_get_item
Retrieve a specific vault item from your Bitwarden or Vaultwarden password manager by its unique identifier, with options to reveal or redact sensitive data.
Instructions
Get a vault item by id.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| reveal | No |
Implementation Reference
- src/sdk/keychainSdk.ts:1104-1115 (handler)The implementation of getItem in KeychainSdk, which corresponds to the keychain_get_item tool.
async getItem(id: string, opts: { reveal?: boolean } = {}): Promise<unknown> { const item = await this.bw.withSession(async (session) => { const { stdout } = await this.bw.runForSession( session, ['get', 'item', id], { timeoutMs: 60_000 }, ); return this.parseBwJson(stdout); }); return this.maybeRedact(item, opts.reveal); } - src/tools/registerTools.ts:562-584 (registration)Registration of the tool keychain_get_item (referred to as .get_item in the code).
registerTool( `${deps.toolPrefix}.get_item`, { title: 'Get Item', description: 'Get a vault item by id.', annotations: { readOnlyHint: true }, inputSchema: { id: z.string(), reveal: z.boolean().optional(), }, _meta: toolMeta, }, async (input, extra) => { const sdk = await deps.getSdk(extra.authInfo); const item = await sdk.getItem(input.id, { reveal: effectiveReveal(input), }); return { structuredContent: { item }, content: [{ type: 'text', text: 'OK' }], }; }, );