New-PodeMcpImageContent
SYNOPSIS
Builds an Image response object for an MCP tool, which can be returned to the client.
SYNTAX
New-PodeMcpImageContent [[-Bytes] <Byte[]>] [-MimeType] <String> [-ProgressAction <ActionPreference>]
[<CommonParameters>]
DESCRIPTION
This function creates a hashtable representing an image response for an MCP tool. The hashtable includes a 'type' key with the value 'image', a 'data' key containing the base64-encoded image data, and a 'mimeType' key specifying the MIME type of the image.
EXAMPLES
EXAMPLE 1
# create an image response for an MCP tool
$imageBytes = [System.IO.File]::ReadAllBytes('path\to\image.png')
New-PodeMcpImageContent -Bytes $imageBytes -MimeType 'image/png'
PARAMETERS
-Bytes
The byte array representing the image data.
Type: Byte[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MimeType
The MIME type of the image.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.