Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYes
revealNo

Implementation Reference

  • 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);
    }
  • 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' }],
        };
      },
    );

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