Skip to main content
Glama

apply_cognitive_bias

Apply cognitive biases like Fitts' Law, grouping, or serial-position effect to React components to improve user experience through proven psychological principles.

Instructions

Aplica viés cognitivo específico para melhor UX

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
biasYesViés cognitivo a aplicar
componentYesCódigo do componente ou nome do arquivo

Implementation Reference

  • Handler implementation for the 'apply_cognitive_bias' tool. Maps the specified cognitive bias to a UX guideline key, retrieves the guideline from UX_GUIDELINES, and returns formatted instructions for the given component. Handles unknown biases with an error response.
    case 'apply_cognitive_bias': const biasMap = { fitts: 'fittssLaw', grouping: 'groupingEffect', }; const biasKey = biasMap[args.bias]; const bias = UX_GUIDELINES[biasKey]; if (!bias) { return { content: [ { type: 'text', text: `Viés ${args.bias} não encontrado.`, }, ], isError: true, }; } return { content: [ { type: 'text', text: `**${bias.description}**\n\n${bias.instructions}\n\n**Componente:** ${args.component}`, }, ], };
  • index.js:464-482 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and input schema for 'apply_cognitive_bias'.
    { name: 'apply_cognitive_bias', description: 'Aplica viés cognitivo específico para melhor UX', inputSchema: { type: 'object', properties: { component: { type: 'string', description: 'Código do componente ou nome do arquivo', }, bias: { type: 'string', enum: ['fitts', 'grouping', 'proximity', 'zeigarnik', 'serial-position', 'hicks'], description: 'Viés cognitivo a aplicar', }, }, required: ['component', 'bias'], }, },
  • Input schema definition for the 'apply_cognitive_bias' tool, specifying required parameters 'component' and 'bias' with enum values.
    inputSchema: { type: 'object', properties: { component: { type: 'string', description: 'Código do componente ou nome do arquivo', }, bias: { type: 'string', enum: ['fitts', 'grouping', 'proximity', 'zeigarnik', 'serial-position', 'hicks'], description: 'Viés cognitivo a aplicar', }, }, required: ['component', 'bias'], },
  • Bias mapping helper used in the handler to map input bias names to UX_GUIDELINES keys.
    const biasMap = { fitts: 'fittssLaw', grouping: 'groupingEffect', };

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/MarcusViniciusBarcelos/uiux-tools-react-mui'

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