Skip to main content
Glama

Get Attachment

keychain_get_attachment
Read-only

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' }],
        };
      },
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=true, which aligns with the 'download' action in the description, so there's no contradiction. The description adds that it returns data 'as base64', providing useful behavioral context beyond annotations. However, it doesn't disclose other traits like error handling, rate limits, or authentication needs, leaving gaps in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It front-loads the core action ('Download an attachment') and includes essential details (source and output format) without redundancy. The parenthetical '(bw get attachment)' adds brief context without disrupting flow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and 0% schema coverage, the description is moderately complete for a simple read operation. It covers the action and output format but lacks details on parameters, error cases, or system behavior. With annotations providing safety context, it meets minimal viability but has clear gaps in guiding effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description mentions 'item' and 'attachment' but doesn't explain what 'itemId' and 'attachmentId' represent, their formats, or how to obtain them. It adds minimal semantic value, failing to compensate for the lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Download an attachment') and resource ('from an item'), making the purpose understandable. It distinguishes from siblings like 'keychain_create_attachment' by focusing on retrieval rather than creation. However, it doesn't explicitly differentiate from other get operations like 'keychain_get_item' or 'keychain_get_password', which slightly reduces specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing valid item and attachment IDs), exclusions, or comparisons to sibling tools like 'keychain_get_item' or 'keychain_send_get'. Usage is implied only by the action described, with no explicit context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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