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

# ActionConfiguration

> Extension methods for ActionConfiguration from Microsoft.OData.ModelBuilder

## Definition

**Assembly:** Microsoft.OData.ModelBuilder.dll

**Namespace:** Microsoft.OData.ModelBuilder

## Syntax

```csharp theme={null}
Microsoft.OData.ModelBuilder.ActionConfiguration
```

## Summary

This type is defined in Microsoft.OData.ModelBuilder.

## Remarks

See [Microsoft documentation](https://learn.microsoft.com/dotnet/api/microsoft.odata.modelbuilder.actionconfiguration) for more information about the rest of the API.

## Methods

### &#x20;HasMcpElicitUrl Extension

> [!NOTE]
>
> Extension method from `Microsoft.OData.ModelBuilder.ODataModelBuilderMcpExtensions`

Names JSON properties on this action's result that are URLs to elicit.
`GetEdmModel` stamps `Microsoft.OData.Mcp.V1.ElicitUrlProperties`.

#### Syntax

```csharp theme={null}
public static Microsoft.OData.ModelBuilder.ActionConfiguration HasMcpElicitUrl(Microsoft.OData.ModelBuilder.ActionConfiguration action, params string[] propertyNames)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `action` | `Microsoft.OData.ModelBuilder.ActionConfiguration` | The action to annotate. |
| `propertyNames` | `string[]` | JSON property names that hold elicit URLs. |

#### Returns

Type: `Microsoft.OData.ModelBuilder.ActionConfiguration`
*action* so further configuration can chain.

#### Exceptions

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

#### Examples

```csharp theme={null}
builder.EntityType&lt;Order&gt;().Action("Authorize").HasMcpTask().HasMcpElicitUrl("connectUri");
```

#### Remarks

Pair with [String\[\])](https://learn.microsoft.com/dotnet/api/microsoft.odata.modelbuilder.odatamodelbuildermcpextensions.hasmcptask\(microsoft.odata.modelbuilder.actionconfiguration,system.string\[]\)). When this term is omitted, the runtime elicits
[McpVocabulary.DefaultElicitUrlProperties](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Vocabularies/McpVocabulary.md#defaulteliciturlproperties) if they appear on the Started JSON.

### &#x20;HasMcpTask Extension

> [!NOTE]
>
> Extension method from `Microsoft.OData.ModelBuilder.ODataModelBuilderMcpExtensions`

Marks this action as an MCP task. `GetEdmModel` attaches
`Microsoft.OData.Mcp.V1` and stamps the Task term.

#### Syntax

```csharp theme={null}
public static Microsoft.OData.ModelBuilder.ActionConfiguration HasMcpTask(Microsoft.OData.ModelBuilder.ActionConfiguration action, params string[] elicitUrlProperties)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `action` | `Microsoft.OData.ModelBuilder.ActionConfiguration` | The action to annotate. |
| `elicitUrlProperties` | `string[]` | Optional JSON property names for `ElicitUrlProperties`. |

#### Returns

Type: `Microsoft.OData.ModelBuilder.ActionConfiguration`
*action* so further configuration can chain.

#### Exceptions

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

#### Examples

```csharp theme={null}
builder.EntityType&lt;Order&gt;().Action("Ship").HasMcpTask().Returns&lt;bool&gt;();
```

#### Remarks

The host does not wrap `GetEdmModel`. The vocabulary is referenced the first time this
configuration is applied.


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