Skip to main content
Glama

search_papers

Search a scientific database for papers using keywords, with options to filter by publication date and control result quantity.

Instructions

Search BGPT's database of scientific papers by keyword.

Args: query: Search terms (e.g. "CRISPR gene editing efficiency") Short, concise queries are best. English language only. num_results: Number of results to return (1-100, default 16). First 50 results are free, then billed at $0.01/result for paid users. days_back: Only return papers published within the last N days. api_key: Optional: Your Stripe subscription ID for paid access. Get one at https://bgpt.pro/mcp

Returns: Papers with title, DOI, Raw Data, methods, results, quality scores, and 25+ metadata fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
num_resultsNo
days_backNo
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `search_papers` function acts as a wrapper/handler that constructs an MCP JSON-RPC `tools/call` request to the BGPT SSE endpoint to execute the search.
    def search_papers(query: str, num_results: int = 5, days_back: int = None, api_key: str = None):
        """
        Search scientific papers via the BGPT MCP API.
    
        Args:
            query: Search terms (e.g. "CRISPR gene editing efficiency")
            num_results: Number of results to return (1-100, default 5)
            days_back: Only return papers published within the last N days
            api_key: Stripe subscription ID for paid access (optional for free tier)
    
        Returns:
            List of paper results with methods, results, quality scores, etc.
        """
        params = {"query": query, "num_results": num_results}
        if days_back is not None:
            params["days_back"] = days_back
        if api_key is not None:
            params["api_key"] = api_key
    
        payload = json.dumps({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "tools/call",
            "params": {
                "name": "search_papers",
                "arguments": params
            }
        }).encode("utf-8")
    
        req = urllib.request.Request(
            BGPT_SSE_ENDPOINT.replace("/sse", "/message"),
            data=payload,
            method="POST"
        )
        req.add_header("Content-Type", "application/json")
    
        ctx = ssl.create_default_context()
        with urllib.request.urlopen(req, context=ctx, timeout=30) as resp:
            return json.loads(resp.read().decode("utf-8"))
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: billing implications (first 50 free, then $0.01/result for paid users), language restriction (English only), and access requirements (Stripe subscription for paid access). It doesn't cover rate limits or error handling, but provides substantial operational context.

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 with clear sections (Args, Returns) and front-loaded purpose. Most sentences earn their place, though the billing details could be slightly more concise. Overall efficient for the information conveyed.

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

Completeness5/5

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

Given the tool's moderate complexity, no annotations, 0% schema coverage, but presence of an output schema, the description is remarkably complete. It covers purpose, parameters with semantics, behavioral constraints, and return format. The output schema handles return values, so the description appropriately focuses on usage context.

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?

With 0% schema description coverage, the description fully compensates by providing rich semantic context for all parameters: query format examples and language restrictions, num_results range and billing implications, days_back purpose, and api_key purpose and acquisition method. This adds significant value beyond the bare schema.

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 tool's purpose with specific verb ('search') and resource ('BGPT's database of scientific papers'), and distinguishes it by specifying search by keyword. It's not tautological and provides concrete scope.

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 for keyword-based paper searches but provides no explicit guidance on when to use this tool versus alternatives. With no sibling tools mentioned, this is adequate but lacks proactive guidance about potential alternatives or exclusions.

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/connerlambden/bgpt-mcp'

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