Skip to main content
Glama

get_paper_metrics

Retrieve citation counts, reference counts, reads, and citation history data for specific papers to analyze research impact and track performance over time.

Instructions

Get detailed metrics for specific papers including citation count, reference count, reads, and citation history. Useful for tracking paper impact over time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bibcodesYesList of ADS bibcodes (e.g., ['2019ApJ...878...98S'])

Implementation Reference

  • The handler function that executes the tool: makes API request to ADS /metrics endpoint with bibcodes, parses citation stats, reads, and indicators, formats into TextContent.
    async def get_paper_metrics(bibcodes: list[str]) -> list[TextContent]: """Get metrics for specific papers.""" try: # Prepare request payload payload = {"bibcodes": bibcodes} # Make API request response = requests.post( f"{ADS_API_BASE}/metrics", headers=HEADERS, json=payload, timeout=30 ) response.raise_for_status() data = response.json() # Format response if "citation stats" in data: stats = data["citation stats"] metrics_lines = [ "Paper Metrics:", f"Total Citations: {stats.get('total number of citations', 0)}", f"Total Refereed Citations: {stats.get('total number of refereed citations', 0)}", f"Average Citations per Paper: {stats.get('average number of citations', 0):.1f}", f"Median Citations: {stats.get('median number of citations', 0)}", f"Normalized Citations: {stats.get('normalized number of citations', 0):.1f}", f"Total Reads: {stats.get('total number of reads', 0)}", f"Average Reads per Paper: {stats.get('average number of reads', 0):.1f}", ] # Add indicator metrics if available if "indicators" in data: indicators = data["indicators"] metrics_lines.extend([ "", "Indicators:", f"h-index: {indicators.get('h', 0)}", f"m-index: {indicators.get('m', 0):.2f}", f"i10-index: {indicators.get('i10', 0)}", f"g-index: {indicators.get('g', 0)}", ]) return [TextContent(type="text", text="\n".join(metrics_lines))] else: return [TextContent(type="text", text="No metrics available for these papers")] except requests.exceptions.RequestException as e: logger.error(f"Error getting paper metrics: {e}") return [TextContent( type="text", text=f"Error getting paper metrics: {str(e)}" )]
  • Registers the 'get_paper_metrics' tool with the MCP server in list_tools(), including description and input schema.
    Tool( name="get_paper_metrics", description=( "Get detailed metrics for specific papers including citation count, " "reference count, reads, and citation history. " "Useful for tracking paper impact over time." ), inputSchema={ "type": "object", "properties": { "bibcodes": { "type": "array", "items": {"type": "string"}, "description": "List of ADS bibcodes (e.g., ['2019ApJ...878...98S'])", }, }, "required": ["bibcodes"], }, ),
  • Input schema definition for the tool, specifying bibcodes as required array of strings.
    inputSchema={ "type": "object", "properties": { "bibcodes": { "type": "array", "items": {"type": "string"}, "description": "List of ADS bibcodes (e.g., ['2019ApJ...878...98S'])", }, }, "required": ["bibcodes"], },

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/prtc/nasa-ads-mcp'

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