Table of Contents

Class McpPromptParameterAttribute

Namespace
nanoFramework.WebServer.Mcp
Assembly
nanoFramework.WebServer.Mcp.dll

Represents a parameter for a Model Context Protocol (MCP) prompt, providing metadata about the parameter such as its name and description.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class McpPromptParameterAttribute : Attribute
Inheritance
McpPromptParameterAttribute
Inherited Members
Extension Methods

Remarks

These have to be added to the methods implementing the MCP prompts in the same order as the parameters.

By design, if a prompt parameter is specified, it is considered required. .NET nanoFramework does not support optional parameters in MCP prompts.

Constructors

McpPromptParameterAttribute(string, string)

Initializes a new instance of the McpPromptParameterAttribute class with the specified name and description.

public McpPromptParameterAttribute(string name, string description)

Parameters

name string

The name of the prompt parameter.

description string

The description of the prompt parameter.

Properties

Description

Gets or sets the description of the prompt parameter.

public string Description { get; set; }

Property Value

string

Remarks

The description is optional.

Name

Gets or sets the name of the prompt parameter.

public string Name { get; set; }

Property Value

string

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Remarks

Available only in mscorlib build with support for System.Reflection.