Skip to main content
Glama
24mlight

A-Share MCP Server

get_suspensions

Retrieve suspended stock listings for China's A-share market on a specified date. Filter stocks with tradeStatus==0 and export results in multiple formats.

Instructions

    List suspended stocks for a date.

    Args:
        date: Optional 'YYYY-MM-DD'. If None, uses current date.
        limit: Max rows to return. Defaults to 250.
        format: Output format: 'markdown' | 'json' | 'csv'. Defaults to 'markdown'.

    Returns:
        Table of stocks where tradeStatus==0.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo
limitNo
formatNomarkdown

Implementation Reference

  • MCP tool handler function for 'get_suspensions', decorated with @app.tool(). Delegates to fetch_suspensions via run_tool_with_handling.
    @app.tool()
    def get_suspensions(date: Optional[str] = None, limit: int = 250, format: str = "markdown") -> str:
        """
        List suspended stocks for a date.
    
        Args:
            date: Optional 'YYYY-MM-DD'. If None, uses current date.
            limit: Max rows to return. Defaults to 250.
            format: Output format: 'markdown' | 'json' | 'csv'. Defaults to 'markdown'.
    
        Returns:
            Table of stocks where tradeStatus==0.
        """
        logger.info("Tool 'get_suspensions' called date=%s, limit=%s, format=%s", date or "current", limit, format)
        return run_tool_with_handling(
            lambda: fetch_suspensions(active_data_source, date=date, limit=limit, format=format),
            context=f"get_suspensions:{date or 'current'}",
        )
  • Core implementation logic: fetches all stocks, filters those with tradeStatus=='0' (suspended), adds metadata, and formats the output table.
    def fetch_suspensions(data_source: FinancialDataSource, *, date: Optional[str], limit: int, format: str) -> str:
        validate_output_format(format)
        df = data_source.get_all_stock(date=date)
        if df is None or df.empty:
            return "(No data available to display)"
        if "tradeStatus" not in df.columns:
            raise ValueError("'tradeStatus' column not present in data source response.")
        suspended = df[df["tradeStatus"] == '0']
        meta = {"as_of": date or "current", "total_suspended": int(suspended.shape[0])}
        return format_table_output(suspended, format=format, max_rows=limit, meta=meta)
  • mcp_server.py:54-54 (registration)
    Invocation of register_market_overview_tools which defines and registers the get_suspensions tool among others.
    register_market_overview_tools(app, active_data_source)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the return format options and that it returns a table, but doesn't disclose important behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, or what happens with invalid dates. The description provides some context but leaves significant gaps for a tool with no annotation coverage.

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 perfectly structured and concise. It begins with the core purpose, then provides a clear Args section with all parameters documented, and ends with the Returns section. Every sentence earns its place, there's no redundancy, and the information is front-loaded with the most important details first.

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 (3 parameters, no output schema, no annotations), the description does a good job with parameters but has gaps in behavioral context. It explains what the tool returns (table of stocks where tradeStatus==0) but doesn't describe the table structure, column names, or what information each row contains. For a data retrieval tool with no output schema, more detail about the return format would be helpful.

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

Parameters5/5

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

The description provides excellent parameter semantics beyond the input schema. With 0% schema description coverage, the description fully documents all three parameters: explaining date format and default behavior, limit purpose and default, and format options with their enum values. This completely compensates for the lack of schema descriptions and adds meaningful context about how each parameter affects the tool's behavior.

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 'List suspended stocks for a date' which is a specific verb+resource combination. It distinguishes itself from siblings by focusing specifically on suspended stocks (tradeStatus==0), unlike other tools that handle different financial data types. However, it doesn't explicitly contrast with specific sibling tools that might also filter stocks.

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?

The description implies usage context through the date parameter and the specific focus on suspended stocks, suggesting this tool should be used when needing information about trading suspensions. However, it provides no explicit guidance on when to use this versus alternatives like get_all_stock or get_stock_basic_info, nor does it mention any prerequisites or exclusions.

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