templui-mcp-server
Version:
A Model Context Protocol (MCP) server for TemplUI components, providing AI assistants with access to component source code, documentation, demos, and metadata.
57 lines (56 loc) • 1.71 kB
TypeScript
import { z } from 'zod';
export declare const componentNameSchema: z.ZodObject<{
componentName: z.ZodString;
}, "strip", z.ZodTypeAny, {
componentName: string;
}, {
componentName: string;
}>;
export declare const listComponentsSchema: z.ZodObject<{
category: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
category?: string | undefined;
}, {
category?: string | undefined;
}>;
export declare const getDirectoryStructureSchema: z.ZodObject<{
path: z.ZodOptional<z.ZodString>;
owner: z.ZodOptional<z.ZodString>;
repo: z.ZodOptional<z.ZodString>;
branch: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
path?: string | undefined;
owner?: string | undefined;
repo?: string | undefined;
branch?: string | undefined;
}, {
path?: string | undefined;
owner?: string | undefined;
repo?: string | undefined;
branch?: string | undefined;
}>;
/**
* Validate and sanitize input parameters for tools
*/
export declare function validateAndSanitizeParams(toolName: string, params: any): any;
/**
* Sanitize component name to ensure it's safe and consistent
*/
export declare function sanitizeComponentName(name: string): string;
/**
* Validate that a component exists in our known components list
*/
export declare function validateComponentExists(componentName: string, knownComponents: string[]): boolean;
/**
* Sanitize and validate category parameter
*/
export declare function sanitizeCategory(category?: string): string | undefined;
/**
* Validate GitHub repository parameters
*/
export declare function validateGitHubParams(params: any): {
owner: string;
repo: string;
branch: string;
path: string;
};