MCP API: sometimes empty parameter descriptions

MCP API: sometimes empty parameter descriptions

avatar

PSU 2026.1.6

In most cases it is enough to fill the parameter description in the comment based help. But in some cases even if the comment based help is correctly filled the MCP API doesn't recognize it and if you look at the tool output, the parameter description is suddenly empty. To remediate this, you can supply a parameter HelpMessage and then it works as expected. I don't know why this is happening, but curiously both scripts where it doesn't work have IP related inputs.

Works (Get-MCPDNSRecord):

<#
.SYNOPSIS
    Get DNS record information
.DESCRIPTION
    Get DNS record information from the DNS API with automatic detection of forward or reverse lookups based on input type
.PARAMETER Name
    Name to lookup as IPv4 address or FQDN or hostname
#>
function Get-MCPDNSRecord {
    param (
        [parameter(Mandatory = $true, HelpMessage = "Name to lookup as IPv4 address or FQDN or hostname")]
        [string]
        $Name
    )


Doesn't work (Get-MCPDNSRecord):

<#
.SYNOPSIS
    Get DNS record information
.DESCRIPTION
    Get DNS record information from the DNS API with automatic detection of forward or reverse lookups based on input type
.PARAMETER Name
    Name to lookup as IPv4 address or FQDN or hostname
#>
function Get-MCPDNSRecord {
    param (
        [parameter(Mandatory = $true)]
        [string]
        $Name
    )


Doesn't work (Get-MCPPortConnectionCheck):

<#
.SYNOPSIS
    Test remote IP connectivity by port
.DESCRIPTION
    Test remote IP connectivity by port from a specific server, return the connection result
.PARAMETER Servername
    Name of source server
.PARAMETER TargetIP
    Target IP address to check connection
.PARAMETER Port
    Target port to check connection
#>
function Get-MCPPortConnectionCheck {
    param (
        [parameter(Mandatory = $true)]
        [string]
        $Servername,
        [parameter(Mandatory = $true)]
        [string]
        $TargetIP,
        [parameter(Mandatory = $true)]
        [int]
        $Port
    )


Works (Get-MCPCloudServerVariables):

<#
.SYNOPSIS
    Get cloud server variables from git
.DESCRIPTION
    Get cloud server variables from git like domain, platform, IP, etc.
.PARAMETER Servername
    Name of cloud server
#>
function Get-MCPCloudServerVariables {
    param (
        [parameter(Mandatory = $true)]
        [string]
        $Servername
    )

All Comments (1)

avatar

@schubfre I opened an issue for it. I don't know why it would matter what the description would contain but we will take that into account.

Adam Driscoll
PowerShell Expert and Developer at Devolutions

Closed