Skip to main content
Glama
prtc
by prtc

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"],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool retrieves metrics but doesn't specify whether it's a read-only operation, requires authentication, has rate limits, or what the output format looks like. For a tool with no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, consisting of two sentences that efficiently convey the tool's purpose and usage context without unnecessary details. Every sentence adds value, making it easy to understand quickly.

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 the tool has no annotations, no output schema, and a simple single parameter with full schema coverage, the description provides basic purpose and usage but lacks details on behavioral aspects like output format or operational constraints. It's minimally adequate but could be more complete for a metrics retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'bibcodes' parameter fully documented in the schema. The description doesn't add any parameter-specific details beyond what's in the schema, such as format examples or constraints. Baseline score of 3 is appropriate since the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 a specific verb ('Get') and resource ('detailed metrics for specific papers'), listing key metrics like citation count, reference count, reads, and citation history. It distinguishes from siblings like get_paper_details by focusing on metrics rather than general paper information, but doesn't explicitly compare to get_author_metrics or other siblings.

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 provides implied usage context by stating it's 'useful for tracking paper impact over time,' which suggests when to use it. However, it lacks explicit guidance on when to choose this tool over alternatives like get_paper_details or get_author_metrics, and doesn't mention any prerequisites 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/prtc/nasa-ads-mcp'

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