MCP TypeScript SDK
    Preparing search index...

    Function mergeCapabilities

    • Parameters

      • base: {
            completions?: object;
            experimental?: { [key: string]: object };
            logging?: object;
            prompts?: { listChanged?: boolean };
            resources?: { listChanged?: boolean; subscribe?: boolean };
            tasks?: {
                cancel?: object;
                list?: object;
                requests?: {
                    tools?: { call?: object; [key: string]: unknown };
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
            tools?: { listChanged?: boolean };
        }
        • Optionalcompletions?: object

          Present if the server supports sending completions to the client.

        • Optionalexperimental?: { [key: string]: object }

          Experimental, non-standard capabilities that the server supports.

        • Optionallogging?: object

          Present if the server supports sending log messages to the client.

        • Optionalprompts?: { listChanged?: boolean }

          Present if the server offers any prompt templates.

          • OptionallistChanged?: boolean

            Whether this server supports issuing notifications for changes to the prompt list.

        • Optionalresources?: { listChanged?: boolean; subscribe?: boolean }

          Present if the server offers any resources to read.

          • OptionallistChanged?: boolean

            Whether this server supports issuing notifications for changes to the resource list.

          • Optionalsubscribe?: boolean

            Whether this server supports clients subscribing to resource updates.

        • Optionaltasks?: {
              cancel?: object;
              list?: object;
              requests?: {
                  tools?: { call?: object; [key: string]: unknown };
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          }

          Present if the server supports task creation.

          • Optionalcancel?: object

            Present if the server supports cancelling tasks.

          • Optionallist?: object

            Present if the server supports listing tasks.

          • Optionalrequests?: { tools?: { call?: object; [key: string]: unknown }; [key: string]: unknown }

            Capabilities for task creation on specific request types.

            • Optionaltools?: { call?: object; [key: string]: unknown }

              Task support for tool requests.

        • Optionaltools?: { listChanged?: boolean }

          Present if the server offers any tools to call.

          • OptionallistChanged?: boolean

            Whether this server supports issuing notifications for changes to the tool list.

      • additional: Partial<ServerCapabilities>

      Returns {
          completions?: object;
          experimental?: { [key: string]: object };
          logging?: object;
          prompts?: { listChanged?: boolean };
          resources?: { listChanged?: boolean; subscribe?: boolean };
          tasks?: {
              cancel?: object;
              list?: object;
              requests?: {
                  tools?: { call?: object; [key: string]: unknown };
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          };
          tools?: { listChanged?: boolean };
      }

      • Optionalcompletions?: object

        Present if the server supports sending completions to the client.

      • Optionalexperimental?: { [key: string]: object }

        Experimental, non-standard capabilities that the server supports.

      • Optionallogging?: object

        Present if the server supports sending log messages to the client.

      • Optionalprompts?: { listChanged?: boolean }

        Present if the server offers any prompt templates.

        • OptionallistChanged?: boolean

          Whether this server supports issuing notifications for changes to the prompt list.

      • Optionalresources?: { listChanged?: boolean; subscribe?: boolean }

        Present if the server offers any resources to read.

        • OptionallistChanged?: boolean

          Whether this server supports issuing notifications for changes to the resource list.

        • Optionalsubscribe?: boolean

          Whether this server supports clients subscribing to resource updates.

      • Optionaltasks?: {
            cancel?: object;
            list?: object;
            requests?: {
                tools?: { call?: object; [key: string]: unknown };
                [key: string]: unknown;
            };
            [key: string]: unknown;
        }

        Present if the server supports task creation.

        • Optionalcancel?: object

          Present if the server supports cancelling tasks.

        • Optionallist?: object

          Present if the server supports listing tasks.

        • Optionalrequests?: { tools?: { call?: object; [key: string]: unknown }; [key: string]: unknown }

          Capabilities for task creation on specific request types.

          • Optionaltools?: { call?: object; [key: string]: unknown }

            Task support for tool requests.

      • Optionaltools?: { listChanged?: boolean }

        Present if the server offers any tools to call.

        • OptionallistChanged?: boolean

          Whether this server supports issuing notifications for changes to the tool list.

    • Parameters

      • base: {
            elicitation?: {
                form?: { applyDefaults?: boolean; [key: string]: unknown };
                url?: object;
                [key: string]: unknown;
            };
            experimental?: { [key: string]: object };
            roots?: { listChanged?: boolean };
            sampling?: { context?: object; tools?: object };
            tasks?: {
                cancel?: object;
                list?: object;
                requests?: {
                    elicitation?: { create?: object; [key: string]: unknown };
                    sampling?: { createMessage?: object; [key: string]: unknown };
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        }
        • Optionalelicitation?: {
              form?: { applyDefaults?: boolean; [key: string]: unknown };
              url?: object;
              [key: string]: unknown;
          }

          Present if the client supports eliciting user input.

        • Optionalexperimental?: { [key: string]: object }

          Experimental, non-standard capabilities that the client supports.

        • Optionalroots?: { listChanged?: boolean }

          Present if the client supports listing roots.

          • OptionallistChanged?: boolean

            Whether the client supports issuing notifications for changes to the roots list.

        • Optionalsampling?: { context?: object; tools?: object }

          Present if the client supports sampling from an LLM.

          • Optionalcontext?: object

            Present if the client supports context inclusion via includeContext parameter. If not declared, servers SHOULD only use includeContext: "none" (or omit it).

          • Optionaltools?: object

            Present if the client supports tool use via tools and toolChoice parameters.

        • Optionaltasks?: {
              cancel?: object;
              list?: object;
              requests?: {
                  elicitation?: { create?: object; [key: string]: unknown };
                  sampling?: { createMessage?: object; [key: string]: unknown };
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          }

          Present if the client supports task creation.

          • Optionalcancel?: object

            Present if the client supports cancelling tasks.

          • Optionallist?: object

            Present if the client supports listing tasks.

          • Optionalrequests?: {
                elicitation?: { create?: object; [key: string]: unknown };
                sampling?: { createMessage?: object; [key: string]: unknown };
                [key: string]: unknown;
            }

            Capabilities for task creation on specific request types.

            • Optionalelicitation?: { create?: object; [key: string]: unknown }

              Task support for elicitation requests.

            • Optionalsampling?: { createMessage?: object; [key: string]: unknown }

              Task support for sampling requests.

      • additional: Partial<ClientCapabilities>

      Returns {
          elicitation?: {
              form?: { applyDefaults?: boolean; [key: string]: unknown };
              url?: object;
              [key: string]: unknown;
          };
          experimental?: { [key: string]: object };
          roots?: { listChanged?: boolean };
          sampling?: { context?: object; tools?: object };
          tasks?: {
              cancel?: object;
              list?: object;
              requests?: {
                  elicitation?: { create?: object; [key: string]: unknown };
                  sampling?: { createMessage?: object; [key: string]: unknown };
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          };
      }

      • Optionalelicitation?: {
            form?: { applyDefaults?: boolean; [key: string]: unknown };
            url?: object;
            [key: string]: unknown;
        }

        Present if the client supports eliciting user input.

      • Optionalexperimental?: { [key: string]: object }

        Experimental, non-standard capabilities that the client supports.

      • Optionalroots?: { listChanged?: boolean }

        Present if the client supports listing roots.

        • OptionallistChanged?: boolean

          Whether the client supports issuing notifications for changes to the roots list.

      • Optionalsampling?: { context?: object; tools?: object }

        Present if the client supports sampling from an LLM.

        • Optionalcontext?: object

          Present if the client supports context inclusion via includeContext parameter. If not declared, servers SHOULD only use includeContext: "none" (or omit it).

        • Optionaltools?: object

          Present if the client supports tool use via tools and toolChoice parameters.

      • Optionaltasks?: {
            cancel?: object;
            list?: object;
            requests?: {
                elicitation?: { create?: object; [key: string]: unknown };
                sampling?: { createMessage?: object; [key: string]: unknown };
                [key: string]: unknown;
            };
            [key: string]: unknown;
        }

        Present if the client supports task creation.

        • Optionalcancel?: object

          Present if the client supports cancelling tasks.

        • Optionallist?: object

          Present if the client supports listing tasks.

        • Optionalrequests?: {
              elicitation?: { create?: object; [key: string]: unknown };
              sampling?: { createMessage?: object; [key: string]: unknown };
              [key: string]: unknown;
          }

          Capabilities for task creation on specific request types.

          • Optionalelicitation?: { create?: object; [key: string]: unknown }

            Task support for elicitation requests.

          • Optionalsampling?: { createMessage?: object; [key: string]: unknown }

            Task support for sampling requests.