Skip to main content
Glama

compare_funds

Analyze and compare up to five investment funds in Turkey by entering fund codes. Gain insights into fund performance and make informed investment decisions.

Instructions

Fonları karşılaştırır (2-5 fon)

Input Schema

NameRequiredDescriptionDefault
codesYesKarşılaştırılacak fon kodları

Input Schema (JSON Schema)

{ "properties": { "codes": { "description": "Karşılaştırılacak fon kodları", "items": { "type": "string" }, "maxItems": 5, "minItems": 2, "type": "array" } }, "required": [ "codes" ], "type": "object" }

Implementation Reference

  • Core handler function that validates the number of fund codes and fetches comparison data from the '/funds/compare' API endpoint.
    async compareFunds(codes: string[]): Promise<Fund[]> { if (codes.length < 2 || codes.length > 5) { throw new Error('2-5 arasında fon kodu belirtmelisiniz'); } const params = { codes: codes.join(',') }; const response: AxiosResponse<Fund[]> = await this.client.get('/funds/compare', { params }); return response.data; }
  • Zod schema for input validation: requires an array of 2 to 5 fund codes.
    const CompareFundsSchema = z.object({ codes: z.array(z.string()).min(2).max(5) });
  • src/tools.ts:164-182 (registration)
    Tool registration in getTools() method, defining name, description, and input schema for the MCP protocol.
    { name: 'compare_funds', description: 'Fonları karşılaştırır (2-5 fon)', inputSchema: { type: 'object', properties: { codes: { type: 'array', description: 'Karşılaştırılacak fon kodları', items: { type: 'string' }, minItems: 2, maxItems: 5 } }, required: ['codes'] } },
  • Tool dispatch logic in handleToolCall: parses arguments using schema and delegates to apiClient handler.
    case 'compare_funds': const compareParams = CompareFundsSchema.parse(args); return await this.apiClient.compareFunds(compareParams.codes);

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