Skip to main content
Glama
hungnguyen1503

Renesas FSP MCP Server

search_documentation

Search Renesas FSP documentation by query and category to find drivers, RTOS, middleware, or security details from the GitHub repository.

Instructions

Search FSP documentation from GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch query for documentation
categoryNo

Implementation Reference

  • Main handler function that executes the search_documentation tool. Takes query and category arguments, matches against a module list loaded from fsp-modules.json, and returns formatted documentation links from the Renesas FSP GitHub repository and docs site.
    export const documentationSearchHandler = async (args?: any) => {
      const query = args?.query || '';
      const category = args?.category || 'all';
    
      const repoBaseUrl = 'https://github.com/renesas/fsp';
      const rawBaseUrl = 'https://raw.githubusercontent.com/renesas/fsp/master';
      const docsBaseUrl = 'https://renesas.github.io/fsp';
    
      // If query matches a known module, provide direct links
      const matchedModule = moduleList.find(m => 
        m.toLowerCase() === query.toLowerCase() || 
        m.toLowerCase().includes(query.toLowerCase())
      );
    
      const moduleLinks = matchedModule ? [
        `• API header: ${repoBaseUrl}/tree/master/ra/fsp/inc/api/${matchedModule}.h`,
        `• Source: ${repoBaseUrl}/tree/master/ra/fsp/src/${matchedModule}`,
        `• Instance: ${repoBaseUrl}/tree/master/ra/fsp/inc/instances/${matchedModule}.h`
      ].join('\n') : '';
    
      // Use general documentation site for category
      const docLink = `${docsBaseUrl}/modules.html`;
    
      return {
        content: [
          {
            type: "text",
            text: `
    ================================================================================
    FSP DOCUMENTATION SEARCH RESULTS
    ================================================================================
    
    Query: "${query}"
    Category: ${category.toUpperCase()}
    
    --------------------------------------------------------------------------------
    ${matchedModule ? `DIRECT MODULE LINKS FOR "${matchedModule.toUpperCase()}":
    --------------------------------------------------------------------------------
    ${moduleLinks}
    
    --------------------------------------------------------------------------------` : ''}
    SEARCH RESULTS:
    --------------------------------------------------------------------------------
    
    📄 1. FSP Architecture Overview
       Link: ${repoBaseUrl}/blob/master/README.md
       Docs: ${docsBaseUrl}
       Description: Main README file containing FSP architecture overview, supported platforms, and setup information.
    
    📄 2. Supported Software Modules
       Link: ${repoBaseUrl}/blob/master/SUPPORTED_SOFTWARE.md
       Docs: ${docsBaseUrl}/modules.html
       Description: Complete list of software modules packaged with FSP including drivers, RTOS, and middleware.
    
    📄 3. ${category.toUpperCase()} Documentation
       Link: ${repoBaseUrl}/blob/master${docLink}   Docs: ${docLink}   Description: Documentation for ${category} related components and APIs.
    
    --------------------------------------------------------------------------------
    USE THE OFFICIAL RENESAS FSP RESOURCES:
    --------------------------------------------------------------------------------
    • Repository: ${repoBaseUrl}
    • Documentation: ${docsBaseUrl}
    • Module Examples: ${docLink}
    
    --------------------------------------------------------------------------------
    AVAILABLE CATEGORIES:
    --------------------------------------------------------------------------------
    • all      - General FSP documentation
    • drivers   - Peripheral driver guides and HAL API references
    • rtos      - RTOS integration (Azure RTOS/FreeRTOS)
    • middleware - Communication and security middleware stacks
    • security  - Secure boot, cryptographic engine, TEE
    
    ================================================================================
    `
          }
        ]
      };
    };
  • Input schema definition for the search_documentation tool, specifying 'query' (string) and 'category' (enum: drivers, rtos, middleware, security, all) parameters.
    {
      name: "search_documentation",
      description: "Search FSP documentation from GitHub repository",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query for documentation"
          },
          category: {
            type: "string",
            enum: ["drivers", "rtos", "middleware", "security", "all"]
          }
        }
      }
    },
  • src/index.ts:158-159 (registration)
    Registration of the search_documentation tool in the CallToolRequestSchema switch-case, dispatching to documentationSearchHandler(args).
    case "search_documentation":
      return await documentationSearchHandler(args);
  • src/index.ts:32-146 (registration)
    Tool listing registration including search_documentation name, description, and inputSchema for the ListToolsRequestSchema handler.
    tools: [
      {
        name: "fsp_info",
        description: "Get FSP architecture information and details",
        inputSchema: {
          type: "object",
          properties: {
            target: {
              type: "string",
              description: "Target platform (RA6, RA8, R74C, etc.)"
            }
          }
        }
      },
      {
        name: "fsp_version",
        description: "Get FSP version information and release notes",
        inputSchema: {
          type: "object",
          properties: {}
        }
      },
      {
        name: "search_documentation",
        description: "Search FSP documentation from GitHub repository",
        inputSchema: {
          type: "object",
          properties: {
            query: {
              type: "string",
              description: "Search query for documentation"
            },
            category: {
              type: "string",
              enum: ["drivers", "rtos", "middleware", "security", "all"]
            }
          }
        }
      },
      {
        name: "find_code_examples",
        description: "Find code examples for specific FSP features or peripherals",
        inputSchema: {
          type: "object",
          properties: {
            feature: {
              type: "string",
              description: "Feature to find examples for (e.g., 'SPI', 'UART', 'secure_boot')"
            },
            platform: {
              type: "string",
              description: "Target platform filter"
            }
          }
        }
      },
      {
        name: "get_api_reference",
        description: "Get API reference documentation for FSP functions and structures",
        inputSchema: {
          type: "object",
          properties: {
            module: {
              type: "string",
              description: "Module name (e.g., 'FspLib', 'Spi', 'I2c')"
            },
            function: {
              type: "string",
              description: "Specific function name"
            }
          }
        }
      },
      {
        name: "manage_dependencies",
        description: "Manage FSP dependencies, versions, and compatibility matrix",
        inputSchema: {
          type: "object",
          properties: {
            action: {
              type: "string",
              enum: ["list", "check_compatibility", "get_versions"]
            },
            platform: {
              type: "string",
              description: "Target MCU platform"
            }
          }
        }
      },
      {
        name: "fsp_build_info",
        description: "Get FSP build-related information",
        inputSchema: {
          type: "object",
          properties: {}
        }
      },
      {
        name: "fsp_config_info",
        description: "Get FSP configuration information",
        inputSchema: {
          type: "object",
          properties: {}
        }
      },
      {
        name: "fsp_help",
        description: "Get help information for the FSP MCP server",
        inputSchema: {
          type: "object",
          properties: {}
        }
      }
    ]
  • Helper code that loads the module list from fsp-modules.json file at startup, used by the handler to match queries against known modules.
    const modulesPath = path.join(process.cwd(), 'src', 'fsp-modules.json');
    let moduleList: string[] = [];
    try {
      const data = fs.readFileSync(modulesPath, 'utf8');
      moduleList = JSON.parse(data).modules || [];
    } catch (e) {
      // ignore
    }
Behavior2/5

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

No annotations provided, so the description must fully disclose behavior. It does not state read-only nature, authentication needs, rate limits, or whether it triggers external calls. 'Search' implies read-only but is not explicit.

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?

A single, concise sentence that is front-loaded with the action. No superfluous words, but could include more detail without becoming verbose.

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?

Missing crucial context: what FSP stands for, what type of documentation is searched, output format, pagination, or limitations. With no output schema and no annotations, the description leaves the agent underinformed.

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 coverage is 50% (query has description, category does not). The description adds no extra meaning beyond the schema; it does not clarify how to formulate 'query' or the significance of 'category' values.

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

Purpose4/5

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

The description clearly states the action ('Search') and the resource ('FSP documentation from GitHub repository'). It distinguishes from sibling tools like find_code_examples and get_api_reference, but lacks specificity about the scope of 'documentation'.

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?

No guidance on when to use this tool versus siblings like find_code_examples. There is no mention of when to avoid using it or any prerequisites.

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/hungnguyen1503/fsp-mcp'

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