@chrisreedio/fontawesome-pro-mcp
Version:
Font Awesome Pro MCP Server for icon search and retrieval
21 lines • 743 B
JavaScript
import { z } from 'zod';
import { faLoader } from '../fa/loader.js';
const GetIconSchema = z.object({
name: z.string().describe('The icon name (e.g., "home", "user")'),
style: z.enum(['solid', 'regular', 'light', 'thin', 'duotone', 'brands']).describe('The icon style')
});
export function getIcon(params) {
const { name, style } = GetIconSchema.parse(params);
const icon = faLoader.getIcon(name, style);
if (!icon) {
return `Icon "${name}" not found in style "${style}"`;
}
return icon;
}
export const getIconMethod = {
name: 'getIcon',
description: 'Get a specific Font Awesome Pro icon with SVG content',
inputSchema: GetIconSchema,
handler: getIcon
};
//# sourceMappingURL=getIcon.js.map