Table of Contents

Method CreateImage

Namespace
Sisk.ModelContextProtocol
Assembly
Sisk.ModelContextProtocol.dll

CreateImage(ReadOnlySpan<byte>, string)

Creates an image-based result for an MCP tool.

public static McpToolResult CreateImage(ReadOnlySpan<byte> imageBytes, string mimeType = "image/png")

Parameters

imageBytes ReadOnlySpan<byte>

The byte array representing the image data.

mimeType string

The MIME type of the image (e.g., "image/png"). Defaults to "image/png".

Returns

McpToolResult

An McpToolResult representing an image result.