Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Legacy.Generators Inheritance: System.ObjectSyntax
Summary
Options for controlling CRUD tool generation behavior.Remarks
These options allow fine-grained control over which tools are generated and how they behave, including validation, error handling, and feature enablement. CRUD tool generation can be customized to match specific API patterns, security requirements, and performance considerations.Constructors
.ctor
Initializes a new instance of the CrudToolGenerationOptions class.Syntax
.ctor Inherited
Inherited from
objectSyntax
Properties
CustomProperties
Gets or sets custom properties that can be used by specific generators.Syntax
Property Value
Type:System.Collections.Generic.Dictionary<string, object>
A dictionary of custom properties for generator-specific configuration.
Remarks
Custom properties allow extending the configuration with generator-specific settings that don’t fit into the standard options. Different generators may use these properties for specialized behavior.ExcludedEntityTypes
Gets or sets the list of entity types to exclude from tool generation.Syntax
Property Value
Type:System.Collections.Generic.HashSet<string>
A collection of entity type names to exclude.
Remarks
Use this to exclude specific entity types from CRUD tool generation, such as system entities, audit tables, or entities that should only be accessed through specialized tools.ExcludedProperties
Gets or sets the list of properties to exclude from tool generation.Syntax
Property Value
Type:System.Collections.Generic.Dictionary<string, System.Collections.Generic.HashSet<string>>
A dictionary mapping entity type names to lists of excluded properties.
Remarks
Use this to exclude specific properties from tool generation, such as system fields, computed properties, or sensitive information that should not be exposed through MCP tools.GenerateCreateTools
Gets or sets a value indicating whether to generate CREATE tools.Syntax
Property Value
Type:bool
true to generate CREATE tools; otherwise, false.
Remarks
CREATE tools allow AI models to insert new entities into the OData service. Disable this if the service is read-only or create operations should not be exposed through the MCP interface.GenerateDeleteTools
Gets or sets a value indicating whether to generate DELETE tools.Syntax
Property Value
Type:bool
true to generate DELETE tools; otherwise, false.
Remarks
DELETE tools allow AI models to remove entities from the OData service. This is often disabled in production scenarios due to the irreversible nature of delete operations.GenerateDetailedDescriptions
Gets or sets a value indicating whether to generate detailed descriptions for tools.Syntax
Property Value
Type:bool
true to generate detailed descriptions; otherwise, false.
Remarks
Detailed descriptions help AI models understand what each tool does and how to use it effectively. This improves the quality of AI interactions but increases the size of tool definitions.GenerateReadTools
Gets or sets a value indicating whether to generate READ tools.Syntax
Property Value
Type:bool
true to generate READ tools; otherwise, false.
Remarks
READ tools allow AI models to retrieve entities from the OData service. This is typically enabled unless the service contains sensitive data that should not be accessible through MCP.GenerateUpdateTools
Gets or sets a value indicating whether to generate UPDATE tools.Syntax
Property Value
Type:bool
true to generate UPDATE tools; otherwise, false.
Remarks
UPDATE tools allow AI models to modify existing entities in the OData service. Disable this for services where data modification should be restricted or controlled through other mechanisms.IncludeComplexTypes
Gets or sets a value indicating whether to include complex type properties in tools.Syntax
Property Value
Type:bool
true to include complex types; otherwise, false.
Remarks
Complex types represent structured data within entities. Including them in tools allows for complete entity manipulation but may increase tool complexity. Consider the trade-off between functionality and usability.IncludeExamples
Gets or sets a value indicating whether to include examples in tool descriptions.Syntax
Property Value
Type:bool
true to include examples; otherwise, false.
Remarks
Examples demonstrate how to use tools effectively and can significantly improve AI model performance. However, they increase tool definition size and may expose sensitive data patterns.IncludeNavigationProperties
Gets or sets a value indicating whether to include navigation properties in tools.Syntax
Property Value
Type:bool
true to include navigation properties; otherwise, false.
Remarks
Navigation properties represent relationships between entities. Including them can create very complex tools. It’s often better to handle relationships through separate navigation tools rather than CRUD tools.IncludeValidation
Gets or sets a value indicating whether to include validation in generated tools.Syntax
Property Value
Type:bool
true to include validation; otherwise, false.
Remarks
Validation helps ensure that AI models provide valid input parameters and can provide helpful error messages when validation fails. This improves reliability but may impact performance.MaxPropertiesPerTool
Gets or sets the maximum number of properties to include in a single tool.Syntax
Property Value
Type:System.Nullable<int>
The maximum property count, or null for no limit.
Remarks
Large entity types can result in tools with too many parameters, making them difficult for AI models to use effectively. This setting helps limit complexity by splitting large entities into multiple tools or omitting less important properties.NamingConvention
Gets or sets the naming convention to use for generated tool names.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Legacy.Generators.ToolNamingConvention
The naming convention for tool names.
Remarks
Consistent naming conventions help AI models understand and predict tool names. Choose a convention that matches your organization’s standards and is familiar to the AI models you’re working with.UseSchemaDescriptions
Gets or sets a value indicating whether to use schema descriptions for tool documentation.Syntax
Property Value
Type:bool
true to use schema descriptions; otherwise, false.
Remarks
OData schemas may include descriptions and annotations that can be used to generate better tool documentation. Enable this to leverage existing schema documentation in your tool descriptions.Methods
Clone
Creates a copy of this configuration.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Legacy.Generators.CrudToolGenerationOptions
A new instance with the same settings.
Development
Creates options optimized for development and testing scenarios.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Legacy.Generators.CrudToolGenerationOptions
CRUD tool generation options with all features enabled for development.
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
ExcludeEntityType
Adds an entity type to the exclusion list.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entityTypeName | string | The name of the entity type to exclude. |
ExcludeProperty
Adds a property to the exclusion list for a specific entity type.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entityTypeName | string | The name of the entity type. |
propertyName | string | The name of the property to exclude. |
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
HighSecurity
Creates options optimized for high-security scenarios.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Legacy.Generators.CrudToolGenerationOptions
CRUD tool generation options with restricted access and enhanced validation.
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReadOnly
Creates options optimized for read-only scenarios.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Legacy.Generators.CrudToolGenerationOptions
CRUD tool generation options with only read operations enabled.
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ShouldIncludeEntityType
Determines whether the specified entity type should be included in tool generation.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entityTypeName | string | The name of the entity type to check. |
Returns
Type:bool
true if the entity type should be included; otherwise, false.
ShouldIncludeProperty
Determines whether the specified property should be included in tool generation.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
entityTypeName | string | The name of the entity type containing the property. |
propertyName | string | The name of the property to check. |
Returns
Type:bool
true if the property should be included; otherwise, false.
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?