alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class TreeGridWebMcpTool

    Defines a customized built-in tool or a host-handled custom tool.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    TreeGridWebMcpTool
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    ITreeGridWebMcpTool
    Inherited Members
    ComponentBase.SetParametersAsync(ParameterView)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.TreeGrid
    Assembly: Syncfusion.Blazor.TreeGrid.dll
    Syntax
    public sealed class TreeGridWebMcpTool : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, ITreeGridWebMcpTool

    Constructors

    TreeGridWebMcpTool()

    Declaration
    public TreeGridWebMcpTool()

    Properties

    ChildContent

    Gets or sets nested tool content.

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

    Command

    Gets or sets the tool to configure. Set a built-in command to customize that tool, or Custom to declare an application-defined tool. None is invalid.

    Declaration
    [Parameter]
    public TreeGridWebMcpToolCommand Command { get; set; }
    Property Value
    Type
    TreeGridWebMcpToolCommand
    Remarks

    A custom tool has no built-in handler. When an agent calls it, the application handles it in TreeGridEvents.OnWebMcpExecute, which receives the command, tool name, and arguments. Set args.Result to respond or args.Cancel = true to cancel. Cancellation wins if both are set. The callback is required for custom tools. A custom tool also requires a unique, non-empty name, non-empty description, and object input schema.

    Description

    Gets or sets the tool description. It is optional for a built-in command and required and non-empty for a custom command.

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

    Enabled

    Gets or sets whether the tool is exposed to agents. Defaults to true; false omits a built-in tool and has no effect on a custom tool.

    Declaration
    [Parameter]
    public bool Enabled { get; set; }
    Property Value
    Type
    bool

    InputSchema

    Gets or sets the input schema as a JSON string. It is optional for built-in commands; custom commands require a JSON object schema with type object.

    Declaration
    [Parameter]
    public string? InputSchema { get; set; }
    Property Value
    Type
    string

    Name

    Gets or sets the tool name. For a built-in command, it is optional and overrides the exposed name. For a custom command, it is required and unique.

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

    Methods

    BuildRenderTree(RenderTreeBuilder)

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

    OnInitializedAsync()

    Initializes the tool and adds it to the parent tool collection.

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

    OnParametersSetAsync()

    Updates the parent tool collection when tool parameters change.

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

    Implements

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