Class PdfViewerWebMcpSettings
Initializes a new instance of the PdfViewerWebMcpSettings class in the SfPdfViewer2 component.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class PdfViewerWebMcpSettings : SfBaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
This settings container is used to configure per-instance WebMCP integration for the PDF Viewer.
It is hosted as a child component of SfPdfViewer2 when EnableWebMcp.
The settings object allows developers to define a unique viewer name and register
one or more WebMCP tools through the PdfViewerWebMcpTools collection.
These tools can then be invoked to extend viewer capabilities and integrate with
external services or custom workflows.
Examples
The following example demonstrates how to configure WebMCP settings and register a tool:
<SfPdfViewer2 EnableWebMcp="true">
<PdfViewerWebMcpSettings Name="MyViewer">
<PdfViewerWebMcpTools>
<PdfViewerWebMcpTool
Command="analyze-document"
Description="Analyzes the current PDF document" />
</PdfViewerWebMcpTools>
</PdfViewerWebMcpSettings>
</SfPdfViewer2>
Constructors
PdfViewerWebMcpSettings()
Declaration
public PdfViewerWebMcpSettings()
Properties
ChildContent
The child content — typically one or more PdfViewerWebMcpTools wrappers containing PdfViewerWebMcpTool entries.
Declaration
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
| Type |
|---|
| RenderFragment |
Name
The logical name for this settings instance. Used as the browser-registration prefix when supplied.
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
OnInitialized()
Declaration
protected override void OnInitialized()