GnistAI GnistAI
Log in

PubMed

Biomedical literature search — PubMed abstracts, citations, and MeSH term lookup. For clinical trials use the clinicaltrials server.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Science

Data source: PubMed (NCBI)

MCP Endpoint (Streamable HTTP) https://context.gnist.ai/mcp/pubmed/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (6)

search_pubmed

Search PubMed for biomedical literature.

Searches 35M+ abstracts across all biomedical and life science fields.
Returns title, authors, journal, publication date, and DOI.

Args:
query: Search query. Supports PubMed syntax (e.g., "diabetes[MeSH] AND insulin",
"COVID-19 vaccine efficacy"). Plain keywords also work.
max_results: Number of results to return (1–100, default 10).
date_from: Filter by publication date start (YYYY/MM/DD or YYYY).
date_to: Filter by publication date end (YYYY/MM/DD or YYYY).

Returns:
List of articles with pmid, title, authors, journal, pub_date, and doi.
Note: Abstracts are not included in search results — use get_article for full text.

ParameterTypeRequiredDescription
querystringrequiredSearch query. Supports PubMed syntax (e.g., "diabetes[MeSH] AND insulin", "COVID-19 vaccine efficacy"). Plain keywords also work.
max_resultsintegeroptionalNumber of results to return (1–100, default 10). (default: 10)
date_fromanyoptionalFilter by publication date start (YYYY/MM/DD or YYYY).
date_toanyoptionalFilter by publication date end (YYYY/MM/DD or YYYY).
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_pubmed",
    "arguments": {
      "query": "example"
    }
  }
}
get_article

Fetch full metadata and abstract for a PubMed article.

Args:
pmid: PubMed ID (e.g., "33972843"). Found in search_pubmed results.

Returns:
Full article record including title, authors, abstract, journal, pub_date, and doi.

ParameterTypeRequiredDescription
pmidstringrequiredPubMed ID (e.g., "33972843"). Found in search_pubmed results.
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_article",
    "arguments": {
      "pmid": "example"
    }
  }
}
mesh_lookup

Look up a MeSH (Medical Subject Headings) term.

MeSH is the NLM's controlled vocabulary for indexing biomedical literature.
Use this to find canonical term names, definitions, and related terms.

Args:
term: The medical term to look up (e.g., "Diabetes Mellitus", "Hypertension").

Returns:
MeSH entry with canonical name, scope note (definition), tree numbers,
and synonyms. Returns empty result if term not found.

ParameterTypeRequiredDescription
termstringrequiredThe medical term to look up (e.g., "Diabetes Mellitus", "Hypertension").
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "mesh_lookup",
    "arguments": {
      "term": "example"
    }
  }
}
search_trials

Search ClinicalTrials.gov for clinical trials by condition.

Returns trial summaries including NCT ID, title, status, phase, conditions,
interventions, and sponsor.

Args:
condition: Medical condition to search for.
status: Trial status filter.
phase: Trial phase filter.
country: Country filter.
max_results: Number of results (1–50, default 10).

Returns:
List of trial summaries.

ParameterTypeRequiredDescription
conditionstringrequiredMedical condition to search for (e.g., "COVID-19", "Type 2 Diabetes").
statusanyoptionalTrial status filter (e.g., RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING).
phaseanyoptionalTrial phase filter (e.g., PHASE1, PHASE2, PHASE3, PHASE4).
countryanyoptionalCountry filter (e.g., United States, Norway).
max_resultsintegeroptionalNumber of results to return (1–50, default 10). (default: 10)
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_trials",
    "arguments": {
      "condition": "example"
    }
  }
}
get_trial

Fetch detailed information about a specific clinical trial.

Args:
nct_id: ClinicalTrials.gov NCT ID.

Returns:
Full trial record including eligibility criteria and locations.

ParameterTypeRequiredDescription
nct_idstringrequiredClinicalTrials.gov NCT ID (e.g., "NCT04470427").
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "get_trial",
    "arguments": {
      "nct_id": "example"
    }
  }
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
JSON-RPC Request
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "report_feedback",
    "arguments": {
      "feedback": "example"
    }
  }
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/mcp/pubmed/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_pubmed", "arguments": {"query": "example"}}}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/pubmed/",
    headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "jsonrpc": "2.0",
  "method": "tools/call",
  "id": 1,
  "params": {
    "name": "search_pubmed",
    "arguments": {
      "query": "example"
    }
  }
},
)
print(resp.json())

Related Toolkits (Science)

Resources