Skip to main content
Glama

keychain_get_collection

Retrieve a specific Bitwarden collection by its ID to access grouped vault items. Use this tool to fetch collection details from your secure password manager.

Instructions

Get a collection by id (bw get collection).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
organizationIdNo

Implementation Reference

  • The implementation of `getCollection` which calls `bw get collection`.
    async getCollection(input: {
      id: string;
      organizationId?: string;
    }): Promise<unknown> {
      return this.bw.withSession(async (session) => {
        const args: string[] = ['get', 'collection', input.id];
        if (input.organizationId)
          args.push('--organizationid', input.organizationId);
        const { stdout } = await this.bw.runForSession(session, args, {
          timeoutMs: 60_000,
        });
        return this.parseBwJson(stdout);
      });
    }
  • The registration of the `get_collection` tool.
      `${deps.toolPrefix}.get_collection`,
      {
        title: 'Get Collection',
        description: 'Get a collection by id (bw get collection).',
        annotations: { readOnlyHint: true },
        inputSchema: {
          id: z.string(),
          organizationId: z.string().optional(),
        },
        _meta: toolMeta,
      },
      async (input, extra) => {
        const sdk = await deps.getSdk(extra.authInfo);
        const collection = await sdk.getCollection(input);
        return {
          structuredContent: { collection },
          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