Skip to main content
Glama
kemalersin

FonParam MCP

by kemalersin

compare_funds

Compare 2-5 investment funds by their codes to analyze performance and features for informed decision-making in Turkey's market.

Instructions

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

Input Schema

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

Implementation Reference

  • Handler logic for compare_funds tool, which parses input using CompareFundsSchema and delegates to apiClient.compareFunds.
    case 'compare_funds':
      const compareParams = CompareFundsSchema.parse(args);
      return await this.apiClient.compareFunds(compareParams.codes);
  • Zod schema for validating the input parameters (codes array) of the compare_funds tool.
    const CompareFundsSchema = z.object({
      codes: z.array(z.string()).min(2).max(5)
    });
  • src/tools.ts:164-182 (registration)
    Registration of the compare_funds tool in the getTools() method, defining its name, description, and JSON input schema for MCP.
    {
      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']
      }
    },
  • Core implementation in API client that validates the codes array and makes HTTP GET request to '/funds/compare' endpoint to retrieve fund comparison data.
    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;
    }

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