hatch-slidev-builder-mcp
Version:
A comprehensive MCP server for creating Slidev presentations with component library, interactive elements, and team collaboration features
178 lines (177 loc) • 6.08 kB
TypeScript
/**
* Generate Assets Tool - Universal asset creation for presentations
* Replaces generateChart and provides comprehensive asset generation capabilities
* Handles: charts, Python simulations, 3D elements, interactive widgets, audio, video, images
*/
import { z } from 'zod';
export declare const generateAssetsSchema: z.ZodObject<{
assetType: z.ZodEnum<["chart", "python-simulation", "3d-element", "interactive-widget", "audio", "video", "image"]>;
content: z.ZodString;
outputDir: z.ZodString;
specifications: z.ZodObject<{
title: z.ZodOptional<z.ZodString>;
dimensions: z.ZodOptional<z.ZodObject<{
width: z.ZodDefault<z.ZodNumber>;
height: z.ZodDefault<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
width: number;
height: number;
}, {
width?: number | undefined;
height?: number | undefined;
}>>;
style: z.ZodDefault<z.ZodOptional<z.ZodString>>;
colors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
format: z.ZodDefault<z.ZodOptional<z.ZodString>>;
interactive: z.ZodDefault<z.ZodBoolean>;
data: z.ZodOptional<z.ZodAny>;
pythonLibraries: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
threeJsComponents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
audioSettings: z.ZodOptional<z.ZodObject<{
duration: z.ZodOptional<z.ZodNumber>;
tempo: z.ZodOptional<z.ZodNumber>;
volume: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
duration?: number | undefined;
tempo?: number | undefined;
volume?: number | undefined;
}, {
duration?: number | undefined;
tempo?: number | undefined;
volume?: number | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
interactive: boolean;
style: string;
format: string;
title?: string | undefined;
dimensions?: {
width: number;
height: number;
} | undefined;
colors?: string[] | undefined;
data?: any;
pythonLibraries?: string[] | undefined;
threeJsComponents?: string[] | undefined;
audioSettings?: {
duration?: number | undefined;
tempo?: number | undefined;
volume?: number | undefined;
} | undefined;
}, {
title?: string | undefined;
interactive?: boolean | undefined;
dimensions?: {
width?: number | undefined;
height?: number | undefined;
} | undefined;
style?: string | undefined;
colors?: string[] | undefined;
format?: string | undefined;
data?: any;
pythonLibraries?: string[] | undefined;
threeJsComponents?: string[] | undefined;
audioSettings?: {
duration?: number | undefined;
tempo?: number | undefined;
volume?: number | undefined;
} | undefined;
}>;
brandGuidelines: z.ZodDefault<z.ZodOptional<z.ZodString>>;
optimize: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
outputDir: string;
brandGuidelines: string;
content: string;
assetType: "audio" | "image" | "chart" | "python-simulation" | "3d-element" | "interactive-widget" | "video";
specifications: {
interactive: boolean;
style: string;
format: string;
title?: string | undefined;
dimensions?: {
width: number;
height: number;
} | undefined;
colors?: string[] | undefined;
data?: any;
pythonLibraries?: string[] | undefined;
threeJsComponents?: string[] | undefined;
audioSettings?: {
duration?: number | undefined;
tempo?: number | undefined;
volume?: number | undefined;
} | undefined;
};
optimize: boolean;
}, {
outputDir: string;
content: string;
assetType: "audio" | "image" | "chart" | "python-simulation" | "3d-element" | "interactive-widget" | "video";
specifications: {
title?: string | undefined;
interactive?: boolean | undefined;
dimensions?: {
width?: number | undefined;
height?: number | undefined;
} | undefined;
style?: string | undefined;
colors?: string[] | undefined;
format?: string | undefined;
data?: any;
pythonLibraries?: string[] | undefined;
threeJsComponents?: string[] | undefined;
audioSettings?: {
duration?: number | undefined;
tempo?: number | undefined;
volume?: number | undefined;
} | undefined;
};
brandGuidelines?: string | undefined;
optimize?: boolean | undefined;
}>;
export declare function generateAssets(args: z.infer<typeof generateAssetsSchema>): Promise<{
success: boolean;
assetType: "audio" | "image" | "chart" | "python-simulation" | "3d-element" | "interactive-widget" | "video";
filePath: string;
metadata: {
type: string;
format: string;
dimensions: {
width: number;
height: number;
} | undefined;
generated: string;
} | {
type: string;
notebook: string;
libraries: string[];
generated: string;
} | {
type: string;
htmlDemo: string;
components: string[];
generated: string;
} | {
type: string;
framework: string;
interactive: boolean;
generated: string;
} | {
type: string;
duration: number;
format: string;
generated: string;
};
usage: string;
message: string;
error?: undefined;
} | {
success: boolean;
error: string;
assetType: "audio" | "image" | "chart" | "python-simulation" | "3d-element" | "interactive-widget" | "video";
filePath?: undefined;
metadata?: undefined;
usage?: undefined;
message?: undefined;
}>;