Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Legacy Inheritance: System.ObjectSyntax
Summary
Represents an MCP (Model Context Protocol) tool that can be executed by AI models.Remarks
MCP tools define the interface between AI models and external systems, providing structured input/output schemas and execution logic for specific operations.Constructors
.ctor
Syntax
.ctor Inherited
Inherited from
objectSyntax
Properties
Categories
Gets or sets the categories or tags associated with the tool.Syntax
Property Value
Type:System.Collections.Generic.HashSet<string>
A collection of category names or tags.
Remarks
Categories help organize tools and make them easier to discover. Common categories might include “data”, “utility”, “integration”, etc.Description
Gets or sets the human-readable description of what the tool does.Syntax
Property Value
Type:string
A detailed description of the tool’s purpose and functionality.
Remarks
This description helps AI models understand when and how to use the tool. It should clearly explain the tool’s purpose, expected inputs, and outcomes.EstimatedExecutionTimeMs
Gets or sets the estimated execution time for the tool in milliseconds.Syntax
Property Value
Type:System.Nullable<int>
The estimated execution time, or null if unknown.
Remarks
This hint helps AI models make informed decisions about tool selection based on performance requirements and timeout constraints.Examples
Gets or sets examples of how to use the tool.Syntax
Property Value
Type:System.Collections.Generic.List<Microsoft.OData.Mcp.Core.Tools.McpToolExample>
A collection of usage examples for the tool.
Remarks
Examples help AI models understand the proper usage patterns and expected input/output formats for the tool.InputSchema
Gets or sets the JSON schema that defines the structure of the tool’s input parameters.Syntax
Property Value
Type:object?
A JSON schema object describing the expected input format.
Remarks
The input schema defines the parameters that must be provided when invoking the tool. It includes type information, validation rules, descriptions, and examples.IsEnabled
Gets or sets a value indicating whether the tool is currently enabled and available for use.Syntax
Property Value
Type:bool
true if the tool is enabled; otherwise, false.
Remarks
Disabled tools are not presented to AI models for execution. This can be useful for temporarily disabling problematic tools or implementing feature flags.MaxConcurrentExecutions
Gets or sets the maximum number of concurrent executions allowed for this tool.Syntax
Property Value
Type:System.Nullable<int>
The maximum concurrency limit, or null for no limit.
Remarks
Concurrency limits help protect backend resources and ensure system stability when multiple AI models are using the same tools simultaneously.Metadata
Gets or sets additional metadata about the tool.Syntax
Property Value
Type:System.Collections.Generic.Dictionary<string, object>
A dictionary of custom metadata properties.
Remarks
Metadata can include information about the tool’s capabilities, limitations, performance characteristics, or other implementation-specific details.Name
Gets or sets the unique name of the tool.Syntax
Property Value
Type:string
The tool name, which must be unique within the MCP server context.
Remarks
Tool names should be descriptive and follow consistent naming conventions. They are used by AI models to identify and invoke specific operations.Version
Gets or sets the version of the tool.Syntax
Property Value
Type:string
The version string for the tool.
Remarks
Tool versions help track changes and compatibility. They can be used to implement versioning strategies for tool evolution.Methods
Clone
Creates a deep copy of the MCP tool.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Legacy.McpTool
A new McpTool instance with copied values.
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 Override
Returns a string representation of the tool.Syntax
Returns
Type:string
A string containing the tool’s name and description.
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Validate
Validates the tool definition for completeness and correctness.Syntax
Returns
Type:System.Collections.Generic.IEnumerable<string>
A collection of validation error messages, or empty if valid.