Table of Contents

Class ModelHint

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Provides hints to use for model selection.

[Obsolete("The Sampling feature is deprecated as of specification version 2026-07-28 and may be removed in a future version. See SEP-2577 for more information.", DiagnosticId = "MCP9005", UrlFormat = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#obsolete-apis")]
public sealed class ModelHint
Inheritance
ModelHint
Inherited Members

Remarks

When multiple hints are specified in Hints, they are evaluated in order, with the first match taking precedence. Clients should prioritize these hints over numeric priorities.

See the schema for details.

Properties

Name

Gets or sets a hint for a model name.

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

Property Value

string

Remarks

The specified string can be a partial or full model name. Clients can also map hints to equivalent models from different providers. Clients make the final model selection based on these preferences and their available models.