Skip to main content
Glama

keychain_send_get

Retrieve secure file or text sends from your Bitwarden vault using their unique ID, with options to download files or view text content.

Instructions

Get Sends owned by you. Use text=true to return text content; downloadFile=true to download a file send (bw send get).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
textNo
downloadFileNo

Implementation Reference

  • Registration and tool handler for 'keychain_send_get'. Note the typo in the user prompt: the actual tool name is 'send_get' (with the prefix).
      `${deps.toolPrefix}.send_get`,
      {
        title: 'Send Get',
        description:
          'Get Sends owned by you. Use text=true to return text content; downloadFile=true to download a file send (bw send get).',
        annotations: { readOnlyHint: true, openWorldHint: true },
        inputSchema: {
          id: z.string(),
          text: z.boolean().optional(),
          downloadFile: z.boolean().optional(),
        },
        _meta: toolMeta,
      },
      async (input, extra) => {
        const sdk = await deps.getSdk(extra.authInfo);
        const result = await sdk.sendGet(input);
        return {
          structuredContent: { result },
          content: [{ type: 'text', text: 'OK' }],
        };
      },
    );
  • Actual implementation of 'sendGet' logic within the Keychain SDK.
    async sendGet(input: {
      id: string;
      text?: boolean;
      downloadFile?: boolean;
    }): Promise<unknown> {
      return this.bw.withSession(async (session) => {
        if (input.text) {
          const { stdout } = await this.bw.runForSession(
            session,
            ['--raw', 'send', 'get', input.id, '--text'],
            { timeoutMs: 60_000 },
          );
          return { text: stdout.trim() };
        }
    
        if (input.downloadFile) {
          const dir = await mkdtemp(join(tmpdir(), 'keychain-sendfile-'));
          try {
            await this.bw.runForSession(
              session,
              ['send', 'get', input.id, '--output', dir],
              { timeoutMs: 120_000 },
            );
            const file = await this.readSingleFileAsBase64(dir);
            return { file };
          } finally {
            await rm(dir, { recursive: true, force: true });
          }
        }
    
        const { stdout } = await this.bw.runForSession(
          session,
          ['send', 'get', input.id],
          {
            timeoutMs: 60_000,
          },
        );
        return this.tryParseJson(stdout);
      });
    }

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