Skip to main content
Glama
24mlight

A Share MCP

get_suspensions

Retrieve suspended A-share stocks for a specific date to monitor trading halts and market activity.

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

  • The primary handler function for the 'get_suspensions' tool. Registered via @app.tool() decorator within register_market_overview_tools. Handles logging, error handling via run_tool_with_handling, and delegates core logic to fetch_suspensions.
    @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 for fetching and filtering suspended stocks from the data source, adding metadata, and formatting the output.
    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)
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses output format options and default behaviors (current date, 250 limit), but lacks details on permissions, rate limits, error handling, or data freshness. It adequately describes core behavior but misses advanced operational context.

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?

Well-structured with clear sections (purpose, args, returns). Every sentence adds value, though the 'Args' and 'Returns' headers are slightly verbose. Efficiently front-loaded with the core purpose first.

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 no annotations and no output schema, the description provides solid coverage: clear purpose, full parameter semantics, and return format explanation. It lacks sibling differentiation and some behavioral details, but is largely complete for a read-only query tool.

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?

Schema description coverage is 0%, so the description fully compensates by explaining all three parameters: date (optional, format, default logic), limit (purpose, default), and format (options, default). It adds crucial meaning beyond the bare schema, including conditional behavior and enum values.

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 ('List suspended stocks') and resource ('stocks'), with precise scope ('for a date'). It distinguishes from siblings by focusing on suspended stocks (tradeStatus==0), unlike other tools that retrieve different financial data types.

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 'for a date' and the return condition 'tradeStatus==0', but lacks explicit guidance on when to use this tool versus alternatives like 'get_all_stock' or 'get_stock_basic_info'. No exclusions or prerequisites are mentioned.

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