Resolve-PodeMcpRequest
SYNOPSIS
Resolves an MCP request from a client, invoking the appropriate logic based on the method and returning a response.
SYNTAX
Resolve-PodeMcpRequest [-Group] <String> [[-ServerName] <String>] [[-ServerVersion] <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
This function is responsible for handling incoming MCP requests, validating them, and invoking the appropriate logic based on the requested method. It supports methods for initializing the MCP connection, listing available tools, calling specific tools, and handling notifications.
Responses are returned in JSON-RPC 2.0 format.
EXAMPLES
EXAMPLE 1
# resolve requests for MCP tools in a default group, using Pode server name and version
Add-PodeMcpGroup -Name 'default'
Resolve-PodeMcpRequest -Group 'default'
EXAMPLE 2
# resolve requests for MCP tools in a custom group, with custom server name and version
Add-PodeMcpGroup -Name 'custom'
Resolve-PodeMcpRequest -Group 'custom' -ServerName 'Custom MCP Server' -ServerVersion '1.0.0'
PARAMETERS
-Group
The group to which the MCP tools belong. This allows for organizing tools into different groups.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
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
-ServerName
The name of the MCP server. (Default: 'Pode MCP Server').
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: Pode MCP Server
Accept pipeline input: False
Accept wildcard characters: False
-ServerVersion
The version of the MCP server. (Default: Current Pode version).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
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.