Skip to main content
Glama

Ashares Margin Financing

ashares_margin_financing
Read-onlyIdempotent

China A-share margin financing and securities lending balance (融资融券余额/两融余额) — the market-wide leverage gauge: aggregate financing balance (融资余额, money borrowed to buy stock), securities-lending balance (融券余额, shares borrowed to short), and their combined total (融资融券余额), for the Shanghai (SSE) and Shenzhen (SZSE) exchanges separately and combined, with day-over-day change. Answers '融资余额', '两融余额', '融资融券余额', 'margin financing balance', 'China A-share margin debt', 'how much margin debt is in the A-share market', 'margin balance day over day change'. Pass a 6-digit SZSE code (0/3/159-prefixed) in symbol for that stock's own 融资余额/融券余额/融资融券余额 instead of the market aggregate — SSE (6xxxxx) per-stock detail is not available via any verified keyless route, so a SH code returns a clear not_available message rather than silently substituting. Margin data publishes T+1 (today's figures appear tomorrow morning); a request for a day with nothing published yet or a non-trading day (weekend/holiday) automatically falls back to the last trading day that published, and says so. Amounts in CNY (converted from each exchange's native 元/亿元/万元 units and labelled). Source: SSE query.sse.com.cn (keyless) + SZSE www.szse.cn ShowReport CATALOGID=1837_xxpl (keyless).

Input Schema

NameRequiredDescriptionDefault
dateNoTrading day as YYYY-MM-DD or YYYYMMDD (default: most recent day with published data). Margin data is T+1, so "today" usually has nothing yet.
symbolNoOptional 6-digit SZSE code (0/3/159-prefixed, e.g. "000001" 平安银行) for that stock's own margin balance instead of the market-wide aggregate. SSE codes (6xxxxx) are not supported here — no verified keyless per-stock route exists.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantial behavior the annotations cannot: T+1 publication lag, silent fallback to the last trading day with a disclosure, explicit not_available semantics for unsupported SSE codes, unit normalization to CNY, and named keyless data sources.

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 core meaning is front-loaded, but the description is a single dense block with a keyword/phrase enumeration ('融资余额', '两融余额', ... 'how much margin debt is in the A-share market') that repeats concepts already stated and inflates length for a two-parameter read-only tool.

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

Completeness5/5

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

With no output schema, the description carries the return-value burden and does: financing balance, securities-lending balance, combined total, day-over-day change, per-exchange and combined breakdowns, and CNY units. Nothing an agent needs to call it correctly is missing.

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?

Schema coverage is 100% so both parameters are already documented, but the description adds parameter-level behavior beyond the schema: the date fallback rule for unpublished/non-trading days and the explanation of why an SSE symbol yields not_available rather than per-stock data.

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?

States a precise verb+resource: market-wide A-share margin financing and securities-lending balances for SSE and SZSE, aggregate and combined, plus per-stock detail for SZSE codes. No sibling tool covers margin balances, so there is no confusion risk, and the scope (aggregate vs per-stock) is explicit up front.

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

Usage Guidelines5/5

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

Explicit when-to-use (market leverage gauge vs a single stock's balance via the 6-digit SZSE symbol), when-not (SSE per-stock returns a not_available message instead of substituting), and how date edge cases resolve (T+1 publication, automatic fallback to the last publishing trading day). Little is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.