list_native_components
Retrieve native iOS/Android accessibility components from MagentaA11y. Filter by category to find specific controls or components for accessibility testing and development.
Instructions
List all available native (iOS/Android) accessibility components from MagentaA11y. Optionally filter by category.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Optional category filter (e.g., "controls", "components") |
Implementation Reference
- src/index.ts:168-187 (handler)Primary handler function for the list_native_components tool. Lists native accessibility components and categories using ContentLoader, optionally filtered by category, and returns a JSON-formatted MCP response.async function handleListNativeComponents(args: any) { const components = contentLoader.listComponents('native', args?.category); const categories = contentLoader.getCategories('native'); return { content: [ { type: 'text', text: JSON.stringify( { components, categories, }, null, 2 ), }, ], }; }
- src/tool-definitions.ts:60-72 (schema)Tool schema definition including name, description, and input schema allowing an optional category filter.{ name: 'list_native_components', description: 'List all available native (iOS/Android) accessibility components from MagentaA11y. Optionally filter by category.', inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Optional category filter (e.g., "controls", "components")', }, }, }, },
- src/index.ts:36-40 (registration)Registers the MCP list tools handler to return TOOL_DEFINITIONS, which includes list_native_components.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TOOL_DEFINITIONS, }; });
- netlify/functions/api.js:39-42 (handler)Alternative inline handler for list_native_components in the Netlify HTTP transport implementation.case 'list_native_components': { const components = contentLoader.listComponents('native', args?.category); const categories = contentLoader.getCategories('native'); return { content: [{ type: 'text', text: JSON.stringify({ components, categories }, null, 2) }] };
- src/index.ts:56-57 (registration)Dispatch case in the MCP CallToolRequestSchema handler that routes to the list_native_components handler function.case 'list_native_components': return await handleListNativeComponents(args);