Skip to main content
Glama
jarvislee90s-dot

local-datasource

query_stock

Fetch historical stock prices for A-share, Hong Kong, or US markets and save the data as a CSV file.

Instructions

Query historical stock prices for A-share, Hong Kong, or US markets. Output is written to file_path as CSV.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
freqNoMinute granularity (period=min)1
adjustNoAdjustment typeqfq
marketYesMarket: a (A-share), hk (Hong Kong), us (US)
periodNoK-line period (min: A-share only)daily
tickerYesStock ticker, e.g. 600519, 00700, AAPL
end_dateYesEnd date YYYY-MM-DD
file_pathYesOutput CSV file path
start_dateYesStart date YYYY-MM-DD

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It explicitly mentions the side effect of writing output to a CSV file via file_path, which is a key behavioral trait. However, it does not disclose other behaviors like read-only nature, error handling, or rate limits, making the transparency partial but acceptable.

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 extremely concise, consisting of only two sentences. It conveys the core purpose and output destination with no unnecessary words, perfectly matching the desired brevity and structure.

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?

The description, combined with the detailed parameter schema, gives the agent everything needed to call the tool correctly. It specifies the output format (CSV) and the target file path. It does not explain return codes or errors, but for a data query tool this is not critical. Overall, it is complete for the intended use.

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 input schema already provides descriptions for all 8 parameters with 100% coverage. The description text adds no additional meaning beyond the schema, such as reasoning for the default adjustment type or the relationship between period and freq. This meets the baseline but does not exceed it.

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 action (Query), the resource (historical stock prices), and the scope (A-share, Hong Kong, or US markets). This sufficiently distinguishes it from sibling tools like query_bond and query_index, which target different asset classes.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives, but the tool name and description make it obvious for stock price queries. It would benefit from a note such as 'use for stocks only, not for bonds or indices' but the current wording is adequate for basic usage.

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

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/jarvislee90s-dot/local-datasource'

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