Skip to main content
Glama

get_cash_flow

Retrieve company cash flow statement data for a specified stock symbol, with options to select the data source and determine the number of recent records to analyze.

Instructions

Get company cash flow statement data.

Input Schema

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

Implementation Reference

  • The handler function for the 'get_cash_flow' MCP tool. It is registered via the @mcp.tool decorator. The input schema is defined using Annotated types with pydantic Field for validation. The function fetches cash flow data from akshare_one (ako), optionally limits rows, and returns JSON.
    @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 "[]"

Other Tools

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

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