Skip to main content

Definition

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

Syntax

Summary

Builds MCP resources and tools from a Core EDM. Only declared model members are serialized into catalogs, schemas, and completions.

Constructors

.ctor

Initializes a new instance of the ODataMcpCatalog class.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

Properties

Resources

Gets the resource descriptors.

Syntax

Property Value

Type: System.Collections.Generic.IReadOnlyList<Microsoft.OData.Mcp.Core.Catalog.ODataResourceDescriptor>

ResourceTemplates

Gets the resource templates.

Syntax

Property Value

Type: System.Collections.Generic.IReadOnlyList<Microsoft.OData.Mcp.Core.Catalog.ODataResourceTemplateDescriptor>

Shapes

Gets the cached type shapes keyed by EDM full name. Empty when ODataMcpCatalogOptions.IsDynamicModel is true.

Syntax

Property Value

Type: System.Collections.Generic.IReadOnlyDictionary<string, Microsoft.OData.Mcp.Core.Catalog.EdmTypeShape>

Tools

Gets the tool descriptors (generic first, then named).

Syntax

Property Value

Type: System.Collections.Generic.IReadOnlyList<Microsoft.OData.Mcp.Core.Catalog.ODataToolDescriptor>

Methods

CompleteEntitySetNames

Completes entity set names for resource templates.

Syntax

Parameters

Returns

Type: System.Collections.Generic.IReadOnlyList<string> Matching declared entity set names from the EDM. Never invents names.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetShape

Gets the shape for an entity type, from the cache when the model is static.

Syntax

Parameters

Returns

Type: Microsoft.OData.Mcp.Core.Catalog.EdmTypeShape The cached shape, or a freshly built one when ODataMcpCatalogOptions.IsDynamicModel is true.

Exceptions

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

TryGetTaskedAction

Resolves a tasked EDM action for a named action_* tool or odata_call of the same action.

Syntax

Parameters

Returns

Type: bool true when the resolved tool is an annotated action.

Remarks

CRUD tools, functions, and unannotated actions return false. Named action_* and odata_call of the same annotated action share this path.