Definition
Assembly: Microsoft.OData.Mcp.AspNetCore.dll Namespace: Microsoft.OData.Mcp.AspNetCore.HealthChecks Inheritance: System.ObjectSyntax
Summary
Health check for the MCP server functionality.Remarks
This health check verifies that the core MCP server components are functioning correctly, including metadata parsing, tool registration, and basic connectivity.Constructors
.ctor
Initializes a new instance of the McpServerHealthCheck class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
logger | Microsoft.Extensions.Logging.ILogger<Microsoft.OData.Mcp.AspNetCore.HealthChecks.McpServerHealthCheck> | The logger instance. |
toolFactory | Microsoft.OData.Mcp.Core.Tools.IMcpToolFactory? | The MCP tool factory (optional). |
Exceptions
| Exception | Description |
|---|---|
ArgumentNullException | Thrown when logger is null. |
.ctor Inherited
Inherited from
objectSyntax
Methods
CheckHealthAsync
Checks the health of the MCP server.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
context | Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext | The health check context. |
cancellationToken | System.Threading.CancellationToken | A cancellation token to cancel the operation. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult>
A task that represents the asynchronous health check operation.
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Related APIs
- Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck