alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class WebMcpAdapter<TValue>

    Static catalog of built-in WebMCP tools exposed by SfGantt. Single source of truth for tool names, schemas, and annotations.

    Inheritance
    object
    WebMcpAdapter<TValue>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Gantt
    Assembly: Syncfusion.Blazor.Gantt.dll
    Syntax
    public class WebMcpAdapter<TValue>
    Type Parameters
    Name Description
    TValue

    SfGantt data type.

    Constructors

    WebMcpAdapter(SfGantt<TValue>)

    Initializes a new WebMcpAdapter<TValue> bound to the supplied Gantt instance.

    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
    Type
    string

    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
    Type
    WebMcpToolResponse

    CreateErrorResponse(string)

    Builds a structured error response with no payload.

    Declaration
    public WebMcpToolResponse CreateErrorResponse(string message)
    Parameters
    Type Name Description
    string message
    Returns
    Type
    WebMcpToolResponse

    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
    Type Name Description
    WebMcpErrorCode code
    string toolName
    string message
    Exception innerException
    Returns
    Type
    WebMcpToolResponse

    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
    Type
    WebMcpToolResponse

    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
    Type
    WebMcpToolResponse

    ExecuteHandler(string, string?)

    Single entry point invoked by the JS bridge. Returns a serialized WebMcpToolResponse.

    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
    Type
    Task<string>

    InvalidateEffectiveToolsCache(GanttWebMcpSettings?)

    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
    Type Name Description
    GanttWebMcpSettings settings

    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
    Type Name Description
    string command

    Bare tool name.

    Dictionary<string, object> args

    Argument dictionary (native CLR values).

    Returns
    Type Description
    Task<bool>

    true if the user approved; false otherwise.

    ResolveEffectiveTools(GanttWebMcpSettings?)

    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
    Type Name Description
    GanttWebMcpSettings settings
    Returns
    Type
    IReadOnlyList<IGanttWebMcpTool>
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved