Class WebMcpAdapter<TValue>
Static catalog of built-in WebMCP tools exposed by SfGantt.
Single source of truth for tool names, schemas, and annotations.
Inheritance
WebMcpAdapter<TValue>
Assembly: Syncfusion.Blazor.Gantt.dll
Syntax
public class WebMcpAdapter<TValue>
Type Parameters
| Name |
Description |
| TValue |
SfGantt data type.
|
Constructors
WebMcpAdapter(SfGantt<TValue>)
Declaration
public WebMcpAdapter(SfGantt<TValue> parent)
Parameters
| Type |
Name |
Description |
| SfGantt<TValue> |
parent |
|
Fields
UserCancelledSentinel
Reserved terminal sentinel returned on host cancellation or user
denial. Agents MUST NOT retry when this prefix is present.
Declaration
public const string UserCancelledSentinel = "[USER_CANCELLED]"
Field Value
Methods
CreateCancelledResponse(string)
Builds a terminal cancellation response. IsError is
false by design — cancellation is intentional and agents
MUST NOT retry.
Declaration
public WebMcpToolResponse CreateCancelledResponse(string message)
Parameters
| Type |
Name |
Description |
| string |
message |
|
Returns
CreateErrorResponse(string)
Builds a structured error response with no payload.
Declaration
public WebMcpToolResponse CreateErrorResponse(string message)
Parameters
| Type |
Name |
Description |
| string |
message |
|
Returns
CreateStructuredErrorResponse(WebMcpErrorCode, string?, string, Exception?)
Builds a structured error response keyed by an
WebMcpErrorCode. The payload is the supplied
message string.
Declaration
public WebMcpToolResponse CreateStructuredErrorResponse(WebMcpErrorCode code, string? toolName, string message, Exception? innerException = null)
Parameters
Returns
CreateSuccessResponse(object)
Builds a success response wrapping the supplied CLR
object. The object is serialized to JSON.
Declaration
public WebMcpToolResponse CreateSuccessResponse(object payload)
Parameters
| Type |
Name |
Description |
| object |
payload |
|
Returns
CreateSuccessResponse(string)
Builds a success response from a pre-serialized JSON
payload string. Used for custom handlers.
Declaration
public WebMcpToolResponse CreateSuccessResponse(string jsonPayload)
Parameters
| Type |
Name |
Description |
| string |
jsonPayload |
|
Returns
ExecuteHandler(string, string?)
Declaration
public Task<string> ExecuteHandler(string command, string? argsJson)
Parameters
| Type |
Name |
Description |
| string |
command |
Prefixed command (e.g. MyGrid_sortByColumn) or bare command.
|
| string |
argsJson |
JSON-serialized argument dictionary.
|
Returns
Drops the cached effective tool list for the supplied settings
instance. Invoked by the component after it consumes the
HasWebMcpToolChanges flag.
Declaration
public void InvalidateEffectiveToolsCache(GanttWebMcpSettings? settings)
Parameters
RequestConfirmation(string, Dictionary<string, object>)
Default implementation that delegates to the JavaScript
webMcpConfirm entry point. The bridge resolves in
3 phases: host override → window.confirm → hard denial.
Declaration
protected virtual Task<bool> RequestConfirmation(string command, Dictionary<string, object> args)
Parameters
Returns
| Type |
Description |
| Task<bool> |
true if the user approved; false otherwise.
|
Resolves the effective tool list — the static catalog with the
user's disabled / override / custom entries merged in. Cached
per settings instance.
Declaration
public IReadOnlyList<IGanttWebMcpTool> ResolveEffectiveTools(GanttWebMcpSettings? settings)
Parameters
Returns