Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Routing Inheritance: System.ValueType

Syntax

Summary

High-performance route parser using ReadOnlySpan for zero-allocation parsing.

Remarks

This parser handles MCP routes in the format: //mcp/ where can be empty, and is optional.

Constructors

.ctor

Initializes a new instance of the SpanRouteParser struct.

Syntax

Parameters

Methods

IsMcpRoute

Checks if the path is an MCP route without parsing details.

Syntax

Returns

Type: bool True if this is an MCP route; otherwise, false.

TryGetMcpCommand

Gets the MCP command from the path.

Syntax

Parameters

Returns

Type: bool True if a command was found; otherwise, false.

TryGetODataRoute

Extracts just the OData route portion from an MCP path.

Syntax

Parameters

Returns

Type: bool True if an OData route was found; otherwise, false.

TryGetToolName

Extracts the tool name from a tool info request path.

Syntax

Parameters

Returns

Type: bool True if a tool name was found; otherwise, false.

TryParseMcpRoute

Attempts to parse an MCP route from the path.

Syntax

Parameters

Returns

Type: bool True if this is an MCP route; otherwise, false.