Skip to main content
Glama

keychain_delete_item

Remove a stored credential from your Bitwarden vault by specifying its ID. Choose between soft deletion for recovery or permanent deletion for complete removal.

Instructions

Delete an item by id (soft-delete by default; set permanent=true to hard delete).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
permanentNo

Implementation Reference

  • The 'deleteItem' method in KeychainSdk handles the logic for deleting a Bitwarden item, supporting both soft-delete (default) and hard-delete (permanent=true).
    async deleteItem(input: { id: string; permanent?: boolean }): Promise<void> {
      return this.bw.withSession(async (session) => {
        if (this.syncOnWrite()) {
          await this.bw
            .runForSession(session, ['sync'], { timeoutMs: 120_000 })
            .catch(() => {});
        }
    
        const args = ['delete', 'item', input.id];
        if (input.permanent) args.push('--permanent');
        await this.bw.runForSession(session, args, { timeoutMs: 60_000 });
      });
    }
  • The 'delete_item' MCP tool implementation in registerTools.ts, which invokes the 'deleteItem' method from the KeychainSdk.
    registerTool(
      `${deps.toolPrefix}.delete_folder`,
      {
        title: 'Delete Folder',
        description: 'Delete a Bitwarden folder (personal).',
        inputSchema: {
          id: z.string(),
        },
        _meta: toolMeta,
      },
      async (input, extra) => {
        if (isReadOnly) return readonlyBlocked();
        const sdk = await deps.getSdk(extra.authInfo);
        await sdk.deleteFolder(input);
        return {
          structuredContent: { ok: true },
          content: [{ type: 'text', text: 'Deleted.' }],
        };
      },
    );

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