Skip to main content
Glama

get_cash_flow

Retrieve cash flow statement data for companies to analyze financial health and liquidity using stock symbols and customizable time periods.

Instructions

Get company cash flow statement data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock symbol/ticker (e.g. '000001')
sourceNoData sourcesina
recent_nNoNumber of most recent records to return

Implementation Reference

  • The primary handler for the 'get_cash_flow' MCP tool. Includes registration via @mcp.tool decorator, input schema via Annotated Fields (symbol, source='sina', recent_n=10), fetches cash flow data from akshare_one library, limits recent records, and returns JSON string of the DataFrame.
    @mcp.tool def get_cash_flow( symbol: Annotated[str, Field(description="Stock symbol/ticker (e.g. '000001')")], source: Annotated[Literal["sina"], Field(description="Data source")] = "sina", recent_n: Annotated[ int | None, Field(description="Number of most recent records to return", ge=1) ] = 10, ) -> str: """Get company cash flow statement data.""" df = ako.get_cash_flow(symbol=symbol, source=source) if recent_n is not None: df = df.head(recent_n) return df.to_json(orient="records") or "[]"

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/zwldarren/akshare-one-mcp'

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