Skip to main content
Glama
andybrandt

mcp-simple-arxiv

by andybrandt

Update arXiv Categories

update_categories

Fetch and update the arXiv paper category taxonomy to ensure accurate classification of research documents.

Instructions

Update the stored category taxonomy by fetching the latest version from arxiv.org

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the update_categories tool, which invokes the helper to update the taxonomy file and returns a formatted success message listing primary categories.
    def update_categories() -> str:
        """Update the stored category taxonomy by fetching the latest version from arxiv.org"""
        try:
            taxonomy = update_taxonomy_file()
            result = "Successfully updated category taxonomy.\n\n"
            result += f"Found {len(taxonomy)} primary categories:\n"
            for primary, data in taxonomy.items():
                result += f"- {primary}: {data['name']} ({len(data['subcategories'])} subcategories)\n"
            return result
        except Exception as e:
            logger.error(f"Error updating taxonomy: {e}")
            # FastMCP will handle raising this as a proper JSON-RPC error
            raise e
  • Registers the 'update_categories' tool in the FastMCP app with metadata annotations including title and operational hints.
    @app.tool(
        annotations={
            "title": "Update arXiv Categories",
            "readOnlyHint": False,
            "openWorldHint": True
        }
    )
  • Supporting function that generates and persists the arXiv category taxonomy to a JSON file from built-in data, used by the tool handler.
    def update_taxonomy_file():
        """
        Create taxonomy.json from the built-in categories.
        Returns the taxonomy dictionary.
        """
        print(f"Creating taxonomy file at {TAXONOMY_FILE}...")
        with open(TAXONOMY_FILE, 'w', encoding='utf-8') as f:
            json.dump(CATEGORIES, f, indent=2, ensure_ascii=False)
        print("Done!")
        return CATEGORIES
Behavior4/5

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

Annotations provide readOnlyHint=false (indicating mutation) and openWorldHint=true (suggesting external data fetching). The description adds valuable behavioral context: it specifies that this tool fetches from arxiv.org (external source) and updates stored data. This goes beyond annotations by revealing the external dependency and the 'fetch-and-update' nature of the operation.

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?

Single sentence that efficiently conveys the entire operation: action (update), target (stored category taxonomy), method (fetching), and source (arxiv.org). No wasted words, perfectly front-loaded with the core purpose.

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

Completeness5/5

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

For a parameterless tool with annotations covering mutation/external access and an output schema present, the description provides exactly what's needed: it explains what the tool does, where it gets data, and what it updates. The presence of an output schema means return values don't need explanation in the description.

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?

The tool has 0 parameters with 100% schema description coverage (empty schema). The description doesn't need to explain parameters, but it implicitly confirms there are no required inputs by describing a self-contained fetch operation. This is appropriate for a parameterless tool.

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

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('update'), the resource ('stored category taxonomy'), and the source ('fetching the latest version from arxiv.org'). It distinguishes from siblings like 'list_categories' (which presumably reads existing data) and 'get_paper_data'/'search_papers' (which work with papers rather than taxonomy).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: when you need to refresh the locally stored taxonomy with the latest from arxiv.org. It doesn't explicitly state when NOT to use it or name alternatives, but the context is clear enough for an agent to infer this is for maintenance/update operations rather than regular queries.

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/andybrandt/mcp-simple-arxiv'

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