MCP Apps
    Preparing search index...

    Variable McpUiDownloadFileRequestSchemaConst

    McpUiDownloadFileRequestSchema: ZodObject<
        {
            method: ZodLiteral<"ui/download-file">;
            params: ZodObject<
                {
                    contents: ZodArray<
                        ZodUnion<
                            readonly [
                                ZodObject<
                                    {
                                        _meta: ZodOptional<ZodRecord<(...), (...)>>;
                                        annotations: ZodOptional<ZodObject<(...), (...)>>;
                                        resource: ZodUnion<readonly [(...), (...)]>;
                                        type: ZodLiteral<"resource">;
                                    },
                                    $strip,
                                >,
                                ZodObject<
                                    {
                                        _meta: ZodOptional<ZodObject<(...), (...)>>;
                                        annotations: ZodOptional<ZodObject<(...), (...)>>;
                                        description: ZodOptional<ZodString>;
                                        icons: ZodOptional<ZodArray<(...)>>;
                                        mimeType: ZodOptional<ZodString>;
                                        name: ZodString;
                                        title: ZodOptional<ZodString>;
                                        type: ZodLiteral<"resource_link">;
                                        uri: ZodString;
                                    },
                                    $strip,
                                >,
                            ],
                        >,
                    >;
                },
                $strip,
            >;
        },
        $strip,
    > = ...

    Request to download a file through the host.

    Sent from the View to the Host when the app wants to trigger a file download. Since MCP Apps run in sandboxed iframes where direct downloads are blocked, this provides a host-mediated mechanism for file exports. The host SHOULD show a confirmation dialog before initiating the download.

    App.downloadFile for the method that sends this request