mcp-use TypeScript API
    Preparing search index...

    Function binary

    Prefer raw CallToolResult, ReadResourceResult, or GetPromptResult returns. These helpers remain for upgrade compatibility and map to the official wire envelopes.

    • Create a binary payload carried as base64 text.

      Parameters

      • base64Data: string

        Base64-encoded bytes.

      • mimeType: string

        MIME type of the binary payload.

      Returns ToolContentResult

      Tool result with base64 text and binary MIME metadata.

      Prefer a raw CallToolResult with an appropriate content block, or a resource { contents: [{ uri, mimeType, blob }] }.