MCP Server Framework - v1.1.2
    Preparing search index...
    • Create a response that consists of a single resource_link content block.

      Tools that point at large or out-of-band payloads (logs, inspect dumps, compose files) emit a resource link instead of inlining the payload. Clients call resources/read with the URI to retrieve the content.

      For most tools, prefer attaching links via the links option of text, json or structured so the response keeps a human-readable summary alongside the link. Use this helper when the link is the entire response.

      Parameters

      • spec: ResourceLinkSpec

        Resource link specification (URI, name, optional MIME / description / title)

      • Optionaloptions: ResponseOptions

        Optional metadata, annotations, structured content

      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;
                  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";
              }
          )[];
          isError?: boolean;
          structuredContent?: { [key: string]: unknown };
          [key: string]: unknown;
      }

      A CallToolResult containing a single resource_link content block

      return resourceLink({
      uri: 'ephemeral://logs/abc123',
      name: 'container.log',
      mimeType: 'text/plain',
      });