sailfork / t3code-github / apps/ server/ src/ mcp/ toolkits/ attachment/ input.ts

import { ChatFileAttachment, ChatImageAttachment } from "@t3tools/contracts";
import * as Schema from "effect/Schema";
import * as Struct from "effect/Struct";

// Keep screenshot provenance in app metadata; its recursive tree breaks model tool schemas.
export const McpAttachmentInput = Schema.Union([
  ChatImageAttachment.mapFields(Struct.omit(["source"])),
  ChatFileAttachment,
]);