> ## 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.

# FormElicitationBuilderBase

> Shared fluent implementation for untyped and typed form builders. Field starters return a facade for the current field; the next starter, and [FormElicitatio...

## Definition

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

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

**Inheritance:** System.Object

## Syntax

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

## Summary

Shared fluent implementation for untyped and typed form builders. Field starters return
a facade for the current field; the next starter, and [FormElicitationBuilderBase.Build](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/FormElicitationBuilderBase.md#build), stay on the chain.

## Constructors

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### &#x20;Message

Gets the prompt presented with the form.

#### Syntax

```csharp theme={"dark"}
public string Message { get; }
```

#### Property Value

Type: `string`

### &#x20;Name

Gets or sets the optional keyed-DI name published on the XML island.

#### Syntax

```csharp theme={"dark"}
public string Name { get; set; }
```

#### Property Value

Type: `string?`

## Methods

### &#x20;Boolean Virtual

Adds or reconfigures a boolean field named *name*.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.BooleanFieldBuilder Boolean(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.BooleanFieldBuilder`
The boolean field facade.

### &#x20;Build Virtual

Builds SDK `ElicitRequestParams` for form mode.

#### Syntax

```csharp theme={"dark"}
public virtual ModelContextProtocol.Protocol.ElicitRequestParams Build()
```

#### Returns

Type: `ModelContextProtocol.Protocol.ElicitRequestParams`
The elicitation request parameters.

#### Exceptions

| Exception | Description |
| - | - |
| `InvalidOperationException` | Thrown when the message is blank or a field is invalid. |

### &#x20;Choice Virtual

Adds or reconfigures a single-select field named *name*.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.ChoiceFieldBuilder Choice(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.ChoiceFieldBuilder`
The choice field facade.

### &#x20;Date Virtual

Adds or reconfigures a string field with format `date`.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder Date(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder`
The string field facade.

### &#x20;DateTime Virtual

Adds or reconfigures a string field with format `date-time`.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder DateTime(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder`
The string field facade.

### &#x20;Email Virtual

Adds or reconfigures a string field with format `email`.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder Email(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder`
The string field facade.

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;Integer Virtual

Adds or reconfigures an integer field named *name*.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.NumberFieldBuilder Integer(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.NumberFieldBuilder`
The number field facade.

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;MultiChoice Virtual

Adds or reconfigures a multi-select field named *name*.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.MultiChoiceFieldBuilder MultiChoice(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.MultiChoiceFieldBuilder`
The multi-choice field facade.

### &#x20;Number Virtual

Adds or reconfigures a floating-point field named *name*.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.NumberFieldBuilder Number(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.NumberFieldBuilder`
The number field facade.

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;String Virtual

Adds or reconfigures a string field named *name*.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder String(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder`
The string field facade.

### &#x20;ToDefinition Virtual

Snapshots this form as an immutable definition.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.FormDefinition ToDefinition()
```

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.FormDefinition`
The field graph independent of the fluent builder.

#### Exceptions

| Exception | Description |
| - | - |
| `InvalidOperationException` | Thrown when the message is blank or a field is invalid. |

### &#x20;ToInputRequest Virtual

Builds an `InputRequest` wrapping [FormElicitationBuilderBase.Build](https://si.nimbleapps.cloud/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/Elicitations/FormElicitationBuilderBase.md#build).

#### Syntax

```csharp theme={"dark"}
public virtual ModelContextProtocol.Protocol.InputRequest ToInputRequest()
```

#### Returns

Type: `ModelContextProtocol.Protocol.InputRequest`
An elicitation input request for task attachment.

### &#x20;ToJson Virtual

Returns the elicitation JSON already stored on `Params`.

#### Syntax

```csharp theme={"dark"}
public virtual System.Nullable<System.Text.Json.JsonElement> ToJson()
```

#### Returns

Type: `System.Nullable<System.Text.Json.JsonElement>`
The cached request parameters as JSON.

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

### &#x20;ToXml Virtual

Serializes this form as a compact XML island.

#### Syntax

```csharp theme={"dark"}
public virtual string ToXml(string xmlNamespace = null)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `xmlNamespace` | `string?` | Optional xmlns on the `Form` element. |

#### Returns

Type: `string`
The island text, with no XML declaration.

### &#x20;Uri Virtual

Adds or reconfigures a string field with format `uri`.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder Uri(string name)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `name` | `string` | The field identifier. CamelCased on the wire. |

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.Elicitations.StringFieldBuilder`
The string field facade.

## Related APIs

* CloudNimble.McpEssentials.Core.Tasks.Elicitations.IFormElicitationSource


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