Skip to main content
Glama
liqiongyu

Xueqiu MCP

by liqiongyu

margin

Retrieve margin trading data for specific stocks to analyze financing and securities lending activities. Query stock codes to access detailed margin information through the Xueqiu MCP server.

Instructions

获取融资融券数据

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stock_codeNoSZ000002

Implementation Reference

  • main.py:134-138 (handler)
    The handler function for the 'margin' tool. It is decorated with @mcp.tool() which registers it in the MCP server. The function fetches financing and securities lending data for the given stock code using the pysnowball library (ball.margin), processes the timestamps, and returns the result.
    @mcp.tool()
    def margin(stock_code: str="SZ000002") -> dict:
        """获取融资融券数据"""
        result = ball.margin(stock_code)
        return process_data(result)
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 states '获取' (get), implying a read-only operation, but does not specify if it requires authentication, has rate limits, returns real-time or historical data, or details error conditions. For a tool with no annotation coverage, this is a significant gap in transparency.

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 a single, concise phrase ('获取融资融券数据') that directly states the tool's function without unnecessary words. It is front-loaded and efficiently communicates the core purpose, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool has no annotations, no output schema, and low parameter schema coverage, the description is incomplete. It does not address behavioral aspects, parameter usage, or output format, which are critical for an AI agent to invoke the tool correctly in a financial data context with many sibling tools.

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

Parameters2/5

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

The schema has 1 parameter with 0% description coverage, and the tool description does not mention any parameters. It fails to explain the 'stock_code' parameter's role, format (e.g., 'SZ000002' as default), or how it affects the data retrieval. With low schema coverage, the description does not compensate, leaving parameter meaning unclear.

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

Purpose3/5

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

The description '获取融资融券数据' (Get margin trading data) clearly states the verb ('获取' - get) and resource ('融资融券数据' - margin trading data), providing a basic purpose. However, it lacks specificity about what margin trading data includes (e.g., balances, positions, history) and does not differentiate from siblings like 'balance' or 'capital_flow', which could also relate to financial data. This makes it vague but not tautological.

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. With siblings like 'balance', 'capital_flow', and 'holders' that might overlap in financial data contexts, there is no indication of specific use cases, prerequisites, or exclusions. This leaves the agent without direction on 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/liqiongyu/xueqiu_mcp'

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