Skip to main content
Glama

workflow_optimize_ux

Analyze and improve user experience by running comprehensive optimization checks for performance, accessibility, usability, mobile responsiveness, and SEO.

Instructions

Run comprehensive UX optimization analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
analysesNo

Implementation Reference

  • The main handler function for the 'workflow_optimize_ux' tool. It validates input using OptimizeUXSchema, orchestrates multiple UX analyses (performance, accessibility, usability, mobile, SEO), calculates an overall score, generates recommendations, and returns structured results.
    async optimizeUX(args: any) {
      const params = OptimizeUXSchema.parse(args);
      const analyses = params.analyses || ['performance', 'accessibility', 'usability'];
      
      try {
        const results: any = {
          url: params.url,
          timestamp: new Date().toISOString(),
          analyses: {},
          recommendations: [],
          overallScore: 0
        };
    
        // Performance Analysis
        if (analyses.includes('performance')) {
          results.analyses.performance = await this.analyzePerformance(params.url);
        }
    
        // Accessibility Analysis
        if (analyses.includes('accessibility')) {
          results.analyses.accessibility = await this.analyzeAccessibility(params.url);
        }
    
        // Usability Analysis
        if (analyses.includes('usability')) {
          results.analyses.usability = await this.analyzeUsability(params.url);
        }
    
        // Mobile Analysis
        if (analyses.includes('mobile')) {
          results.analyses.mobile = await this.analyzeMobile(params.url);
        }
    
        // SEO Analysis
        if (analyses.includes('seo')) {
          results.analyses.seo = await this.analyzeSEO(params.url);
        }
    
        // Calculate overall score
        const scores = Object.values(results.analyses).map((a: any) => a.score || 0);
        results.overallScore = scores.reduce((a, b) => a + b, 0) / scores.length;
    
        // Generate recommendations
        results.recommendations = this.generateUXRecommendations(results.analyses);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(results, null, 2)
            }
          ]
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: `Error optimizing UX: ${error.message}`
            }
          ],
          isError: true
        };
      }
    }
  • Zod schema used for input validation in the optimizeUX handler.
    const OptimizeUXSchema = z.object({
      url: z.string().url(),
      analyses: z.array(z.enum(['performance', 'accessibility', 'usability', 'mobile', 'seo'])).optional()
    });
  • src/index.ts:257-273 (registration)
    Tool registration entry in the ListTools response, defining name, description, and input schema for discovery.
      name: 'workflow_optimize_ux',
      description: 'Run comprehensive UX optimization analysis',
      inputSchema: {
        type: 'object',
        properties: {
          url: { type: 'string' },
          analyses: {
            type: 'array',
            items: {
              type: 'string',
              enum: ['performance', 'accessibility', 'usability', 'mobile', 'seo']
            }
          }
        },
        required: ['url']
      }
    },
  • src/index.ts:332-333 (registration)
    Dispatch case in the CallToolRequestHandler switch statement that routes execution to the workflowTools.optimizeUX method.
    case 'workflow_optimize_ux':
      return await this.workflowTools.optimizeUX(args);
  • Helper method that simulates performance analysis, returning metrics, score, and optimization opportunities. Called by the main handler.
    private async analyzePerformance(url: string): Promise<any> {
      // Simulate performance analysis
      return {
        score: 85,
        metrics: {
          firstContentfulPaint: '1.2s',
          largestContentfulPaint: '2.4s',
          totalBlockingTime: '150ms',
          cumulativeLayoutShift: 0.05,
          speedIndex: '3.2s'
        },
        opportunities: [
          'Reduce JavaScript bundle size',
          'Optimize images',
          'Enable text compression'
        ]
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'comprehensive UX optimization analysis' but doesn't clarify what this entails operationally—such as whether it's a read-only analysis, if it modifies anything, runtime characteristics, or output format. This leaves critical behavioral traits unspecified for a tool with potential complexity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, making it appropriately concise. However, it's not front-loaded with critical details like parameter context or usage guidelines, which could improve structure. Overall, it's brief but lacks depth.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (involving UX analysis with multiple parameter options), lack of annotations, no output schema, and 0% schema description coverage, the description is incomplete. It doesn't address what the tool returns, how analyses are performed, or prerequisites, leaving the agent with insufficient information to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It adds no meaning beyond the schema—failing to explain what 'url' should point to (e.g., a webpage, design file) or what 'analyses' array does (e.g., selecting specific UX aspects to evaluate). With two parameters and no schema descriptions, this is a significant gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Run comprehensive UX optimization analysis') which is a clear verb+resource combination, but it's vague about what 'comprehensive' entails and doesn't distinguish this from potential sibling tools like 'component_analyze' or 'playwright_test_ui' that might also analyze aspects of user experience. It provides a basic purpose but lacks specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives. There are no explicit when/when-not instructions or references to sibling tools, leaving the agent to infer usage from the name alone. This lack of context makes it difficult to select appropriately among the server's analysis-related tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/willem4130/ui-ux-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server