Skip to main content
Glama
chengzuopeng

Stock SDK MCP Server

by chengzuopeng

get_quotes_by_query

Read-only

Get real-time stock quotes by fuzzy searching a stock's name, code, or pinyin. Automatically detects the market (A-shares, Hong Kong, US) and returns current prices.

Instructions

【推荐】通用行情查询工具,支持按名称、代码或拼音模糊查询,自动识别市场(A股/港股/美股)并返回实时行情。如果你只知道股票名字,请优先使用此工具

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queriesYes股票名称、代码或拼音数组,如 ["茅台", "腾讯", "AAPL"]
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, covering the safety profile. The description adds valuable behavioral context: fuzzy matching (按名称/代码/拼音), automatic market identification (A股/港股/美股), and real-time quote delivery. This goes beyond the annotations without contradicting them.

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 two concise sentences. The first sentence states the function and features; the second gives clear usage priority. No wasted words, and it front-loads the key action (通用行情查询).

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 one-parameter query tool with annotations covering safety, the description is nearly complete: it specifies input types, market auto-detection, and usage guidance. It does not describe the output format, but with no output schema, the agent may still get vague returns. Still, the tool's simplicity and strong annotation context make this a minor gap.

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?

The single parameter queries is fully described in the schema with examples (茅台, 腾讯, AAPL), achieving 100% schema coverage. The description repeats the types (name/code/pinyin) but adds no new semantic detail beyond the schema, so the baseline of 3 applies.

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 function: a universal real-time quote query supporting fuzzy search by name, code, or pinyin, with automatic market detection. It distinguishes itself from sibling market-specific tools (e.g., get_a_share_quotes, get_hk_quotes) by being the general-purpose entry point, reinforced by the recommendation for name-only queries.

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?

Provides explicit guidance: 'If you only know the stock name, prefer this tool' (如果你只知道股票名字,请优先使用此工具). This tells the agent when to use it. It also implies alternatives (specific market tools) but does not explicitly name them or state when not to use the tool.

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