alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class SpreadsheetWebMcpSettings

    Represents the WebMCP configuration for an SfSpreadsheet instance.

    Inheritance
    object
    ComponentBase
    SpreadsheetWebMcpSettings
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Spreadsheet
    Assembly: Syncfusion.Blazor.Spreadsheet.dll
    Syntax
    public class SpreadsheetWebMcpSettings : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    Use this component to customize the WebMCP tools exposed by a spreadsheet to compatible AI agents. Built-in tools can be disabled or customized, and additional custom tools can be registered through SpreadsheetWebMcpTool child components.

    Custom tool execution is handled through the OnWebMcpExecute event.

    This component is effective only when EnableWebMcp is true and the hosting environment supports the browser's document.modelContext API.

    Examples

    <SfSpreadsheet EnableWebMcp="true"> <SpreadsheetWebMcpSettings Name="SalesSpreadsheet"> <SpreadsheetWebMcpTools> <SpreadsheetWebMcpTool Command="SpreadsheetWebMcpToolCommand.GetSelection" Name="readCurrentSelection" /> </SpreadsheetWebMcpTools> </SpreadsheetWebMcpSettings> </SfSpreadsheet>

    Constructors

    SpreadsheetWebMcpSettings()

    Declaration
    public SpreadsheetWebMcpSettings()

    Properties

    ChildContent

    The child content (a SpreadsheetWebMcpTools block).

    Declaration
    [Parameter]
    public RenderFragment? ChildContent { get; set; }
    Property Value
    Type
    RenderFragment

    Name

    Gets or sets the prefix used when generating browser-side WebMCP tool names for this spreadsheet instance.

    Declaration
    [Parameter]
    [JsonIgnore]
    public string? Name { get; set; }
    Property Value
    Type Description
    string

    A string that defines the prefix applied to all tool names registered by this spreadsheet. When null or empty, the spreadsheet falls back to its configured ID and then to an internally generated identifier. The default value is null.

    Remarks

    When specified, this value takes precedence over the spreadsheet's ID when generating browser-side tool names during WebMCP registration.

    Tool names must be unique within the browser-side WebMCP tool registry. When multiple WebMCP-enabled spreadsheets are rendered on the same page, configure a unique Name value for each spreadsheet to avoid tool registration conflicts.

    This prefix is combined with the configured tool name to produce the fully qualified tool identifier. The event argument's Name contains the logical tool name without this browser-side prefix.

    This property is not serialized and must be supplied directly through the component instance.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Dispose()

    Unregisters this settings container and releases its child references.

    Declaration
    public void Dispose()

    Dispose(bool)

    Releases managed resources owned by this component.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true when called from Dispose().

    OnInitializedAsync()

    Initializes the settings component, hooks it into the parent spreadsheet, and signals that the tool registry needs to be re-resolved on the next render via BaseParent.HasWebMcpSettingsChanges.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    Task
    Overrides
    ComponentBase.OnInitializedAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved