Skip to main content
Glama
gemini2026

Documentation Search MCP Server

by gemini2026

suggest_libraries

Find programming libraries by entering partial names to get auto-completion suggestions for documentation search.

Instructions

Suggest libraries based on partial input for auto-completion.

Args:
    partial_name: Partial library name to search for (e.g. "lang" -> ["langchain"])

Returns:
    List of matching library names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partial_nameYes

Implementation Reference

  • The handler function for the 'suggest_libraries' MCP tool. It provides auto-completion suggestions for library names by matching against the configured docs_urls dictionary, prioritizing exact matches, then prefix matches, then substring matches, returning up to 10 sorted suggestions.
    async def suggest_libraries(partial_name: str):
        """
        Suggest libraries based on partial input for auto-completion.
    
        Args:
            partial_name: Partial library name to search for (e.g. "lang" -> ["langchain"])
    
        Returns:
            List of matching library names
        """
        if not partial_name:
            return list(sorted(docs_urls.keys()))
    
        partial_lower = partial_name.lower()
        suggestions = []
    
        # Exact matches first
        for lib in docs_urls.keys():
            if lib.lower() == partial_lower:
                suggestions.append(lib)
    
        # Starts with matches
        for lib in docs_urls.keys():
            if lib.lower().startswith(partial_lower) and lib not in suggestions:
                suggestions.append(lib)
    
        # Contains matches
        for lib in docs_urls.keys():
            if partial_lower in lib.lower() and lib not in suggestions:
                suggestions.append(lib)
    
        return sorted(suggestions[:10])  # Limit to top 10 suggestions
  • The @mcp.tool() decorator registers the suggest_libraries function as an MCP tool.
    async def suggest_libraries(partial_name: str):

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/gemini2026/documentation-search-mcp'

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