Skip to main content
Glama

A股数据 API (A-Share Data API)

ashare_screen

选股(量化筛股),五种模式用 mode 选(默认 filter):filter 条件筛选(filters=pe_ttm:0..20,roe_ttm:>=15)· pool 主题池/属性标签(央企/ST/破净/次新/市值档位… 108 个)· rank 全市场排行(metric=overall|capital|fundamental|risk|technical)· strategy 策略选股(MACD 金叉/突破年线/高股息/大师策略… 98 个)· event 事件选股(分红/业绩预告/定增/解禁/董监高… 42 个)。用户问'筛选/选股/符合条件的股票/哪些票…'用这个。⭐ filters 语法:逗号分隔=AND;区间 0..20(含两端),比较 >=15 / <=30 / >0 / <0 / =5。⭐ 可用字段 94 个(估值/行情/盈利/资产负债/现金流),先用 list=fields 拿清单(带中文名与单位),⛔ 不要凭猜填字段名 —— 写错会返回 422 并给出可用清单。⭐ 排序:sort=roe_ttm(降序)/ sort=-roe_ttm(升序);评分不能排序,要排行用 mode=rank。⚠️ 不知道某模式的取值 ⇒ 先传 list=true(返回该模式全部合法取值,带中文名与分组),⛔ 不要凭猜填(非法值会报错)。也可以直接 list=fields|boards|presets|metrics|pools|strategies|events。⚠️ 返回是排版好的表格;多标签/多策略会分多段返回 ⇒ 用 tables 取全部段。⭐ 要覆盖全市场:把 limit 设大即可一次取全(如 limit=9999,实测返回 5000+ 只),结果直接读,不需要分批。⭐ 响应里的 trace_id 是本次请求编号 —— 出问题把它给我们即可定位。⚠️ 付费工具(需 Key):Standard(¥29.9)及以上。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ashare_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo[pool/strategy] 区间结束日 YYYY-MM-DD(须与 start 同时给)
dateNo查询日期 YYYY-MM-DD(留空=最新交易日);filter 模式即历史截面选股
listNo自发现清单:fields / boards / presets / metrics / pools / strategies / events;true=列出当前模式的全部取值
modeNofilter 条件筛选(默认)/ pool 主题池 / rank 排行 / strategy 策略 / event 事件
poolNo[pool] 主题池 / 属性标签取值;清单见 list=pools
slimNo响应精简:true 时省掉与 structured 完全重复的 tables(单表输出约 −42% 体积);多表输出不受影响
sortNo排序字段(语义名,见 list=fields);默认降序,`-` 前缀=升序:sort=roe_ttm / sort=-roe_ttm
assetNo资产类别:stock 股票(默认)/ etf|仅 pool/rank 支持
boardNo股票池:hs300 / zz500 / zz1000 / sse50 / sz_component;不传=全市场
eventNo[event] 事件取值;清单见 list=events
limitNo条数,默认 20;filter 模式无上限(9999 一次取全市场)
startNo[pool/strategy] 区间起始日 YYYY-MM-DD(须与 end 同时给)
metricNo[rank] 排行指标:overall / capital / fundamental / risk / technical(默认 overall)
offsetNo翻页偏移(仅 pool/rank/strategy/event;filter 一次取全)
presetNo[filter] 官方预设名(与 filters 二选一):low_pe / high_dividend … 共 22 个,清单见 list=presets
filtersNo[filter] 筛选条件,逗号分隔=AND:pe_ttm:0..20,roe_ttm:>=15(区间含两端;可用字段见 list=fields)
strategyNo[strategy] 策略取值;清单见 list=strategies

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / slim
      Added value: +{
      +  "default": false,
      +  "description": "响应精简:true 时省掉与 structured 完全重复的 tables(单表输出约 −42% 体积);多表输出不受影响",
      +  "title": "Slim",
      +  "type": "boolean"
      +}
  2. Changed22 schema fields changed
    • changedInput schema / properties / asset / description
      Previous value: -"资产类别:stock 股票(默认)/ etf(mode=label / ranking)"New value: +"资产类别:stock 股票(默认)/ etf|仅 pool/rank 支持"
    • addedInput schema / properties / board
      Added value: +{
      +  "default": "",
      +  "description": "股票池:hs300 / zz500 / zz1000 / sse50 / sz_component;不传=全市场",
      +  "title": "Board",
      +  "type": "string"
      +}
    • changedInput schema / properties / date / description
      Previous value: -"查询日期 YYYY-MM-DD(留空=最新交易日)"New value: +"查询日期 YYYY-MM-DD(留空=最新交易日);filter 模式即历史截面选股"
    • addedInput schema / properties / end
      Added value: +{
      +  "default": "",
      +  "description": "[pool/strategy] 区间结束日 YYYY-MM-DD(须与 start 同时给)",
      +  "title": "End",
      +  "type": "string"
      +}
    • addedInput schema / properties / event
      Added value: +{
      +  "default": "",
      +  "description": "[event] 事件取值;清单见 list=events",
      +  "title": "Event",
      +  "type": "string"
      +}
    • removedInput schema / properties / expr
      Removed value: -{
      -  "default": "",
      -  "description": "因子表达式(mode=condition),如 intersect([PE_TTM>0, PE_TTM<20])",
      -  "title": "Expr",
      -  "type": "string"
      -}
    • addedInput schema / properties / filters
      Added value: +{
      +  "default": "",
      +  "description": "[filter] 筛选条件,逗号分隔=AND:pe_ttm:0..20,roe_ttm:>=15(区间含两端;可用字段见 list=fields)",
      +  "title": "Filters",
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"条数,默认 20;可一次取全市场(实测 5000+ 只)"New value: +"条数,默认 20;filter 模式无上限(9999 一次取全市场)"
    • changedInput schema / properties / list / default
      Previous value: -falseNew value: +""
    • changedInput schema / properties / list / description
      Previous value: -"true=列出该模式全部可用取值(⭐ 不确定 type 时先用它)"New value: +"自发现清单:fields / boards / presets / metrics / pools / strategies / events;true=列出当前模式的全部取值"
    • changedInput schema / properties / list / type
      Previous value: -"boolean"New value: +"string"
    • addedInput schema / properties / metric
      Added value: +{
      +  "default": "",
      +  "description": "[rank] 排行指标:overall / capital / fundamental / risk / technical(默认 overall)",
      +  "title": "Metric",
      +  "type": "string"
      +}
    • changedInput schema / properties / mode / default
      Previous value: -"condition"New value: +""
    • changedInput schema / properties / mode / description
      Previous value: -"condition 因子 / label 标签 / ranking 排行 / strategy 策略 / event 事件(默认 condition)"New value: +"filter 条件筛选(默认)/ pool 主题池 / rank 排行 / strategy 策略 / event 事件"
    • changedInput schema / properties / offset / description
      Previous value: -"翻页偏移(配合 limit)"New value: +"翻页偏移(仅 pool/rank/strategy/event;filter 一次取全)"
    • removedInput schema / properties / orderby
      Removed value: -{
      -  "default": "",
      -  "description": "排序字段(mode=condition,如 ROETTM)",
      -  "title": "Orderby",
      -  "type": "string"
      -}
    • addedInput schema / properties / pool
      Added value: +{
      +  "default": "",
      +  "description": "[pool] 主题池 / 属性标签取值;清单见 list=pools",
      +  "title": "Pool",
      +  "type": "string"
      +}
    • changedInput schema / properties / preset / description
      Previous value: -"预设名(mode=condition,与 expr 二选一):LowPE/LowPB/HighDividend/PEG/HighROE 等 22 个"New value: +"[filter] 官方预设名(与 filters 二选一):low_pe / high_dividend … 共 22 个,清单见 list=presets"
    • addedInput schema / properties / sort
      Added value: +{
      +  "default": "",
      +  "description": "排序字段(语义名,见 list=fields);默认降序,`-` 前缀=升序:sort=roe_ttm / sort=-roe_ttm",
      +  "title": "Sort",
      +  "type": "string"
      +}
    • addedInput schema / properties / start
      Added value: +{
      +  "default": "",
      +  "description": "[pool/strategy] 区间起始日 YYYY-MM-DD(须与 end 同时给)",
      +  "title": "Start",
      +  "type": "string"
      +}
    • addedInput schema / properties / strategy
      Added value: +{
      +  "default": "",
      +  "description": "[strategy] 策略取值;清单见 list=strategies",
      +  "title": "Strategy",
      +  "type": "string"
      +}
    • removedInput schema / properties / type
      Removed value: -{
      -  "default": "",
      -  "description": "label/ranking/strategy/event 的取值;list=true 时作分组过滤",
      -  "title": "Type",
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"条数(默认 20,MCP 侧上限 100)"New value: +"条数,默认 20;可一次取全市场(实测 5000+ 只)"
  4. Changed12 schema fields changed
    • addedInput schema / properties / asset
      Added value: +{
      +  "default": "",
      +  "description": "资产类别:stock 股票(默认)/ etf(mode=label / ranking)",
      +  "title": "Asset",
      +  "type": "string"
      +}
    • addedInput schema / properties / date
      Added value: +{
      +  "default": "",
      +  "description": "查询日期 YYYY-MM-DD(留空=最新交易日)",
      +  "title": "Date",
      +  "type": "string"
      +}
    • addedInput schema / properties / expr / default
      Added value: +""
    • changedInput schema / properties / expr / description
      Previous value: -"因子表达式,如 intersect([PE_TTM>0, PE_TTM<20])"New value: +"因子表达式(mode=condition),如 intersect([PE_TTM>0, PE_TTM<20])"
    • changedInput schema / properties / limit / description
      Previous value: -"条数(默认 20)"New value: +"条数(默认 20,MCP 侧上限 100)"
    • addedInput schema / properties / list
      Added value: +{
      +  "default": false,
      +  "description": "true=列出该模式全部可用取值(⭐ 不确定 type 时先用它)",
      +  "title": "List",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / mode
      Added value: +{
      +  "default": "condition",
      +  "description": "condition 因子 / label 标签 / ranking 排行 / strategy 策略 / event 事件(默认 condition)",
      +  "title": "Mode",
      +  "type": "string"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "翻页偏移(配合 limit)",
      +  "title": "Offset",
      +  "type": "integer"
      +}
    • changedInput schema / properties / orderby / description
      Previous value: -"排序字段(如 ROETTM)"New value: +"排序字段(mode=condition,如 ROETTM)"
    • addedInput schema / properties / preset
      Added value: +{
      +  "default": "",
      +  "description": "预设名(mode=condition,与 expr 二选一):LowPE/LowPB/HighDividend/PEG/HighROE 等 22 个",
      +  "title": "Preset",
      +  "type": "string"
      +}
    • addedInput schema / properties / type
      Added value: +{
      +  "default": "",
      +  "description": "label/ranking/strategy/event 的取值;list=true 时作分组过滤",
      +  "title": "Type",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "expr"
      -]
  5. Changed3 schema fields changed
    • addedInput schema / properties / expr / description
      Added value: +"因子表达式,如 intersect([PE_TTM>0, PE_TTM<20])"
    • addedInput schema / properties / limit / description
      Added value: +"条数(默认 20)"
    • addedInput schema / properties / orderby / description
      Added value: +"排序字段(如 ROETTM)"
  6. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the paid tier requirement (Standard ¥29.9+ with Key), that invalid field names return 422 with a remediation list, that multi-tag/multi-strategy responses come back as multiple segments requiring `tables`, that limit=9999 returns 5000+ rows without batching, and that trace_id is available for support.

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?

Front-loaded with the five-mode enumeration, which is the highest-value information, and each subsequent starred block covers a distinct concern (filters syntax, field discovery, sorting, listing, pagination, billing). It is dense and repeats the "don't guess values, call list" warning twice, which costs some tightness.

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?

For a 17-parameter, zero-annotation, mode-switching tool, this is complete: routing, discovery workflow, error recovery, pagination/limit behavior, multi-segment returns, and access cost are all covered. An output schema exists, so the description is not obliged to explain return values and does not.

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 already 100%, so the baseline is 3; the description goes beyond it by giving concrete syntax for `filters` (comma=AND, `0..20` inclusive, comparison operators), the `sort` descending/ascending polarity, and the practical meaning of `limit`. It does not add much for the lower-traffic params (asset, board, offset), which the schema already covers adequately.

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 gives a specific verb and resource (量化筛股/选股) and enumerates all five modes with their distinct semantics (filter/pool/rank/strategy/event), so an agent can map an intent onto the right mode without opening the schema. It also states the actual user phrasings that should route here (筛选/选股/符合条件的股票).

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

Usage Guidelines4/5

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

Strong internal routing: it says which mode handles ranking vs filtering (评分不能排序,要排行用 mode=rank), when to call list= to discover legal values, and when to raise limit to cover the whole market. The gap is sibling routing — nothing tells the agent when to prefer ashare_factors or ashare_etf-style tools over this screen.

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.

Resources