Skip to content

New-PodeMcpAudioContent

SYNOPSIS

Builds an Audio response object for an MCP tool, which can be returned to the client.

SYNTAX

New-PodeMcpAudioContent [[-Bytes] <Byte[]>] [-MimeType] <String> [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

This function creates a hashtable representing an audio response for an MCP tool. The hashtable includes a 'type' key with the value 'audio', a 'data' key containing the base64-encoded audio data, and a 'mimeType' key specifying the MIME type of the audio.

EXAMPLES

EXAMPLE 1

# create an audio response for an MCP tool
$audioBytes = [System.IO.File]::ReadAllBytes('path\to\audio.mp3')
New-PodeMcpAudioContent -Bytes $audioBytes -MimeType 'audio/mpeg'

PARAMETERS

-Bytes

The byte array representing the audio 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 audio.

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.

INPUTS

OUTPUTS

System.Collections.Hashtable

NOTES