Skip to main content
Glama

keychain_get_attachment

Retrieve file attachments from Bitwarden vault items by specifying item and attachment IDs, returning data in base64 format for secure access.

Instructions

Download an attachment from an item and return it as base64 (bw get attachment).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYes
attachmentIdYes

Implementation Reference

  • Handler for the keychain_get_attachment tool, which uses the KeychainSdk to download an attachment.
      `${deps.toolPrefix}.get_attachment`,
      {
        title: 'Get Attachment',
        description:
          'Download an attachment from an item and return it as base64 (bw get attachment).',
        annotations: { readOnlyHint: true },
        inputSchema: {
          itemId: z.string(),
          attachmentId: z.string(),
        },
        _meta: toolMeta,
      },
      async (input, extra) => {
        const sdk = await deps.getSdk(extra.authInfo);
        const attachment = await sdk.getAttachment(input);
        return {
          structuredContent: { attachment },
          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