Documentation Index Fetch the complete documentation index at: https://easyaf.dev/llms.txt
Use this file to discover all available pages before exploring further.
Definition
Assembly: Microsoft.OData.Mcp.Core.dll
Namespace: Microsoft.OData.Mcp.Core.Configuration
Inheritance: System.Object
Syntax
Microsoft . OData . Mcp . Core . Configuration . ODataServiceConfiguration
Summary
Configuration for connecting to and interacting with OData services.
This configuration specifies how the MCP server discovers and communicates
with the underlying OData service, including metadata endpoints, authentication,
and operational parameters.
Constructors
.ctor
Initializes a new instance of the ODataServiceConfiguration class.
Syntax
public ODataServiceConfiguration ()
.ctor Inherited
Syntax
Properties
Authentication
Gets or sets the authentication configuration for the OData service.
Syntax
public Microsoft . OData . Mcp . Core . Configuration . ODataAuthenticationConfiguration Authentication { get ; set ; }
Property Value
Type: Microsoft.OData.Mcp.Core.Configuration.ODataAuthenticationConfiguration
Configuration for authenticating with the OData service.
This configuration specifies how the MCP server authenticates with the
underlying OData service when making requests on behalf of users.
Gets or sets a value indicating whether to automatically discover metadata.
Syntax
public bool AutoDiscoverMetadata { get ; set ; }
Property Value
Type: bool
true to automatically fetch and parse metadata; otherwise, false.
When enabled, the MCP server will automatically fetch metadata from the configured
endpoint and generate tools based on the discovered schema.
BaseUrl
Gets or sets the base URL of the OData service.
Syntax
public string BaseUrl { get ; set ; }
Property Value
Type: string?
The root URL of the OData service.
For sidecar deployments, this is the external URL of the OData service.
For middleware deployments, this can be null to use the host application’s base URL.
CustomProperties
Gets or sets custom configuration properties.
Syntax
public System . Collections . Generic . Dictionary < string , object > CustomProperties { get ; set ; }
Property Value
Type: System.Collections.Generic.Dictionary<string, object>
A dictionary of custom configuration values.
Custom properties allow extending the configuration with service-specific
settings that don’t fit into the standard configuration properties.
Gets or sets the default headers to include in OData requests.
Syntax
public System . Collections . Generic . Dictionary < string , string > DefaultHeaders { get ; set ; }
Property Value
Type: System.Collections.Generic.Dictionary<string, string>
A dictionary of header name-value pairs to include in all requests.
These headers will be added to all HTTP requests made to the OData service
and can be used for custom authentication, tracing, or service identification.
FollowNextLinks
Gets or sets a value indicating whether to follow next links in paged results.
Syntax
public bool FollowNextLinks { get ; set ; }
Property Value
Type: bool
true to automatically follow next links; otherwise, false.
When enabled, the MCP server will automatically follow OData next links
to retrieve additional pages of results.
MaxPages
Gets or sets the maximum number of pages to follow.
Syntax
public int MaxPages { get ; set ; }
Property Value
Type: int
The maximum number of result pages to retrieve.
This setting prevents infinite loops when following next links and
limits the total amount of data retrieved in a single operation.
MaxPageSize
Gets or sets the maximum page size for query results.
Syntax
public System . Nullable < int > MaxPageSize { get ; set ; }
Property Value
Type: System.Nullable<int>
The maximum number of entities to return in a single query response.
This setting helps prevent excessively large responses that could impact
performance or memory usage. Set to null for no limit.
MaxRetryAttempts
Gets or sets the maximum number of retry attempts for failed requests.
Syntax
public int MaxRetryAttempts { get ; set ; }
Property Value
Type: int
The number of retry attempts for failed HTTP requests.
When requests to the OData service fail due to transient errors,
the MCP server will retry up to this number of times.
Gets or sets the path to the OData metadata endpoint.
Syntax
public string MetadataPath { get ; set ; }
Property Value
Type: string
The relative path to the metadata endpoint (typically ”/$metadata”).
This path is appended to the base URL to construct the full metadata endpoint URL.
The metadata endpoint must return CSDL (Common Schema Definition Language) XML.
RefreshInterval
Gets or sets the interval for refreshing metadata.
Syntax
public System . TimeSpan RefreshInterval { get ; set ; }
Property Value
Type: System.TimeSpan
The time interval between metadata refresh attempts.
The MCP server will periodically refresh metadata to detect schema changes.
Set to Zero to disable automatic refresh.
RequestTimeout
Gets or sets the timeout for HTTP requests to the OData service.
Syntax
public System . TimeSpan RequestTimeout { get ; set ; }
Property Value
Type: System.TimeSpan
The maximum time to wait for HTTP responses.
This timeout applies to all HTTP requests made to the OData service,
including metadata discovery and data operations.
RetryDelay
Gets or sets the base delay for retry attempts.
Syntax
public System . TimeSpan RetryDelay { get ; set ; }
Property Value
Type: System.TimeSpan
The initial delay before the first retry attempt.
Subsequent retries will use exponential backoff based on this initial delay.
SupportedODataVersions
Gets or sets the supported OData versions.
Syntax
public System . Collections . Generic . List < string > SupportedODataVersions { get ; set ; }
Property Value
Type: System.Collections.Generic.List<string>
A list of OData versions supported by the service.
This information helps the MCP server understand which OData features
are available and how to construct appropriate requests.
UseHostContext
Gets or sets a value indicating whether to use the host application context.
Syntax
public bool UseHostContext { get ; set ; }
Property Value
Type: bool
true to use host context for middleware deployments; otherwise, false.
When enabled in middleware deployments, the MCP server will use the host
application’s HTTP context to make requests to the OData service.
ValidateSSL
Gets or sets a value indicating whether to validate SSL certificates.
Syntax
public bool ValidateSSL { get ; set ; }
Property Value
Type: bool
true to validate SSL certificates; otherwise, false.
For development environments, SSL validation can be disabled to work
with self-signed certificates. This should always be enabled in production.
Methods
AddCustomProperty
Adds a custom property to the configuration.
Syntax
public void AddCustomProperty ( string key , object value )
Parameters
Name Type Description keystringThe property key. valueobjectThe property value.
Exceptions
Exception Description ArgumentExceptionThrown when key is null or whitespace.
Adds a default header to be included in all OData requests.
Syntax
public void AddDefaultHeader ( string name , string value )
Parameters
Name Type Description namestringThe header name. valuestringThe header value.
Exceptions
Exception Description ArgumentExceptionThrown when name is null or whitespace.
Clone
Creates a copy of this configuration.
Syntax
public Microsoft . OData . Mcp . Core . Configuration . ODataServiceConfiguration Clone ()
Returns
Type: Microsoft.OData.Mcp.Core.Configuration.ODataServiceConfiguration
A new instance with the same settings.
Equals Inherited Virtual
Syntax
public virtual bool Equals ( object obj )
Parameters
Name Type Description objobject?-
Returns
Type: bool
Equals Inherited
Syntax
public static bool Equals ( object objA , object objB )
Parameters
Name Type Description objAobject?- objBobject?-
Returns
Type: bool
GetCustomProperty
Gets a custom property value.
Syntax
public T GetCustomProperty < T >( string key )
Parameters
Name Type Description keystringThe property key.
Returns
Type: T?
The property value if found and of the correct type; otherwise, the default value.
Type Parameters
T - The type of the property value.
GetEntitySetUrl
Gets the full URL for an OData entity set.
Syntax
public string GetEntitySetUrl ( string entitySetName , string hostBaseUrl = null )
Parameters
Name Type Description entitySetNamestringThe name of the entity set. hostBaseUrlstring?The host base URL for middleware deployments.
Returns
Type: string
The complete URL to the entity set.
Exceptions
Exception Description ArgumentExceptionThrown when entitySetName is null or whitespace.
GetHashCode Inherited Virtual
Syntax
public virtual int GetHashCode ()
Returns
Type: int
Gets the full metadata URL for the OData service.
Syntax
public string GetMetadataUrl ( string hostBaseUrl = null )
Parameters
Name Type Description hostBaseUrlstring?The host base URL for middleware deployments.
Returns
Type: string
The complete URL to the metadata endpoint.
GetType Inherited
Syntax
public System . Type GetType ()
Returns
Type: System.Type
MemberwiseClone Inherited
Syntax
protected internal object MemberwiseClone ()
Returns
Type: object
MergeWith
Merges another configuration into this one, with the other configuration taking precedence.
Syntax
public void MergeWith ( Microsoft . OData . Mcp . Core . Configuration . ODataServiceConfiguration other )
Parameters
Name Type Description otherMicrosoft.OData.Mcp.Core.Configuration.ODataServiceConfigurationThe configuration to merge into this one.
Exceptions
Exception Description ArgumentNullExceptionThrown when other is null.
ReferenceEquals Inherited
Syntax
public static bool ReferenceEquals ( object objA , object objB )
Parameters
Name Type Description objAobject?- objBobject?-
Returns
Type: bool
Removes a default header.
Syntax
public bool RemoveDefaultHeader ( string name )
Parameters
Name Type Description namestringThe header name to remove.
Returns
Type: bool
true if the header was removed; otherwise, false.
ToString Inherited Virtual
Syntax
public virtual string ToString ()
Returns
Type: string?
Validate
Validates the OData service configuration.
Syntax
public System . Collections . Generic . IEnumerable < string > Validate ( Microsoft . OData . Mcp . Core . Configuration . McpDeploymentMode deploymentMode )
Parameters
Name Type Description deploymentModeMicrosoft.OData.Mcp.Core.Configuration.McpDeploymentModeThe deployment mode for context-specific validation.
Returns
Type: System.Collections.Generic.IEnumerable<string>
A collection of validation errors, or empty if the configuration is valid.