Class McpServerPromptAttribute
- Namespace
- nanoFramework.WebServer.Mcp
- Assembly
- nanoFramework.WebServer.Mcp.dll
Used to indicate that a method should be considered an McpServerPromptAttribute.
[AttributeUsage(AttributeTargets.Method)]
public class McpServerPromptAttribute : Attribute
- Inheritance
-
McpServerPromptAttribute
- Inherited Members
- Extension Methods
Remarks
This attribute is applied to methods that should be exposed as prompts in the Model Context Protocol. When a class containing methods marked with this attribute is registered with McpServerBuilderExtensions, these methods become available as prompts that can be called by MCP clients.
Constructors
McpServerPromptAttribute(string, string)
Initializes a new instance of the McpServerPromptAttribute class with the specified name and description.
public McpServerPromptAttribute(string name, string description = "")
Parameters
Properties
Description
Gets the description of the tool.
public string Description { get; }
Property Value
Name
Gets the name of the prompt.
public string Name { get; }