banner
Render text as large ASCII headers using FIGlet fonts to create CLI titles and welcome messages. Choose from Standard, Small, Slant, Big, or Mini font styles.
Instructions
Render text as a large ASCII banner using FIGlet fonts. Great for CLI headers, welcome messages, and titles.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to render (max 50 chars) | |
| font | No | Font: Standard (default), Small (compact), Slant (italic), Big (bold), Mini (minimal) | Standard |
Implementation Reference
- src/banner.ts:6-8 (handler)The core handler function 'renderBanner' that executes the banner tool logic. Takes text and font parameters, uses the figlet library to render ASCII art.
export function renderBanner(text: string, font: BannerFont = 'Standard'): string { return figlet.textSync(text, { font }); } - src/mcp.ts:96-107 (registration)MCP tool registration for 'banner'. Registers the tool with name, description, Zod schema validation, and handler callback that calls renderBanner.
server.tool( 'banner', 'Render text as a large ASCII banner using FIGlet fonts. Great for CLI headers, welcome messages, and titles.', { text: z.string().max(50).describe('Text to render (max 50 chars)'), font: z.enum(BANNER_FONTS).default('Standard').describe('Font: Standard (default), Small (compact), Slant (italic), Big (bold), Mini (minimal)'), }, async ({ text, font }) => { const banner = renderBanner(text, font); return { content: [{ type: 'text', text: banner }] }; } ); - src/mcp.ts:99-101 (schema)Zod schema definition for the banner tool inputs. Validates 'text' (max 50 chars) and 'font' (enum with default).
{ text: z.string().max(50).describe('Text to render (max 50 chars)'), font: z.enum(BANNER_FONTS).default('Standard').describe('Font: Standard (default), Small (compact), Slant (italic), Big (bold), Mini (minimal)'), - src/banner.ts:3-4 (helper)BANNER_FONTS constant and BannerFont type definition. Defines the available font options for the banner tool.
export const BANNER_FONTS = ['Standard', 'Small', 'Slant', 'Big', 'Mini'] as const; export type BannerFont = (typeof BANNER_FONTS)[number]; - src/banner.ts:10-18 (helper)Helper function 'listBannerFonts' that returns font metadata with descriptions. Used by the /banner/fonts HTTP endpoint.
export function listBannerFonts(): { name: BannerFont; description: string }[] { return [ { name: 'Standard', description: 'Default balanced font' }, { name: 'Small', description: 'Compact, saves tokens' }, { name: 'Slant', description: 'Italic style' }, { name: 'Big', description: 'Bold emphasis' }, { name: 'Mini', description: 'Minimal 3-line font' }, ]; }