Skip to main content

Definition

Assembly: ModelContextProtocol.Core.dll Namespace: ModelContextProtocol.Server

Syntax

Summary

This type is defined in ModelContextProtocol.Core.

Methods

ElicitAsync Extension

Extension method from ModelContextProtocol.Server.McpEssentials_Core_McpServerExtensions
Builds form and elicits it from the client.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.ValueTask<ModelContextProtocol.Protocol.ElicitResult> The untyped elicitation result.

Exceptions

Examples

Metadata-driven tools keep the builder and add a field per property name:

ElicitAsync Extension

Extension method from ModelContextProtocol.Server.McpEssentials_Core_McpServerExtensions
Builds form, elicits it, and deserializes accepted content as T.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.ValueTask<ModelContextProtocol.Protocol.ElicitResult<T>> The typed elicitation result.

Type Parameters

  • T - The form type. Inferred from String).

Exceptions

Examples

ElicitAsync Extension

Extension method from ModelContextProtocol.Server.McpEssentials_Core_McpServerExtensions
Builds an untyped form, elicits it, and deserializes accepted content as T.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.ValueTask<ModelContextProtocol.Protocol.ElicitResult<T>> The typed elicitation result.

Type Parameters

  • T - The CLR type to bind accepted content onto.

Exceptions

ElicitAsync Extension

Extension method from ModelContextProtocol.Server.McpEssentials_Core_McpServerExtensions
Builds form, elicits it, and deserializes accepted content as T using options.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.ValueTask<ModelContextProtocol.Protocol.ElicitResult<T>> The typed elicitation result.

Type Parameters

  • T - The form type.

Exceptions

Remarks

Use this overload when the form was built from string field names (EDM properties, query options) and you still want a CLR DTO back.