Skip to main content
Glama
by fegizii

get_paper_pdf_info

Retrieve PDF availability details for academic papers using the Semantic Scholar MCP Server. Input a paper ID (Semantic Scholar ID, DOI, ArXiv ID) to check access to the paper's PDF.

Instructions

Get PDF availability information for a paper. Args: paper_id: Paper ID (Semantic Scholar ID, DOI, ArXiv ID, etc.) Returns: PDF availability information

Input Schema

NameRequiredDescriptionDefault
paper_idYes

Input Schema (JSON Schema)

{ "properties": { "paper_id": { "title": "Paper Id", "type": "string" } }, "required": [ "paper_id" ], "title": "get_paper_pdf_infoArguments", "type": "object" }

Implementation Reference

  • The handler function implementing the 'get_paper_pdf_info' tool logic. It fetches paper details from Semantic Scholar API, checks for open access PDF availability, and provides information including alternative sources if no PDF is available. The @mcp.tool() decorator registers it as an MCP tool.
    @mcp.tool() async def get_paper_pdf_info(paper_id: str) -> str: """ Get PDF availability information for a paper. Args: paper_id: Paper ID (Semantic Scholar ID, DOI, ArXiv ID, etc.) Returns: PDF availability information """ encoded_id = quote(paper_id, safe="") result = await make_api_request( f"paper/{encoded_id}", {"fields": "paperId,title,openAccessPdf,externalIds"} ) if result is None: return "Error: Failed to fetch paper information" if "error" in result: return f"Error: {result['error']}" title = result.get("title", "Unknown Title") open_access = result.get("openAccessPdf") external_ids = result.get("externalIds", {}) result_text = f"PDF Information for: {title}\n\n" if open_access and open_access.get("url"): pdf_url = open_access["url"] result_text += "✅ Open Access PDF Available\n" result_text += f"URL: {pdf_url}\n" result_text += "Status: Ready for download\n\n" else: result_text += "❌ No Open Access PDF Available\n\n" # Check for potential alternative sources result_text += "Alternative sources to check:\n" if external_ids.get("ArXiv"): result_text += f"- ArXiv: https://arxiv.org/abs/{external_ids['ArXiv']}\n" if external_ids.get("DOI"): result_text += f"- Publisher (DOI): https://doi.org/{external_ids['DOI']}\n" if external_ids.get("PubMed"): result_text += ( f"- PubMed: https://pubmed.ncbi.nlm.nih.gov/{external_ids['PubMed']}/\n" ) return result_text

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/fegizii/SemanticScholarMCP'

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