Skip to main content
Glama

list_web_components

Retrieve web accessibility components from MagentaA11y with optional category filtering to support development of accessible interfaces.

Instructions

List all available web accessibility components from MagentaA11y. Optionally filter by category (e.g., controls, forms, components).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoOptional category filter (e.g., "controls", "forms", "components")

Implementation Reference

  • Core handler function that executes the list_web_components tool logic by calling contentLoader to list web components and categories, then formats the response as MCP content.
    async function handleListWebComponents(args: any) { const components = contentLoader.listComponents('web', args?.category); const categories = contentLoader.getCategories('web'); return { content: [ { type: 'text', text: JSON.stringify( { components, categories, }, null, 2 ), }, ], }; }
  • Input schema and metadata definition for the list_web_components tool, used for MCP tool listing and validation.
    name: 'list_web_components', description: 'List all available web accessibility components from MagentaA11y. Optionally filter by category (e.g., controls, forms, components).', inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Optional category filter (e.g., "controls", "forms", "components")', }, }, }, },
  • src/index.ts:36-40 (registration)
    Registers the tool list handler which exposes list_web_components in the MCP tools/list response.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TOOL_DEFINITIONS, }; });
  • src/index.ts:50-51 (registration)
    Dispatch registration in the main CallToolRequestSchema switch statement that routes calls to the handler.
    case 'list_web_components': return await handleListWebComponents(args);
  • Inline handler implementation for the Netlify HTTP transport version of the MCP server.
    case 'list_web_components': { const components = contentLoader.listComponents('web', args?.category); const categories = contentLoader.getCategories('web'); return { content: [{ type: 'text', text: JSON.stringify({ components, categories }, null, 2) }] }; }

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/joe-watkins/magentaa11y-mcp-remote'

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