> ## Documentation Index
> Fetch the complete documentation index at: https://si.nimbleapps.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# FormElicitationExecutionMode

> Selects Tasks wrapping from [McpElicitFormAttribute](/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitFormAttribute) and [McpElicitU...

## Definition

**Assembly:** CloudNimble.McpEssentials.Core.dll

**Namespace:** CloudNimble.McpEssentials.Core.Tasks.Elicitations

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.McpEssentials.Core.Tasks.Elicitations.FormElicitationExecutionMode
```

## Summary

Selects Tasks wrapping from [McpElicitFormAttribute](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitFormAttribute.md) and
[McpElicitUrlAttribute](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitUrlAttribute.md) when Tasks is registered.

## Methods

### &#x20;Apply

Wraps `ExecutionModeSelector` so a
[McpElicitFormAttribute](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitFormAttribute.md) tool stays on `tools/call`
(`Synchronous`) and a
[McpElicitUrlAttribute](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitUrlAttribute.md) tool is
`Optional`.

#### Syntax

```csharp theme={"dark"}
public static void Apply(ModelContextProtocol.Extensions.Tasks.McpTasksOptions options)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `options` | `ModelContextProtocol.Extensions.Tasks.McpTasksOptions` | The Tasks options being configured. |

#### Exceptions

| Exception | Description |
| - | - |
| `ArgumentNullException` | Thrown when *options* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |

#### Remarks

Form wins when both attributes are present. URL tools wrap only when the client
advertised Tasks on this call, so a waiter can outlive the POST.

### &#x20;IsFormTool

Returns whether *context* matched a tool stamped with
[McpElicitFormAttribute](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitFormAttribute.md).

#### Syntax

```csharp theme={"dark"}
public static bool IsFormTool(ModelContextProtocol.Server.RequestContext<ModelContextProtocol.Protocol.CallToolRequestParams> context)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `context` | `ModelContextProtocol.Server.RequestContext<ModelContextProtocol.Protocol.CallToolRequestParams>` | The current `tools/call` context. |

#### Returns

Type: `bool`
[`true`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when the matched primitive carries the attribute.

### &#x20;IsFormTool

Returns whether *primitive* carries
[McpElicitFormAttribute](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitFormAttribute.md) on the type or method.

#### Syntax

```csharp theme={"dark"}
public static bool IsFormTool(ModelContextProtocol.Server.IMcpServerPrimitive primitive)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `primitive` | `ModelContextProtocol.Server.IMcpServerPrimitive?` | The matched tool, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |

#### Returns

Type: `bool`
[`true`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when the attribute is present.

### &#x20;IsUrlTool

Returns whether *context* matched a tool stamped with
[McpElicitUrlAttribute](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitUrlAttribute.md).

#### Syntax

```csharp theme={"dark"}
public static bool IsUrlTool(ModelContextProtocol.Server.RequestContext<ModelContextProtocol.Protocol.CallToolRequestParams> context)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `context` | `ModelContextProtocol.Server.RequestContext<ModelContextProtocol.Protocol.CallToolRequestParams>` | The current `tools/call` context. |

#### Returns

Type: `bool`
[`true`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when the matched primitive carries the attribute.

### &#x20;IsUrlTool

Returns whether *primitive* carries
[McpElicitUrlAttribute](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/McpElicitUrlAttribute.md) on the type or method.

#### Syntax

```csharp theme={"dark"}
public static bool IsUrlTool(ModelContextProtocol.Server.IMcpServerPrimitive primitive)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `primitive` | `ModelContextProtocol.Server.IMcpServerPrimitive?` | The matched tool, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |

#### Returns

Type: `bool`
[`true`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) when the attribute is present.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.