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

    Implements

    Index

    Constructors

    Properties

    serverListeners: Map<string, Disposable> = ...
    servers: Map<string, MCPServer> = ...

    Methods

    • Parameters

      • serverName: string
      • toolName: string
      • arg_string: string

      Returns Promise<
          {
              _meta?: { [key: string]: unknown };
              content: (
                  | {
                      _meta?: { [key: string]: unknown };
                      text: string;
                      type: "text";
                      [key: string]: unknown;
                  }
                  | {
                      _meta?: { [key: string]: unknown };
                      data: string;
                      mimeType: string;
                      type: "image";
                      [key: string]: unknown;
                  }
                  | {
                      _meta?: { [key: string]: unknown };
                      data: string;
                      mimeType: string;
                      type: "audio";
                      [key: string]: unknown;
                  }
                  | {
                      _meta?: { [key: string]: unknown };
                      description?: string;
                      icons?: {
                          mimeType?: string;
                          sizes?: string;
                          src: string;
                          [key: string]: unknown;
                      }[];
                      mimeType?: string;
                      name: string;
                      title?: string;
                      type: "resource_link";
                      uri: string;
                      [key: string]: unknown;
                  }
                  | {
                      _meta?: { [key: string]: unknown };
                      resource:
                          | {
                              _meta?: { [key: string]: unknown };
                              mimeType?: string;
                              text: string;
                              uri: string;
                              [key: string]: unknown;
                          }
                          | {
                              _meta?: { [key: string]: unknown };
                              blob: string;
                              mimeType?: string;
                              uri: string;
                              [key: string]: unknown;
                          };
                      type: "resource";
                      [key: string]: unknown;
                  }
              )[];
              isError?: boolean;
              structuredContent?: { [key: string]: unknown };
              [key: string]: unknown;
          },
      >

    • Parameters

      • serverName: string

      Returns Promise<
          {
              _meta?: { [key: string]: unknown };
              nextCursor?: string;
              resources: {
                  _meta?: { [key: string]: unknown };
                  description?: string;
                  icons?: {
                      mimeType?: string;
                      sizes?: string;
                      src: string;
                      [key: string]: unknown;
                  }[];
                  mimeType?: string;
                  name: string;
                  title?: string;
                  uri: string;
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          },
      >

    • Parameters

      • serverName: string

      Returns Promise<
          objectOutputType<
              {
                  _meta: ZodOptional<
                      ZodObject<
                          {},
                          "passthrough",
                          ZodTypeAny,
                          objectOutputType<{}, ZodTypeAny, "passthrough">,
                          objectInputType<{}, ZodTypeAny, "passthrough">,
                      >,
                  >;
              } & { nextCursor: ZodOptional<ZodString> } & {
                  tools: ZodArray<
                      ZodObject<
                          { name: ZodString; title: ZodOptional<ZodString> } & {
                              _meta: ZodOptional<
                                  ZodObject<
                                      {},
                                      "passthrough",
                                      ZodTypeAny,
                                      objectOutputType<(...), (...), (...)>,
                                      objectInputType<(...), (...), (...)>,
                                  >,
                              >;
                              annotations: ZodOptional<
                                  ZodObject<
                                      {
                                          destructiveHint: ...;
                                          idempotentHint: ...;
                                          openWorldHint: ...;
                                          readOnlyHint: ...;
                                          title: ...;
                                      },
                                      "passthrough",
                                      ZodTypeAny,
                                      objectOutputType<(...), (...), (...)>,
                                      objectInputType<(...), (...), (...)>,
                                  >,
                              >;
                              description: ZodOptional<ZodString>;
                              icons: ZodOptional<
                                  ZodArray<ZodObject<(...), (...), (...), (...), (...)>, "many">,
                              >;
                              inputSchema: ZodObject<
                                  {
                                      properties: ZodOptional<(...)>;
                                      required: ZodOptional<(...)>;
                                      type: ZodLiteral<(...)>;
                                  },
                                  "passthrough",
                                  ZodTypeAny,
                                  objectOutputType<
                                      { properties: ...; required: ...; type: ... },
                                      ZodTypeAny,
                                      "passthrough",
                                  >,
                                  objectInputType<
                                      { properties: ...; required: ...; type: ... },
                                      ZodTypeAny,
                                      "passthrough",
                                  >,
                              >;
                              outputSchema: ZodOptional<
                                  ZodObject<
                                      { properties: ...; required: ...; type: ... },
                                      "passthrough",
                                      ZodTypeAny,
                                      objectOutputType<(...), (...), (...)>,
                                      objectInputType<(...), (...), (...)>,
                                  >,
                              >;
                          },
                          "passthrough",
                          ZodTypeAny,
                          objectOutputType<
                              { name: ZodString; title: ZodOptional<ZodString> } & {
                                  _meta: ZodOptional<ZodObject<(...), (...), (...), (...), (...)>>;
                                  annotations: ZodOptional<
                                      ZodObject<(...), (...), (...), (...), (...)>,
                                  >;
                                  description: ZodOptional<ZodString>;
                                  icons: ZodOptional<ZodArray<(...), (...)>>;
                                  inputSchema: ZodObject<
                                      { properties: ...; required: ...; type: ... },
                                      "passthrough",
                                      ZodTypeAny,
                                      objectOutputType<(...), (...), (...)>,
                                      objectInputType<(...), (...), (...)>,
                                  >;
                                  outputSchema: ZodOptional<
                                      ZodObject<(...), (...), (...), (...), (...)>,
                                  >;
                              },
                              ZodTypeAny,
                              "passthrough",
                          >,
                          objectInputType<
                              { name: ZodString; title: ZodOptional<ZodString> } & {
                                  _meta: ZodOptional<ZodObject<(...), (...), (...), (...), (...)>>;
                                  annotations: ZodOptional<
                                      ZodObject<(...), (...), (...), (...), (...)>,
                                  >;
                                  description: ZodOptional<ZodString>;
                                  icons: ZodOptional<ZodArray<(...), (...)>>;
                                  inputSchema: ZodObject<
                                      { properties: ...; required: ...; type: ... },
                                      "passthrough",
                                      ZodTypeAny,
                                      objectOutputType<(...), (...), (...)>,
                                      objectInputType<(...), (...), (...)>,
                                  >;
                                  outputSchema: ZodOptional<
                                      ZodObject<(...), (...), (...), (...), (...)>,
                                  >;
                              },
                              ZodTypeAny,
                              "passthrough",
                          >,
                      >,
                      "many",
                  >;
              },
              ZodTypeAny,
              "passthrough",
          >,
      >

    • Parameters

      • serverName: string
      • resourceId: string

      Returns Promise<
          {
              _meta?: { [key: string]: unknown };
              contents: (
                  | {
                      _meta?: { [key: string]: unknown };
                      mimeType?: string;
                      text: string;
                      uri: string;
                      [key: string]: unknown;
                  }
                  | {
                      _meta?: { [key: string]: unknown };
                      blob: string;
                      mimeType?: string;
                      uri: string;
                      [key: string]: unknown;
                  }
              )[];
              [key: string]: unknown;
          },
      >