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):
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool returns a 'List of matching library names', which gives basic output information, but fails to describe critical behaviors such as how the matching is performed (e.g., prefix-based, fuzzy), any rate limits, error conditions, or whether it requires specific permissions. For a tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and well-structured: a clear purpose statement followed by labeled sections for 'Args' and 'Returns'. Every sentence earns its place by providing essential information without redundancy, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter, no nested objects) and lack of annotations or output schema, the description is adequate but has clear gaps. It covers the basic purpose and parameter semantics but misses behavioral details like matching logic or error handling. For a simple search tool, this is minimally viable but not fully comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful context for the single parameter 'partial_name' by explaining it's used 'to search for' and providing an example ('e.g., "lang" -> ["langchain"]'). Since schema description coverage is 0% and there's only one parameter, this effectively compensates for the lack of schema documentation, making the parameter's purpose clear beyond just its name and type.

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 tool's purpose: 'Suggest libraries based on partial input for auto-completion.' It specifies the verb ('suggest'), resource ('libraries'), and context ('for auto-completion'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'suggest_secure_libraries' or 'semantic_search', which prevents a perfect score.

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?

The description provides minimal guidance on when to use this tool, only implying usage for auto-completion scenarios. It lacks explicit advice on when to choose this over alternatives like 'suggest_secure_libraries' or 'semantic_search', and doesn't mention any prerequisites or exclusions. This leaves the agent with insufficient context for optimal tool selection.

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

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