suggest_improvements
Analyze HTML code to receive AI-powered design improvement suggestions for accessibility, performance, UX, aesthetics, and responsiveness based on your context and target audience.
Instructions
Get AI-powered suggestions for design improvements
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | HTML code to analyze | |
| context | No | Context about the design goals | |
| targetAudience | No | Target audience for the design | |
| focusAreas | No | Areas to focus improvements on |
Implementation Reference
- src/utils/tool-functions.ts:88-97 (handler)The core handler function that executes the 'suggest_improvements' tool logic, returning a structured content response with placeholder suggestion text.export async function suggestImprovements(args: SuggestionOptions) { return { content: [ { type: 'text', text: `Generated suggestions for ${args.context || 'general'}\nFocus: ${args.focus || 'all'}` } ] }; }
- src/index.ts:334-359 (schema)Input schema validation for the suggest_improvements tool parameters.inputSchema: { type: 'object', properties: { html: { type: 'string', description: 'HTML code to analyze' }, context: { type: 'string', description: 'Context about the design goals' }, targetAudience: { type: 'string', description: 'Target audience for the design' }, focusAreas: { type: 'array', items: { type: 'string', enum: ['accessibility', 'performance', 'ux', 'aesthetics', 'responsiveness'] }, description: 'Areas to focus improvements on' } }, required: ['html'] }
- src/index.ts:331-360 (registration)Tool registration object added to the TOOLS array, used by listTools endpoint.{ name: 'suggest_improvements', description: 'Get AI-powered suggestions for design improvements', inputSchema: { type: 'object', properties: { html: { type: 'string', description: 'HTML code to analyze' }, context: { type: 'string', description: 'Context about the design goals' }, targetAudience: { type: 'string', description: 'Target audience for the design' }, focusAreas: { type: 'array', items: { type: 'string', enum: ['accessibility', 'performance', 'ux', 'aesthetics', 'responsiveness'] }, description: 'Areas to focus improvements on' } }, required: ['html'] } },
- src/index.ts:447-448 (handler)Dispatch handler in the CallToolRequestSchema that routes requests for 'suggest_improvements' to the specific implementation function.case 'suggest_improvements': return await suggestImprovements(args as unknown as SuggestionOptions);
- src/types.ts:80-88 (schema)Type definition for SuggestionOptions used in the tool handler signature.export interface SuggestionOptions { html: string; context?: 'landing-page' | 'dashboard' | 'component' | 'form' | 'navigation'; focus?: 'accessibility' | 'performance' | 'design' | 'ux' | 'seo' | 'all'; priority?: 'critical' | 'important' | 'nice-to-have' | 'all'; framework?: 'react' | 'vue' | 'svelte' | 'html'; targetAudience?: string; businessGoals?: string[]; }