Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core Inheritance: System.ObjectSyntax
Summary
Configuration options for OData MCP integration.Constructors
.ctor
Syntax
.ctor Inherited
Inherited from
objectSyntax
Properties
AllowedOrigins
Gets or sets the allowed CORS origins.Syntax
Property Value
Type:string[]
An array of allowed origins. Default allows all origins (”*”).
AutoDiscoverMetadata
Gets or sets whether to auto-discover metadata.Syntax
Property Value
Type:bool
true to auto-discover metadata; otherwise, false.
Default is true.
AutoRegisterRoutes
Gets or sets a value indicating whether to automatically register MCP endpoints for all OData routes.Syntax
Property Value
Type:bool
true to automatically register MCP endpoints; otherwise, false.
Default is true.
BasePath
Gets or sets the base path for MCP endpoints.Syntax
Property Value
Type:string
The base path for MCP endpoints. Default is “/mcp”.
CacheDuration
Gets or sets the cache duration for dynamic content.Syntax
Property Value
Type:System.TimeSpan
The duration to cache dynamic content. Default is 5 minutes.
DefaultPageSize
Gets or sets the default page size for query operations.Syntax
Property Value
Type:int
The default page size. Default is 100.
EnableCaching
Gets or sets whether to enable caching.Syntax
Property Value
Type:bool
true to enable caching; otherwise, false.
Default is true.
EnableCors
Gets or sets a value indicating whether to enable CORS for MCP endpoints.Syntax
Property Value
Type:bool
true to enable CORS; otherwise, false.
Default is true.
Enabled
Gets or sets whether to enable MCP endpoints.Syntax
Property Value
Type:bool
true to enable MCP endpoints; otherwise, false.
Default is true.
EnableDetailedErrors
Gets or sets whether to enable detailed error messages.Syntax
Property Value
Type:bool
true to enable detailed error messages; otherwise, false.
Default is false.
EnableDynamicModels
Gets or sets a value indicating whether to enable dynamic model updates.Syntax
Property Value
Type:bool
true to enable dynamic models; otherwise, false.
Default is false for performance.
EnableRequestLogging
Gets or sets a value indicating whether to enable request logging.Syntax
Property Value
Type:bool
true to enable detailed request logging; otherwise, false.
Default is false.
ExcludeRoutes
Gets or sets the routes to exclude from automatic MCP registration.Syntax
Property Value
Type:string[]
An array of route names to exclude. Default is an empty array.
IncludeMetadata
Gets or sets a value indicating whether to include metadata in tool descriptions.Syntax
Property Value
Type:bool
true to include detailed metadata; otherwise, false.
Default is true.
MaxPageSize
Gets or sets the maximum page size for query operations.Syntax
Property Value
Type:int
The maximum page size. Default is 1000.
MaxRequestSize
Gets or sets the maximum request size for tool execution.Syntax
Property Value
Type:long
The maximum request size in bytes. Default is 1MB (1,048,576 bytes).
MaxToolsPerEntity
Gets or sets the maximum number of tools to generate per entity.Syntax
Property Value
Type:System.Nullable<int>
The maximum number of tools per entity, or null for unlimited.
Default is null.
ModelRefreshInterval
Gets or sets the interval for refreshing dynamic models.Syntax
Property Value
Type:System.TimeSpan
The interval for refreshing dynamic models. Default is 1 hour.
RequestTimeout
Gets or sets the request timeout.Syntax
Property Value
Type:System.TimeSpan
The request timeout. Default is 2 minutes.
ToolNamingPattern
Gets or sets the tool naming pattern.Syntax
Property Value
Type:string
The pattern for generating tool names. Default is ”..”.
Available placeholders: , , .
UseAggressiveCaching
Gets or sets a value indicating whether to use aggressive caching.Syntax
Property Value
Type:bool
true to use aggressive caching with ETags and long expiration;
otherwise, false. Default is true.
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
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?