Table of Contents

Class PromptArgument

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

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

public class PromptArgument
Inheritance
PromptArgument
Inherited Members

Remarks

The PromptArgument class defines metadata for arguments that can be provided to a prompt. These arguments are used to customize or parameterize prompts when they are retrieved using PromptsGet requests.

See the schema for details.

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

Remarks

This description helps developers understand what information should be provided for this argument and how it will affect the generated prompt.

Name

Gets or sets the name of the argument used for referencing in prompt templates.

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

Property Value

string

Required

Gets or sets an indication as to whether this argument must be provided when requesting the prompt.

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

Property Value

bool?

Remarks

When set to true, the client must include this argument when making a PromptsGet request. If a required argument is missing, the server should respond with an error.