Skip to main content
Glama
kukapay

crypto-whitepapers-mcp

ask_whitepapers

Search and retrieve relevant cryptocurrency whitepaper content by entering a query, optionally filtered by project name, to access up to 5 matching results from the knowledge base.

Instructions

Search the knowledge base for information related to a query, optionally filtered by project.

Parameters:
    query (str): The search query to find relevant whitepaper content.
    project_name (str, optional): The name of the cryptocurrency project to filter results (e.g., 'bitcoin'). If None, searches all whitepapers.

Returns:
    str: A string containing up to 5 matching results from the knowledge base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_nameNo
queryYes

Implementation Reference

  • The core handler function for the 'ask_whitepapers' MCP tool. It is decorated with @mcp.tool(), which registers it. The function searches a vector database of cryptocurrency whitepaper PDFs for relevant content matching the query, optionally filtered to a specific project's whitepaper, and returns the top 5 results concatenated.
    @mcp.tool()
    def ask_whitepapers(query: str, project_name: str = None, ctx: Context = None) -> str:
        """Search the knowledge base for information related to a query, optionally filtered by project.
    
        Parameters:
            query (str): The search query to find relevant whitepaper content.
            project_name (str, optional): The name of the cryptocurrency project to filter results (e.g., 'bitcoin'). If None, searches all whitepapers.
    
        Returns:
            str: A string containing up to 5 matching results from the knowledge base.
        """
        
        # Apply filter if project_name is provided
        filters = [{"source": f"{project_name.lower()}.pdf"}] if project_name else None
        
        results = knowledge_base.search(
            query=query,
            num_documents=5,
            filters=filters
        )
        
        if not results:
            return f"No matches found for query '{query}'" + (f" in {project_name} whitepaper" if project_name else "")
        
        return "\n\n".join([r.content for r in results])
  • Input/output schema defined by the function signature and docstring parameters.
    def ask_whitepapers(query: str, project_name: str = None, ctx: Context = None) -> str:
        """Search the knowledge base for information related to a query, optionally filtered by project.
    
        Parameters:
            query (str): The search query to find relevant whitepaper content.
            project_name (str, optional): The name of the cryptocurrency project to filter results (e.g., 'bitcoin'). If None, searches all whitepapers.
    
        Returns:
            str: A string containing up to 5 matching results from the knowledge base.
        """
  • The @mcp.tool() decorator registers the 'ask_whitepapers' function as an MCP tool.
    @mcp.tool()
  • A prompt that instructs the model to use the 'ask_whitepapers' tool for analyzing tokenomics.
    @mcp.prompt()
    def analyze_tokenomics(project_name: str) -> GetPromptResult:
        """Analyze the tokenomics described in a cryptocurrency whitepaper"""
        return GetPromptResult(
            description="Analyze tokenomics of a cryptocurrency",
            messages=[
                PromptMessage(
                    role="user",
                    content=TextContent(
                        type="text",
                        text=f"Analyze the tokenomics (token distribution, supply, incentives) described in the {project_name} whitepaper. "
                             f"Use the 'ask_whitepapers' tool to search the knowledge base for relevant information."
                    )
                )
            ]
        )
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it's a search operation (implied read-only), returns up to 5 results, and filters by project. However, it lacks details on permissions, rate limits, error handling, or how results are formatted beyond being a string, leaving gaps for a tool with no annotation coverage.

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?

The description is appropriately sized and front-loaded with the core purpose in the first sentence. The parameter and return sections are structured clearly, though the return explanation could be slightly more concise. Every sentence adds value, with no wasted words.

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 no annotations, no output schema, and low schema coverage (0%), the description is moderately complete. It covers purpose, parameters, and basic return info, but lacks details on output structure (e.g., format of the string), error cases, or behavioral constraints like pagination. For a search tool with 2 parameters, this leaves some gaps.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It adds significant meaning beyond the schema: it explains that 'query' finds 'relevant whitepaper content', 'project_name' filters by 'cryptocurrency project' with an example ('bitcoin'), and clarifies that 'None' searches all whitepapers. This covers both parameters thoroughly.

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

Purpose5/5

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

The description clearly states the specific action ('Search the knowledge base for information') and resource ('whitepaper content'), distinguishing it from siblings like 'list_available_projects' (listing), 'load_whitepaper' (loading specific content), and 'search_whitepaper' (likely more focused search). It explicitly mentions filtering by project as an optional feature.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use optional filtering ('optionally filtered by project') and implies usage for general knowledge base searches. However, it doesn't explicitly state when NOT to use this tool or name specific alternatives among siblings, such as when to prefer 'search_whitepaper' over this tool.

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

Related 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/kukapay/crypto-whitepapers-mcp'

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