get_splits
Retrieve historical and upcoming stock splits for any ticker. Filter by execution date and limit results with pagination.
Instructions
Historical and upcoming stock splits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | No | Filter by symbol. | |
| execution_date_gte | No | Inclusive lower bound on execution date. | |
| limit | No | Max rows. Default 20. | |
| cursor | No | Pagination cursor. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/massive_mcp/tools/corporate.py:38-61 (handler)The get_splits tool handler: an async function registered as an MCP tool that calls the Massive API endpoint /v3/reference/splits with optional ticker, execution_date_gte, limit, cursor, and order=desc parameters.
async def get_splits( ticker: str | None = None, execution_date_gte: str | None = None, limit: int = 20, cursor: str | None = None, ) -> dict[str, Any]: """Historical and upcoming stock splits. Args: ticker: Filter by symbol. execution_date_gte: Inclusive lower bound on execution date. limit: Max rows. Default 20. cursor: Pagination cursor. """ return await client.get( "/v3/reference/splits", { "ticker": ticker, "execution_date.gte": execution_date_gte, "limit": limit, "cursor": cursor, "order": "desc", }, ) - src/massive_mcp/tools/corporate.py:10-48 (registration)The register function in corporate.py that registers get_splits (along with get_dividends, get_ipos, get_ticker_events) as an MCP tool via the @mcp.tool() decorator.
def register(mcp: FastMCP, client: MassiveClient) -> None: @mcp.tool() async def get_dividends( ticker: str | None = None, ex_dividend_date_gte: str | None = None, limit: int = 20, cursor: str | None = None, ) -> dict[str, Any]: """Historical and upcoming dividends. Args: ticker: Filter by symbol. If None, returns across all tickers. ex_dividend_date_gte: Inclusive lower bound on ex-date ("YYYY-MM-DD"). limit: Max rows. Default 20. cursor: Pagination cursor. """ return await client.get( "/v3/reference/dividends", { "ticker": ticker, "ex_dividend_date.gte": ex_dividend_date_gte, "limit": limit, "cursor": cursor, "order": "desc", }, ) @mcp.tool() async def get_splits( ticker: str | None = None, execution_date_gte: str | None = None, limit: int = 20, cursor: str | None = None, ) -> dict[str, Any]: """Historical and upcoming stock splits. Args: ticker: Filter by symbol. execution_date_gte: Inclusive lower bound on execution date. - src/massive_mcp/server.py:36-48 (registration)The build_server function in server.py that calls corporate.register(mcp, client), which registers get_splits as an MCP tool.
for module in ( aggregates, quotes, snapshots, tickers, news, reference, indicators, corporate, financials, ): module.register(mcp, client)