get_dividends
Retrieve dividend payment history for specific stocks with pagination support to track investment income over time.
Instructions
Get dividend payment history with pagination support
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_dividends"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Pagination cursor for fetching next page | |
| limit | No | Maximum number of results to return | |
| ticker | No | Filter by ticker symbol |
Implementation Reference
- src/index.ts:812-823 (handler)MCP tool handler for 'get_dividends' which calls the client method.
case 'get_dividends': { const { cursor, limit, ticker } = PaginatedWithTickerInputSchema.parse(args); const dividends = await client.getDividends({ cursor, limit, ticker }); return { content: [ { type: 'text', text: JSON.stringify(dividends, null, 2), }, ], }; } - src/client.ts:277-294 (handler)Actual client implementation for fetching dividend history.
async getDividends(params?: { cursor?: number; limit?: number; ticker?: string; }): Promise<{ items: Dividend[]; nextPagePath?: string }> { const queryParams = new URLSearchParams(); if (params?.cursor) queryParams.append('cursor', params.cursor.toString()); if (params?.limit) queryParams.append('limit', params.limit.toString()); if (params?.ticker) queryParams.append('ticker', params.ticker); const endpoint = `/equity/history/dividends${queryParams.toString() ? `?${queryParams.toString()}` : ''}`; const response = await this.request<{ items: unknown[]; nextPagePath?: string }>(endpoint); return { items: z.array(DividendSchema).parse(response.items), nextPagePath: response.nextPagePath, }; }