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.Routing
Inheritance: System.ValueType
Syntax
Microsoft.OData.Mcp.Core.Routing.SpanRouteParser
Summary
High-performance route parser using ReadOnlySpan for zero-allocation parsing.
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
public SpanRouteParser(System.ReadOnlySpan<char> path)
Parameters
| Name | Type | Description |
|---|
path | System.ReadOnlySpan<char> | The path to parse. |
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
public bool TryGetMcpCommand(out Microsoft.OData.Mcp.Core.Routing.McpCommand command)
Parameters
| Name | Type | Description |
|---|
command | Microsoft.OData.Mcp.Core.Routing.McpCommand | The MCP command. |
Returns
Type: bool
True if a command was found; otherwise, false.
TryGetODataRoute
Extracts just the OData route portion from an MCP path.
Syntax
public bool TryGetODataRoute(out System.ReadOnlySpan<char> odataRoute)
Parameters
| Name | Type | Description |
|---|
odataRoute | System.ReadOnlySpan<char> | The OData route prefix. |
Returns
Type: bool
True if an OData route was found; otherwise, false.
Extracts the tool name from a tool info request path.
Syntax
public bool TryGetToolName(out System.ReadOnlySpan<char> toolName)
Parameters
| Name | Type | Description |
|---|
toolName | System.ReadOnlySpan<char> | The tool name. |
Returns
Type: bool
True if a tool name was found; otherwise, false.
TryParseMcpRoute
Attempts to parse an MCP route from the path.
Syntax
public bool TryParseMcpRoute(out System.ReadOnlySpan<char> odataRoute, out System.ReadOnlySpan<char> mcpCommand)
Parameters
| Name | Type | Description |
|---|
odataRoute | System.ReadOnlySpan<char> | The OData route prefix, if found. |
mcpCommand | System.ReadOnlySpan<char> | The MCP command, if specified. |
Returns
Type: bool
True if this is an MCP route; otherwise, false.