Skip to main content
Glama
cfocoder

Banxico MCP Server

get_cetes_28_data

Retrieve current and historical 28-day CETES interest rate data from Mexico's central bank for financial analysis and decision-making.

Instructions

Get CETES 28-day interest rate data from Banxico.

Args: limit: Maximum number of recent data points (default: 30)

Returns: Current and historical CETES 28-day rates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_cetes_28_data' tool. It is registered via the @mcp.tool() decorator. Fetches CETES 28-day interest rate data from the Banxico API (series SF282), handles optional limit parameter, and formats the response using format_interest_rate_data.
    @mcp.tool()
    async def get_cetes_28_data(limit: Optional[int] = 30) -> str:
        """
        Get CETES 28-day interest rate data from Banxico.
        
        Args:
            limit: Maximum number of recent data points (default: 30)
            
        Returns:
            Current and historical CETES 28-day rates
        """
        if not BANXICO_TOKEN:
            return "Error: BANXICO_API_TOKEN environment variable not set. Please configure your API token."
        
        endpoint = "series/SF282/datos"
        data = await make_banxico_request(endpoint, BANXICO_TOKEN)
        
        if not data:
            return "Failed to retrieve CETES 28-day data. Please check your API token and network connection."
        
        # Apply limit if specified
        if limit and data.get("bmx", {}).get("series"):
            for series in data["bmx"]["series"]:
                if "datos" in series and len(series["datos"]) > limit:
                    series["datos"] = series["datos"][-limit:]
        
        return format_interest_rate_data(data)
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 that the tool retrieves 'current and historical' data, which implies read-only behavior, but it does not cover important aspects such as rate limits, authentication requirements, data freshness, or error handling. For a tool with no annotations, this leaves significant gaps in understanding its operational behavior.

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 well-structured and concise, with a clear purpose statement followed by 'Args' and 'Returns' sections. Every sentence adds value without redundancy, making it easy to scan and understand quickly. The front-loaded purpose statement ensures the main function is immediately clear.

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?

Given the tool's low complexity (1 optional parameter) and the presence of an output schema (which handles return values), the description is reasonably complete. It covers the purpose, parameter semantics, and return scope adequately. However, it lacks behavioral details (e.g., rate limits) and usage guidelines, which slightly reduces completeness for a tool with no annotations.

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 context for the single parameter 'limit' by explaining it as 'Maximum number of recent data points (default: 30)', which clarifies its purpose beyond the schema's technical definition. Since schema description coverage is 0%, the description compensates well by providing this semantic information, though it could be more detailed (e.g., explaining what 'recent' means).

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 CETES 28-day interest rate data from Banxico.' It specifies the verb ('Get'), resource ('CETES 28-day interest rate data'), and source ('Banxico'), which is specific and actionable. However, it does not explicitly distinguish this tool from its siblings (e.g., get_inflation_data, get_unemployment_data), which would require a 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 any context, prerequisites, or exclusions, and it does not reference sibling tools like get_date_range_data or get_usd_mxn_historical_data. This lack of usage guidance makes it unclear in what scenarios this tool is preferred over others.

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/cfocoder/banxico_mcp'

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