Skip to main content
Glama

get_component_native_notes

Retrieve platform-specific developer notes for native iOS or Android components to understand implementation details and accessibility requirements.

Instructions

Get platform-specific developer notes for native components (iOS or Android implementation details).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesNative platform (ios or android)
componentYesComponent name (e.g., "button", "switch")

Implementation Reference

  • Main handler function for get_component_native_notes tool. Fetches platform-specific (iOS/Android) developer notes for native components using ContentLoader, includes error handling with suggestions.
    async function handleGetComponentNativeNotes(args: any) {
      try {
        const format = args.platform === 'ios' ? 'iosDeveloperNotes' : 'androidDeveloperNotes';
        const content = await contentLoader.getComponentContent('native', args.component, format);
        return {
          content: [
            {
              type: 'text',
              text: content,
            },
          ],
        };
      } catch (error: any) {
        const suggestions = contentLoader.getSimilarComponents('native', args.component);
        const formats = contentLoader.getAvailableFormats('native', args.component);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(
                {
                  error: error.message,
                  component: args.component,
                  platform: args.platform,
                  suggestions,
                  availableFormats: formats,
                },
                null,
                2
              ),
            },
          ],
          isError: true,
        };
      }
    }
  • Tool schema definition including name, description, and input schema requiring 'platform' (ios/android) and 'component'.
    {
      name: 'get_component_native_notes',
      description: 'Get platform-specific developer notes for native components (iOS or Android implementation details).',
      inputSchema: {
        type: 'object',
        properties: {
          platform: {
            type: 'string',
            enum: ['ios', 'android'],
            description: 'Native platform (ios or android)',
          },
          component: {
            type: 'string',
            description: 'Component name (e.g., "button", "switch")',
          },
        },
        required: ['platform', 'component'],
      },
    },
  • src/index.ts:36-40 (registration)
    Registers all tools including get_component_native_notes by returning TOOL_DEFINITIONS in the ListToolsRequest handler for the stdio MCP server.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: TOOL_DEFINITIONS,
      };
    });
  • src/index.ts:68-69 (registration)
    Dispatches calls to the get_component_native_notes handler in the CallToolRequest switch statement.
    case 'get_component_native_notes':
      return await handleGetComponentNativeNotes(args);
  • Duplicate inline handler for Netlify HTTP transport, similar logic without full error handling.
    case 'get_component_native_notes': {
      const format = args.platform === 'ios' ? 'iosDeveloperNotes' : 'androidDeveloperNotes';
      const content = await contentLoader.getComponentContent('native', args.component, format);
      return { content: [{ type: 'text', text: content }] };
    }

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