Skip to main content
Glama
lingqukan

arXiv MCP Server

by lingqukan

get_stats

Retrieve statistics about arXiv papers in the local database, including total count, date range, daily breakdown, and top categories.

Instructions

Get statistics about papers stored in the local database.

Returns total count, date range, per-date breakdown, and top categories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_stats function is registered as an MCP tool using the @mcp.tool() decorator. It interacts with the local database to retrieve statistics and returns them as a JSON-formatted string.
    @mcp.tool()
    def get_stats() -> str:
        """Get statistics about papers stored in the local database.
    
        Returns total count, date range, per-date breakdown, and top categories.
        """
        logger.info("Getting stats")
        db = _get_db()
        stats = db.get_enhanced_stats()
        return json.dumps(stats.model_dump(), ensure_ascii=False, indent=2)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully discloses the output structure (what statistics are returned), but omits critical behavioral traits such as confirming read-only safety, performance characteristics, or caching behavior that would help an agent understand execution impact.

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?

Two well-structured sentences with zero waste. The first sentence front-loads the core purpose, while the second efficiently summarizes the return payload. Every word earns its place.

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

Completeness4/5

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

Adequately complete for a zero-parameter aggregation tool. Given the existence of an output schema, the description appropriately summarizes rather than duplicates return value specifications. Minor gap: could explicitly confirm this is for aggregate overview vs. individual record inspection.

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

Parameters4/5

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

Tool accepts zero parameters, establishing a baseline of 4. The description appropriately omits parameter discussion as there are no inputs to clarify, matching the empty input schema without contradiction or redundancy.

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?

Provides a specific verb ('Get') and resource ('statistics about papers') with clear scope ('local database'). The enumeration of return values (total count, date range, per-date breakdown, top categories) effectively distinguishes this from siblings like count_papers_on_date and query_papers, though it does not explicitly name those alternatives.

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?

Offers implied usage guidance through the detailed description of return values (e.g., comprehensive stats vs. single-date counts), but lacks explicit 'when-to-use' directives or comparisons against siblings like count_papers_on_date or query_papers.

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/lingqukan/arxiv-today-mcp'

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