Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Legacy.Generators Inheritance: System.ObjectSyntax
Summary
Generates navigation MCP tools from OData entity relationships.Remarks
This generator creates MCP tools that allow AI models to traverse entity relationships and work with related entities. It supports getting related entities, adding relationships, and removing relationships for both collection and single navigation properties.Constructors
.ctor
Initializes a new instance of the NavigationToolGenerator class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
logger | Microsoft.Extensions.Logging.ILogger<Microsoft.OData.Mcp.Core.Legacy.Generators.NavigationToolGenerator> | The logger instance. |
.ctor Inherited
Inherited from
objectSyntax
Methods
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
GenerateAddRelationshipToolAsync
Generates a tool for adding relationships between entities.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entitySet | Microsoft.OData.Mcp.Core.Models.EdmEntitySet | The source entity set. |
entityType | Microsoft.OData.Mcp.Core.Models.EdmEntityType | The source entity type. |
navigationProperty | Microsoft.OData.Mcp.Core.Models.EdmNavigationProperty | The navigation property for the relationship. |
options | Microsoft.OData.Mcp.Core.Legacy.Generators.NavigationToolGenerationOptions | Options controlling tool generation behavior. |
cancellationToken | System.Threading.CancellationToken | Cancellation token for the operation. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.OData.Mcp.Core.Legacy.McpTool>
A navigation MCP tool for adding relationships.
GenerateAllNavigationToolsAsync
Generates all navigation tools for the specified entity set and its relationships.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entitySet | Microsoft.OData.Mcp.Core.Models.EdmEntitySet | The entity set to generate tools for. |
entityType | Microsoft.OData.Mcp.Core.Models.EdmEntityType | The entity type definition. |
options | Microsoft.OData.Mcp.Core.Legacy.Generators.NavigationToolGenerationOptions | Options controlling tool generation behavior. |
cancellationToken | System.Threading.CancellationToken | Cancellation token for the operation. |
Returns
Type:System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.OData.Mcp.Core.Legacy.McpTool>>
A collection of generated MCP tools for navigation operations.
GenerateGetRelatedToolAsync
Generates a tool for getting related entities via navigation properties.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entitySet | Microsoft.OData.Mcp.Core.Models.EdmEntitySet | The source entity set. |
entityType | Microsoft.OData.Mcp.Core.Models.EdmEntityType | The source entity type. |
navigationProperty | Microsoft.OData.Mcp.Core.Models.EdmNavigationProperty | The navigation property to traverse. |
options | Microsoft.OData.Mcp.Core.Legacy.Generators.NavigationToolGenerationOptions | Options controlling tool generation behavior. |
cancellationToken | System.Threading.CancellationToken | Cancellation token for the operation. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.OData.Mcp.Core.Legacy.McpTool>
A navigation MCP tool for getting related entities.
GenerateRemoveRelationshipToolAsync
Generates a tool for removing relationships between entities.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entitySet | Microsoft.OData.Mcp.Core.Models.EdmEntitySet | The source entity set. |
entityType | Microsoft.OData.Mcp.Core.Models.EdmEntityType | The source entity type. |
navigationProperty | Microsoft.OData.Mcp.Core.Models.EdmNavigationProperty | The navigation property for the relationship. |
options | Microsoft.OData.Mcp.Core.Legacy.Generators.NavigationToolGenerationOptions | Options controlling tool generation behavior. |
cancellationToken | System.Threading.CancellationToken | Cancellation token for the operation. |
Returns
Type:System.Threading.Tasks.Task<Microsoft.OData.Mcp.Core.Legacy.McpTool>
A navigation MCP tool for removing relationships.
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?