Skip to main content
Glama

fund_historical_data

Retrieve historical fund performance data for analysis by specifying fund code, date range, and interval to track investment trends.

Instructions

Fonun geçmiş değerlerini getirir

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesFon kodu
start_dateNoBaşlangıç tarihi (YYYY-MM-DD)
end_dateNoBitiş tarihi (YYYY-MM-DD)
intervalNoVeri aralığı
sortNoSıralama alanı
orderNoSıralama yönü

Implementation Reference

  • Executes the core tool logic by making an HTTP GET request to the API endpoint `/funds/{code}/historical` to retrieve the fund's historical data values.
    async getFundHistoricalData(code: string, params: HistoricalDataParams = {}): Promise<FundHistoricalValue[]> { const response: AxiosResponse<FundHistoricalValue[]> = await this.client.get(`/funds/${code}/historical`, { params }); return response.data; }
  • src/tools.ts:226-261 (registration)
    Registers the 'fund_historical_data' tool in the MCP tools list with description and input schema definition.
    { name: 'fund_historical_data', description: 'Fonun geçmiş değerlerini getirir', inputSchema: { type: 'object', properties: { code: { type: 'string', description: 'Fon kodu' }, start_date: { type: 'string', description: 'Başlangıç tarihi (YYYY-MM-DD)' }, end_date: { type: 'string', description: 'Bitiş tarihi (YYYY-MM-DD)' }, interval: { type: 'string', description: 'Veri aralığı', enum: ['daily', 'weekly', 'monthly'] }, sort: { type: 'string', description: 'Sıralama alanı' }, order: { type: 'string', description: 'Sıralama yönü', enum: ['ASC', 'DESC'] } }, required: ['code'] } },
  • Zod schema used for input validation and parsing of the 'fund_historical_data' tool arguments.
    const HistoricalDataSchema = z.object({ code: z.string(), start_date: z.string().optional(), end_date: z.string().optional(), interval: z.enum(['daily', 'weekly', 'monthly']).optional(), sort: z.string().optional(), order: z.enum(['ASC', 'DESC']).optional() });
  • TypeScript interface defining the parameters for historical data requests, used in the API client.
    export interface HistoricalDataParams { start_date?: string; end_date?: string; interval?: 'daily' | 'weekly' | 'monthly'; sort?: string; order?: 'ASC' | 'DESC'; }
  • Dispatches the tool call in handleToolCall by parsing inputs and invoking the API client's getFundHistoricalData method.
    case 'fund_historical_data': const historicalParams = HistoricalDataSchema.parse(args); const { code, ...histParams } = historicalParams; return await this.apiClient.getFundHistoricalData(code, histParams);

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/kemalersin/fonparam-mcp'

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