Skip to main content
Glama
24mlight

A Share MCP

by 24mlight

get_loan_rate_data

Retrieve benchmark loan rate data for A-share market analysis. Specify date ranges and formats to access historical lending rate information.

Instructions

Benchmark loan rates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateNo
end_dateNo
limitNo
formatNomarkdown

Implementation Reference

  • The primary MCP tool handler for 'get_loan_rate_data'. It is decorated with @app.tool() for automatic registration and delegates execution to the use case layer with standardized error handling via run_tool_with_handling.
    @app.tool()
    def get_loan_rate_data(start_date: Optional[str] = None, end_date: Optional[str] = None, limit: int = 250, format: str = "markdown") -> str:
        """Benchmark loan rates."""
        return run_tool_with_handling(
            lambda: fetch_loan_rate_data(active_data_source, start_date=start_date, end_date=end_date, limit=limit, format=format),
            context="get_loan_rate_data",
        )
  • mcp_server.py:55-55 (registration)
    The call to register_macroeconomic_tools which defines and registers the macroeconomic tools, including get_loan_rate_data, to the FastMCP app instance.
    register_macroeconomic_tools(app, active_data_source)
  • Use case helper that fetches loan rate data from the data source, applies validation and formatting, and returns formatted output.
    def fetch_loan_rate_data(data_source: FinancialDataSource, *, start_date: Optional[str], end_date: Optional[str], limit: int, format: str) -> str:
        validate_output_format(format)
        df = data_source.get_loan_rate_data(start_date=start_date, end_date=end_date)
        meta = {"dataset": "loan_rate", "start_date": start_date, "end_date": end_date}
        return format_table_output(df, format=format, max_rows=limit, meta=meta)
  • Abstract method in FinancialDataSource interface defining the expected signature for loan rate data retrieval.
    def get_loan_rate_data(self, start_date: Optional[str] = None, end_date: Optional[str] = None) -> pd.DataFrame:
        """Fetches benchmark loan rates."""
  • Concrete implementation in BaostockDataSource that fetches loan rate data via Baostock API using the shared _fetch_macro_data helper.
    def get_loan_rate_data(self, start_date: Optional[str] = None, end_date: Optional[str] = None) -> pd.DataFrame:
        """Fetches benchmark loan rates using Baostock."""
        return _fetch_macro_data(bs.query_loan_rate_data, "Loan Rate", start_date, end_date)
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states 'Benchmark loan rates.', offering no information on whether this is a read-only operation, potential rate limits, authentication needs, data freshness, or what the output entails (e.g., raw data, formatted report). This leaves critical behavioral aspects unspecified.

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

Conciseness3/5

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

The description is extremely concise with just two words, which could be seen as efficient. However, it is under-specified rather than appropriately sized, failing to convey necessary information. It is front-loaded but lacks substance, making it minimally adequate in structure but not helpful.

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

Completeness1/5

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

Given the complexity (4 parameters, 0% schema coverage, no annotations, no output schema), the description is severely incomplete. It does not address purpose, usage, behavior, or parameters adequately, leaving the agent with insufficient context to effectively select or invoke the tool.

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

Parameters1/5

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

Schema description coverage is 0%, meaning parameters (start_date, end_date, limit, format) are undocumented in the schema. The description does not compensate by explaining any parameters, their purposes, formats (e.g., date strings like 'YYYY-MM-DD'), or defaults. This results in poor parameter semantics support.

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

Purpose2/5

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

The description 'Benchmark loan rates.' is tautological, essentially restating the tool name 'get_loan_rate_data' without specifying what action is performed (e.g., retrieve, calculate, compare). It lacks a clear verb and does not distinguish this tool from its many siblings that also fetch financial data, such as 'get_deposit_rate_data' or 'get_ividend_data'.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives. With numerous sibling tools for financial data retrieval (e.g., 'get_deposit_rate_data', 'get_balance_data'), the description fails to indicate specific contexts, prerequisites, or exclusions for selecting this tool 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/24mlight/a-share-mcp-is-just-i-need'

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