Theia API Documentation v1.77.0
    Preparing search index...

    Frontend client implementation that handles MCP tool delegation requests from the backend.

    This class acts as a bridge between the backend MCP server and frontend contributions, forwarding backend requests (tool calls, resource access, prompts) to registered MCPFrontendContribution instances and aggregating their responses.

    Called by the backend via the MCPToolDelegateClient interface to access frontend-provided MCP tools, resources, and prompts.

    Implements

    Index
    logger: ILogger
    • Parameters

      • serverId: string
      • name: string
      • args: unknown

      Returns Promise<
          {
              content: | {
                  _meta?: { [key: string]: unknown };
                  annotations?: {
                      audience?: ("user" | "assistant")[];
                      lastModified?: string;
                      priority?: number;
                  };
                  text: string;
                  type: "text";
              }
              | {
                  _meta?: { [key: string]: unknown };
                  annotations?: {
                      audience?: ("user" | "assistant")[];
                      lastModified?: string;
                      priority?: number;
                  };
                  data: string;
                  mimeType: string;
                  type: "image";
              }
              | {
                  _meta?: { [key: string]: unknown };
                  annotations?: {
                      audience?: ("user" | "assistant")[];
                      lastModified?: string;
                      priority?: number;
                  };
                  data: string;
                  mimeType: string;
                  type: "audio";
              }
              | {
                  _meta?: { [key: string]: unknown };
                  annotations?: {
                      audience?: ("user" | "assistant")[];
                      lastModified?: string;
                      priority?: number;
                  };
                  description?: string;
                  icons?: {
                      mimeType?: string;
                      sizes?: string[];
                      src: string;
                      theme?: "light"
                      | "dark";
                  }[];
                  mimeType?: string;
                  name: string;
                  size?: number;
                  title?: string;
                  type: "resource_link";
                  uri: string;
              }
              | {
                  _meta?: { [key: string]: unknown };
                  annotations?: {
                      audience?: ("user" | "assistant")[];
                      lastModified?: string;
                      priority?: number;
                  };
                  resource: | {
                      _meta?: { [key: string]: unknown };
                      mimeType?: string;
                      text: string;
                      uri: string;
                  }
                  | {
                      _meta?: { [key: string]: unknown };
                      blob: string;
                      mimeType?: string;
                      uri: string;
                  };
                  type: "resource";
              };
              role: "user"
              | "assistant";
          }[],
      >

    • Parameters

      • serverId: string

      Returns Promise<
          {
              _meta?: { [key: string]: unknown };
              arguments?: { description?: string; name: string; required?: boolean }[];
              description?: string;
              icons?: {
                  mimeType?: string;
                  sizes?: string[];
                  src: string;
                  theme?: "light" | "dark";
              }[];
              name: string;
              title?: string;
          }[],
      >

    • Parameters

      • serverId: string

      Returns Promise<
          {
              _meta?: { [key: string]: unknown };
              annotations?: {
                  audience?: ("user" | "assistant")[];
                  lastModified?: string;
                  priority?: number;
              };
              description?: string;
              icons?: {
                  mimeType?: string;
                  sizes?: string[];
                  src: string;
                  theme?: "light"
                  | "dark";
              }[];
              mimeType?: string;
              name: string;
              size?: number;
              title?: string;
              uri: string;
          }[],
      >

    • Parameters

      • serverId: string

      Returns Promise<
          {
              _meta?: { [key: string]: unknown };
              annotations?: {
                  destructiveHint?: boolean;
                  idempotentHint?: boolean;
                  openWorldHint?: boolean;
                  readOnlyHint?: boolean;
                  title?: string;
              };
              description?: string;
              execution?: { taskSupport?: "optional"
              | "required"
              | "forbidden" };
              icons?: {
                  mimeType?: string;
                  sizes?: string[];
                  src: string;
                  theme?: "light" | "dark";
              }[];
              inputSchema: {
                  properties?: { [key: string]: object };
                  required?: string[];
                  type: "object";
                  [key: string]: unknown;
              };
              name: string;
              outputSchema?: {
                  properties?: { [key: string]: object };
                  required?: string[];
                  type: "object";
                  [key: string]: unknown;
              };
              title?: string;
          }[],
      >