Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Server Inheritance: System.Object

Syntax

Summary

OData MCP tools using the official SDK attribute-based approach.

Remarks

This class provides MCP tools for interacting with OData services using the official Model Context Protocol C# SDK patterns with attributes.

Constructors

.ctor

Initializes a new instance of the ODataMcpTools class.

Syntax

Parameters

.ctor Inherited

Inherited from object

Syntax

Methods

CreateEntity

Creates a new entity in the specified OData entity set.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<string> The created entity as JSON.

DeleteEntity

Deletes an entity from the OData service.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<string> Success message.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetEntity

Gets a single entity by its key from an OData service.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<string> The entity data as JSON.

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetMetadata

Gets the OData service metadata document.

Syntax

Returns

Type: System.Threading.Tasks.Task<string> The OData metadata as XML.

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object Navigates from a source entity to related entities via a navigation property.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<string> The related entities.

QueryEntitySet

Queries an OData entity set with optional filtering, sorting, and pagination.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<string> The query results as JSON.

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

UpdateEntity

Updates an existing entity in the OData service.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<string> The updated entity.