Skip to main content
Glama

get_archive

Retrieve New York Times articles from a specific month and year. Access archived content by specifying date parameters to get the full API response.

Instructions

Get New York Times articles from a specific month and year archive.

Args: year: Year (default: current year) month: Month 1-12 (default: current month)

Returns: Full NYT archive API response (unformatted)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNo
monthNo

Implementation Reference

  • Core handler function that executes the get_archive tool logic: determines year/month, fetches data from NYT archive API endpoint using shared NytClient, returns raw response.
    async def get_archive(year: int | None = None, month: int | None = None) -> dict:
        """
        Get New York Times articles from a specific month and year archive.
    
        Args:
            year: Year (default: current year)
            month: Month 1-12 (default: current month)
    
        Returns:
            Full NYT archive API response (unformatted)
        """
        now = datetime.now()
        year = year or now.year
        month = month or now.month
    
        client = get_client()
        response = await client.make_nyt_request(f"archive/v1/{year}/{month}.json", {})
    
        # Return raw response (no formatting for archive)
        return response
  • MCP registration of the get_archive tool using FastMCP @mcp.tool() decorator. Defines input schema via type hints/docstring and delegates execution to internal tools.get_archive.
    @mcp.tool()
    async def get_archive(year: int | None = None, month: int | None = None) -> dict:
        """
        Get New York Times articles from a specific month and year archive.
    
        Args:
            year: Year (default: current year)
            month: Month 1-12 (default: current month)
    
        Returns:
            Full NYT archive API response (unformatted)
        """
        return await tools.get_archive(year, month)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the tool returns 'Full NYT archive API response (unformatted)', which hints at the raw, unprocessed nature of the output, but fails to address critical aspects such as rate limits, authentication requirements, error handling, or data format specifics. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, with the core purpose stated first, followed by parameter details and return information. Each sentence adds value without redundancy. However, minor improvements could include briefer phrasing or bullet points for parameters, but overall it is efficient and well-structured.

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's moderate complexity (2 parameters, no annotations, no output schema), the description is adequate but incomplete. It covers the purpose and parameters well but lacks details on output structure, error cases, and usage context relative to siblings. Without an output schema, more explanation of the 'unformatted' response would enhance completeness, making it minimally viable with clear gaps.

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 description adds meaningful semantics beyond the input schema, which has 0% coverage. It explains that 'year' and 'month' parameters are for specifying the archive period, provides default values (current year/month), and clarifies valid ranges (month 1-12). This compensates well for the lack of schema descriptions, though it could detail constraints like year limits or handling of invalid inputs.

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: 'Get New York Times articles from a specific month and year archive.' It specifies the verb ('Get'), resource ('New York Times articles'), and scope ('from a specific month and year archive'), but does not explicitly differentiate it from sibling tools like 'get_latest_news' or 'search_articles' in terms of when to use each, which prevents a score of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools such as 'get_latest_news' for recent articles or 'search_articles' for keyword-based searches, nor does it specify use cases like historical research versus current news. This lack of comparative context results in minimal guidance for tool selection.

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/jeffmm/nytimes-mcp'

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