MCP Server Framework - v1.0.0
    Preparing search index...
    • Create a response with multiple content items.

      Useful for returning text alongside images or multiple text blocks.

      Parameters

      • items: (
            | { annotations?: ContentAnnotations; text: string; type: "text" }
            | {
                annotations?: ContentAnnotations;
                data: string;
                mimeType: string;
                type: "image";
            }
            | {
                annotations?: ContentAnnotations;
                data: string;
                mimeType: string;
                type: "audio";
            }
        )[]

        Array of text, image, and/or audio content

      • Optionaloptions: { _meta?: Record<string, unknown> }

        Optional metadata

      Returns {
          _meta?: {
              "io.modelcontextprotocol/related-task"?: { taskId: string };
              progressToken?: string | number;
              [key: string]: unknown;
          };
          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;
                  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";
              }
          )[];
          isError?: boolean;
          structuredContent?: { [key: string]: unknown };
          [key: string]: unknown;
      }

      A CallToolResult with multiple content items

      return multi([
      { type: 'text', text: 'Here is the chart:' },
      { type: 'image', data: chartBase64, mimeType: 'image/png' },
      ]);