Skip to main content
Glama
CNEquity — China A-Share Data Lake for AI Agents

CNEquity — China A-Share Data Lake for AI Agents

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

A local A-share Parquet lake. Call describe_lake first: it returns coverage and the rules that make an answer correct (price adjustment, point-in-time cutoffs, which series have no real history). Prefer run_sql for anything that aggregates.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
describe_lakeA

START HERE. Returns what this lake actually holds — every dataset with its coverage window, history mode and freshness — plus the query contract that makes an answer correct (adjustment, point-in-time, which series have no real history). Cheap, reads no data. Call it before answering anything factual about A-share data, and use its coverage_start/coverage_end to tell 'this lake has no such data' apart from 'this did not happen'. It also reports live_mode — when that is on, some answers come from the vendor rather than the lake and say so. Then pick a tool: resolve_symbol for names, query_bars for prices, query_fundamentals for financials, query_dataset for everything else, run_sql for aggregation.

resolve_symbolA

Look up a symbol by company name or partial code — '茅台', 'maotai', '600519' all resolve to 600519.SH. Do this before any query when the user named a company rather than a code: a guessed suffix returns an empty result rather than an error. Delisted names are included and flagged with delist_date. Returns the canonical symbol, name and delist_date; several rows mean the fragment is ambiguous, so pick by name before querying.

query_barsA

Daily or intraday price bars. PRICES ARE STORED UNADJUSTED: pass adjust='hfq' for any comparison across time (returns, charts, drawdowns) or a split reads as a crash. Use adjust='qfq' when the levels must match what a quote screen shows today. Pass universe='all_a' for cross-sectional work to drop names that were not tradable that day. datasets: daily_bars, index_bars, minute_bars (1m), minute_bars_5m (5m), and minute_bars_15m / _30m / _60m when the user has derived them (each bar's resampled_from says whether 1m or 5m built it). Every response carries origin: 'lake' is stored and validated; 'live' was fetched just now and cannot be adjusted or universe-filtered — read its warning before using the numbers for anything but a current quote. Not for financial statements (query_fundamentals), other datasets such as fund flow (query_dataset), or ranking and aggregating across many symbols (run_sql).

query_fundamentalsA

Financial statement items, point-in-time. as_of is REQUIRED and is what prevents look-ahead: only figures publicly announced on or before that date come back, and a restated figure returns the vintage that was current then. For a present-day view pass today's date; for a historical study pass the date being studied, never today. Results are paged with limit/offset. For prices use query_bars; for valuation ratios read valuation_metrics through query_dataset. Set pit_mode='strict' only to audit what the lake itself held on that date.

query_datasetA

Read any other dataset by date window and symbol — fund_flow, margin_trading, dragon_tiger, block_trades, northbound_holdings, share_unlock_schedule, corporate_actions, valuation_metrics, index_constituents and the rest. Call describe_lake for the full list and each one's coverage. Bars go through query_bars and financial statements through query_fundamentals. Results are paged with limit/offset and the response reports the true total and a truncated flag; for cross-sectional ranking use run_sql instead of paging.

run_sqlA

One read-only DuckDB SELECT over every dataset, each exposed as a view under its own name. Use this for ranking, aggregation, percentiles and joins across datasets — computing them here is both correct and far cheaper than paging thousands of rows back and adding them up. daily_bars_adj is a ready-made view carrying hfq_open/high/low/close and open-lake qfq_* beside the raw columns; for a bounded historical qfq window use daily_bars_qfq(start_date, end_date) so the anchor matches that window. Prefer these over joining adj_factors yourself. Single SELECT only: no writes, DDL or multiple statements. For one symbol's bars use query_bars, and for plain dataset reads query_dataset.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.7/5.0

Scored across 6 tools

Disambiguation5/5

Each tool owns a distinct job: describe_lake for metadata/contract, resolve_symbol for identifier lookup, query_bars for prices, query_fundamentals for statements, query_dataset for all other datasets, and run_sql for aggregation. The descriptions actively cross-route ('Bars go through query_bars... for cross-sectional ranking use run_sql'), neutralizing the one potential overlap between query_dataset and run_sql.

Naming Consistency5/5

All names follow a consistent snake_case verb_noun pattern (describe_lake, resolve_symbol, query_bars, query_fundamentals, query_dataset, run_sql). Verbs vary appropriately by action rather than arbitrarily, so the convention is predictable and readable.

Tool Count5/5

Six tools is well-scoped for a data lake spanning dozens of datasets: rather than one tool per dataset, the design consolidates with query_dataset and run_sql, so every tool earns its place. Neither bloated nor thin.

Completeness4/5

The read lifecycle is essentially complete — discover contents, resolve identifiers, query prices, financials, and arbitrary datasets, then aggregate in SQL with adjustment views provided. Minor gap: no explicit per-dataset column/schema discovery tool, though DuckDB views via run_sql largely fill it.

Maintenance

ActivityActive
ResponsivenessUsually handled