Skip to main content
Glama
lolifamily

ashare-mcp

get_moving_averages

Calculate Simple and Exponential Moving Averages for a stock over multiple periods and a date range. Auto-prefetches warmup data to ensure non-null values within the range.

Instructions

Calculate SMA and EMA for multiple periods over the requested date range.

Returns one row per trading day in [start_date, end_date]. Warmup is auto-prefetched, so values inside the range are not null from warmup. A period exceeding the stock's available history yields present-but-all-null SMA_/EMA_ columns, so a requested period never silently vanishes.

Args: code: Stock code. start_date: 'YYYY-MM-DD'. end_date: 'YYYY-MM-DD'. periods: Period list (each must be >= 1), e.g. [5,10,20,50,120,250]. Defaults to common set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
start_dateYes
end_dateYes
periodsNo
Behavior4/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It explains the return structure (one row per trading day), warmup prefetching to avoid nulls within the range, and handling of periods exceeding available history. No mention of permissions, rate limits, or destructive actions, but these are less critical for a read-only calculation tool.

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?

The description is well-structured with a clear initial statement, followed by details on behavior and edge cases, and a parameter list. It is slightly verbose but each sentence adds value without redundancy.

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?

Given the absence of an output schema and the moderate complexity (4 parameters), the description covers return behavior, row structure, and parameter details comprehensively. It does not specify the exact column naming convention but sufficiently informs about output.

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

Parameters5/5

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

The input schema has 0% description coverage, but the description adds meaning for all parameters: code is a stock code, start_date and end_date are in YYYY-MM-DD format, and periods is a list of integers ≥1 with a default common set. This fully compensates for the schema's lack of descriptions.

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 that the tool calculates SMA and EMA for multiple periods over a date range. This is a specific verb and resource, and it distinguishes itself from sibling tools that address other financial calculations or technical indicators.

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, such as get_technical_indicators which might also cover moving averages. Usage is implied through the tool name and context, but no direct guidance or exclusions are provided.

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/lolifamily/ashare-mcp'

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