Skip to main content
Glama
kukapay

crypto-whitepapers-mcp

load_whitepaper

Load cryptocurrency project whitepapers into a structured knowledge base by providing the project name and PDF URL. Enables AI agents to access and analyze whitepaper content for enhanced learning.

Instructions

Load a whitepaper PDF from a URL into the knowledge base.

Parameters:
    project_name (str): The name of the cryptocurrency project (e.g., 'bitcoin', 'ethereum').
    url (str): The URL of the whitepaper PDF to download and load.

Returns:
    str: A message indicating success or failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_nameYes
urlYes

Implementation Reference

  • The main handler function for the 'load_whitepaper' tool. It is registered via the @mcp.tool() decorator. Downloads a PDF whitepaper from the provided URL, saves it locally, and loads it into the PDFKnowledgeBase for vector search.
    @mcp.tool()
    def load_whitepaper(project_name: str, url: str, ctx: Context = None) -> str:
        """Load a whitepaper PDF from a URL into the knowledge base.
    
        Parameters:
            project_name (str): The name of the cryptocurrency project (e.g., 'bitcoin', 'ethereum').
            url (str): The URL of the whitepaper PDF to download and load.
    
        Returns:
            str: A message indicating success or failure.
        """
        try:
            # Sanitize project name for filename
            safe_project_name = project_name.lower().replace(" ", "_")
            file_path = os.path.join(WHITEPAPERS_DIR, f"{safe_project_name}.pdf")
            
            # Download PDF
            urllib.request.urlretrieve(url, file_path)
            
            # Load into knowledge base
            knowledge_base.load()
            
            return f"Successfully loaded {project_name} whitepaper from {url}"
        except Exception as e:
            return f"Error loading {project_name} whitepaper: {str(e)}"
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions downloading and loading a PDF, implying a write operation, but fails to detail critical aspects like required permissions, rate limits, error handling, or what 'knowledge base' entails. This leaves significant gaps for a mutation tool.

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 well-structured and front-loaded with the core purpose, followed by parameter and return details. It uses bullet points for clarity without unnecessary verbosity. However, the return statement could be more concise, and some behavioral details are omitted, slightly reducing efficiency.

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 2 parameters with 0% schema coverage and no output schema or annotations, the description is moderately complete. It covers purpose and parameter meanings adequately but lacks output details (only a vague success/failure message) and behavioral context like side effects or error conditions, which are crucial for this type of tool.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaningful context for both parameters: 'project_name' is explained with cryptocurrency examples (e.g., 'bitcoin', 'ethereum'), and 'url' specifies it's for a PDF download. This clarifies semantics beyond the bare schema, though it doesn't cover all potential edge cases.

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 ('Load a whitepaper PDF from a URL into the knowledge base') with both verb and resource, and distinguishes it from sibling tools like 'ask_whitepapers', 'list_available_projects', and 'search_whitepaper' by focusing on ingestion rather than querying or listing.

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

Usage Guidelines3/5

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

The description implies usage when needing to add a whitepaper to the knowledge base, but lacks explicit guidance on when to use this tool versus alternatives like 'search_whitepaper' for existing content or prerequisites such as URL accessibility. It provides basic context without exclusions or detailed comparisons.

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