FUniverMCPMixin

GitHubEdit on GitHub
packages@univerjs-pro/mcp

APIs

_initialize

Signature

_initialize(injector: Injector): void

callMCPTool

Call a registered MCP tool.

Signature

callMCPTool(toolName: string, params: unknown): Promise<any>

Parameters

  • toolName (string) — The name of the tool.
  • params (unknown) — The parameters for the tool.

connectMCP

Connect to MCP server.

Signature

connectMCP(): void

disconnectMCP

Disconnect from MCP server.

Signature

disconnectMCP(): void

getAllMCPTools

Get all registered MCP tools.

Signature

getAllMCPTools(): IMCPTool[]

getMCPConnectionStatus

Get current MCP connection status.

Signature

getMCPConnectionStatus(): string

validateMCPToolCall

Validate a tool call.

Signature

validateMCPToolCall(toolName: string, params: unknown): { isValid: boolean; error?: string; validatedParams?: any }

Parameters

  • toolName (string) — The name of the tool.
  • params (unknown) — The parameters for the tool.