UNPKG

xmcp

Version:

The TypeScript MCP framework

56 lines (55 loc) • 1.74 kB
/** Read an image file as an MCP content block. The MIME type is explicit. */ export declare function imageFromFile(path: string | URL, mimeType: string): Promise<{ type: "image"; data: string; mimeType: string; annotations?: { audience?: ("user" | "assistant")[] | undefined; priority?: number | undefined; lastModified?: string | undefined; } | undefined; _meta?: { [x: string]: unknown; } | undefined; }>; /** Read an audio file as an MCP content block. The MIME type is explicit. */ export declare function audioFromFile(path: string | URL, mimeType: string): Promise<{ type: "audio"; data: string; mimeType: string; annotations?: { audience?: ("user" | "assistant")[] | undefined; priority?: number | undefined; lastModified?: string | undefined; } | undefined; _meta?: { [x: string]: unknown; } | undefined; }>; /** Read a file into a base64 resource blob with the supplied resource URI. */ export declare function embeddedResourceFromFile(path: string | URL, uri: string, mimeType?: string): Promise<{ type: "resource"; resource: { uri: string; text: string; mimeType?: string | undefined; _meta?: { [x: string]: unknown; } | undefined; } | { uri: string; blob: string; mimeType?: string | undefined; _meta?: { [x: string]: unknown; } | undefined; }; annotations?: { audience?: ("user" | "assistant")[] | undefined; priority?: number | undefined; lastModified?: string | undefined; } | undefined; _meta?: { [x: string]: unknown; } | undefined; }>;