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

# IMcpAnnotatedActionWaiter

> Host completion source for an annotated action after URL elicitation is accepted.

## Definition

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

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

## Syntax

```csharp theme={null}
Microsoft.OData.Mcp.AspNetCore.Hosting.IMcpAnnotatedActionWaiter
```

## Summary

Host completion source for an annotated action after URL elicitation is accepted.

## Remarks

Register with `WaitForAnnotatedAction&lt;TWaiter&gt;`. Without a waiter, the task
completes with the Started payload after elicitation (the URL was shown; the grant still
finishes only in the browser). Decline, timeout, and `tasks/cancel` do not call
[CancellationToken)](https://learn.microsoft.com/dotnet/api/microsoft.odata.mcp.aspnetcore.hosting.imcpannotatedactionwaiter.waitasync\(microsoft.odata.mcp.aspnetcore.hosting.mcpannotatedactioncontext,system.threading.cancellationtoken\)).

## Methods

### &#x20;WaitAsync Abstract

Waits for the host callback that finishes the annotated action.

#### Syntax

```csharp theme={null}
System.Threading.Tasks.Task<ModelContextProtocol.Protocol.CallToolResult> WaitAsync(Microsoft.OData.Mcp.AspNetCore.Hosting.McpAnnotatedActionContext context, System.Threading.CancellationToken cancellationToken)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `context` | `Microsoft.OData.Mcp.AspNetCore.Hosting.McpAnnotatedActionContext` | Action name, binding key, one-shot result JSON, and task id. |
| `cancellationToken` | `System.Threading.CancellationToken` | Timeout, `tasks/cancel`, and process shutdown. |

#### Returns

Type: `System.Threading.Tasks.Task<ModelContextProtocol.Protocol.CallToolResult?>`
The terminal tool result, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) to keep the Started payload.


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