Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Tools.dll Namespace: Microsoft.OData.Mcp.Tools.Services Inheritance: System.Object

Syntax

Microsoft.OData.Mcp.Tools.Services.DynamicToolGeneratorService

Summary

Background service that generates dynamic MCP tools based on OData metadata.

Constructors

.ctor

Initializes a new instance of the DynamicToolGeneratorService class.

Syntax

public DynamicToolGeneratorService(Microsoft.Extensions.Logging.ILogger<Microsoft.OData.Mcp.Tools.Services.DynamicToolGeneratorService> logger, Microsoft.OData.Mcp.Core.Tools.IMcpToolFactory toolFactory, Microsoft.OData.Mcp.Core.Parsing.ICsdlMetadataParser metadataParser, Microsoft.Extensions.Options.IOptions<Microsoft.OData.Mcp.Core.Configuration.McpServerConfiguration> configuration, Microsoft.OData.Mcp.Core.Server.DynamicODataMcpTools dynamicTools, System.IServiceProvider serviceProvider)

Parameters

NameTypeDescription
loggerMicrosoft.Extensions.Logging.ILogger<Microsoft.OData.Mcp.Tools.Services.DynamicToolGeneratorService>The logger.
toolFactoryMicrosoft.OData.Mcp.Core.Tools.IMcpToolFactoryThe tool factory for generating dynamic tools.
metadataParserMicrosoft.OData.Mcp.Core.Parsing.ICsdlMetadataParserThe CSDL metadata parser.
configurationMicrosoft.Extensions.Options.IOptions<Microsoft.OData.Mcp.Core.Configuration.McpServerConfiguration>The server configuration.
dynamicToolsMicrosoft.OData.Mcp.Core.Server.DynamicODataMcpToolsThe dynamic OData tools instance.
serviceProviderSystem.IServiceProviderThe service provider for DI.

.ctor Inherited

Inherited from object

Syntax

public Object()

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

StartAsync

Starts the service and generates dynamic tools.

Syntax

public System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken)

Parameters

NameTypeDescription
cancellationTokenSystem.Threading.CancellationTokenThe cancellation token.

Returns

Type: System.Threading.Tasks.Task A task representing the asynchronous operation.

StopAsync

Stops the service.

Syntax

public System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken)

Parameters

NameTypeDescription
cancellationTokenSystem.Threading.CancellationTokenThe cancellation token.

Returns

Type: System.Threading.Tasks.Task A task representing the asynchronous operation.

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?
  • Microsoft.Extensions.Hosting.IHostedService