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

# McpTaskAttributeAnnotations

> Stamps `[McpTask]` onto matching EDM actions on a finished model.

## Definition

**Assembly:** Microsoft.OData.Mcp.AspNetCore.dll

**Namespace:** Microsoft.OData.Mcp.AspNetCore.Vocabularies

**Inheritance:** System.Object

## Syntax

```csharp theme={null}
Microsoft.OData.Mcp.AspNetCore.Vocabularies.McpTaskAttributeAnnotations
```

## Summary

Stamps `[McpTask]` onto matching EDM actions on a finished model.

## Methods

### &#x20;Apply

Stamps `Microsoft.OData.Mcp.V1.Task` on each EDM action whose CLR method on
*sourceTypes* has [McpTaskAttribute](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Vocabularies/McpTaskAttribute.md).

#### Syntax

```csharp theme={null}
public static void Apply(Microsoft.OData.Edm.IEdmModel model, System.Collections.Generic.IEnumerable<System.Type> sourceTypes)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `model` | `Microsoft.OData.Edm.IEdmModel` | The finished service model from route discovery. |
| `sourceTypes` | `System.Collections.Generic.IEnumerable<System.Type>` | Restier API types and/or MVC controllers. |

#### Examples

```csharp theme={null}
McpTaskAttributeAnnotations.Apply(edmModel, [typeof(MyApi)]);
```

#### Remarks

No-ops when *model* is not a mutable [EdmModel](https://learn.microsoft.com/dotnet/api/microsoft.odata.edm.edmmodel).
Methods are matched to [IEdmAction](https://learn.microsoft.com/dotnet/api/microsoft.odata.edm.iedmaction) by name and bound/unbound shape.
Functions are never stamped.


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