Class PromptArgument | MCP C# SDK

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents an argument that a prompt can accept for templating and customization.

public sealed class PromptArgument : IBaseMetadata
Inheritance

PromptArgument

Implements
Inherited Members

Properties

Description

Gets or sets a human-readable description of the argument's purpose and expected values.

[JsonPropertyName("description")]
public string? Description { get; set; }

Property Value

string

Name

Gets or sets the unique identifier for this item.

[JsonPropertyName("name")]
public required string Name { get; set; }

Property Value

string

Required

Gets or sets a value that indicates whether this argument must be provided when requesting the prompt.

[JsonPropertyName("required")]
public bool? Required { get; set; }

Property Value

bool?

Title

Gets or sets a title.

[JsonPropertyName("title")]
public string? Title { get; set; }

Property Value

string