Skip to main content
Glama
chengzuopeng

Stock SDK MCP Server

by chengzuopeng

get_a_share_code_list

Read-only

Get all A-share stock codes (5000+), filterable by market such as Shanghai, Shenzhen, Beijing, STAR, and ChiNext. Optionally return codes without exchange prefixes.

Instructions

获取全部 A 股代码列表(5000+ 只),支持按市场筛选(上证/深证/北证/科创板/创业板)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketNo市场筛选: all=全部(默认), sh=上证, sz=深证, bj=北证, kc=科创板, cy=创业板
simpleNo是否返回简单代码(不带交易所前缀),默认 false
Behavior3/5

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

The annotations already declare readOnlyHint=true and openWorldHint=true, so the description does not need to restate safety. It adds the context of scale ('5000+ 只') and the list of supported markets, which provides some value beyond annotations. However, it does not disclose any potential behavioral details like return format, pagination, or whether codes include exchange prefixes, which could be relevant for a list-returning tool.

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, front-loaded sentence that conveys the core purpose and the main filter in a compact manner. Every element earns its place, with no redundant words or filler.

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?

For a simple list-retrieval tool with two optional parameters and a clear scope, the description is adequate. It specifies that it returns a code list and supports market filtering. It does not mention the return format (e.g., just codes or with names), but '代码列表' implies codes, and the lack of an output schema makes full return-format disclosure less critical. Slight gap in describing what exactly is in the list, but overall complete for the tool's complexity.

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

Parameters3/5

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

Schema description coverage is 100%, and both parameters ('market' and 'simple') have detailed descriptions in the schema itself. The tool description adds no extra parameter semantics beyond what the schema already provides. Baseline 3 is appropriate given the high schema coverage.

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 tool's action and resource: '获取全部 A 股代码列表' (get all A-share code list) and explicitly differentiates from sibling tools like get_hk_code_list and get_us_code_list by specifying 'A 股' and the market filter. The verb+resource is specific and unambiguous.

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?

The description provides clear context: it is for retrieving A-share code lists with optional market filtering. It does not explicitly name alternatives or state when-not-to-use, but the scope (A-shares vs HK/US/fund/industry lists) is evident from the sibling names and the description itself. It offers clear usage context without 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/chengzuopeng/stock-sdk-mcp'

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