Skip to main content
Glama
kemalersin

FonParam MCP

by kemalersin

analyze_fund

Analyzes investment fund performance in Turkey by calculating returns based on initial investment, time periods, and optional monthly contributions with growth adjustments.

Instructions

Fon için yatırım analizi yapar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesFon kodu
startDateYesBaşlangıç tarihi
initialInvestmentYesBaşlangıç yatırımı (TL)
monthlyInvestmentNoAylık yatırım tutarı (TL, opsiyonel)
yearlyIncreaseTypeNoYıllık artış tipi (opsiyonel)
yearlyIncreaseValueNoYıllık artış değeri (opsiyonel)
includeMonthlyDetailsNoAylık detayları getir (varsayılan: true)

Implementation Reference

  • Core handler function that executes the analysis by making an API call to the /funds/{code}/analyze endpoint with prepared query parameters.
    async analyzeFund(params: FundAnalysisParams): Promise<FundAnalysisResult> {
      const { code, ...queryParams } = params;
      
      // Nested object'i düzleştir
      const flatParams: Record<string, any> = {
        ...queryParams,
        'yearlyIncrease.type': params.yearlyIncrease?.type,
        'yearlyIncrease.value': params.yearlyIncrease?.value
      };
    
      const response: AxiosResponse<FundAnalysisResult> = await this.client.get(`/funds/${code}/analyze`, {
        params: flatParams
      });
      return response.data;
    }
  • Tool dispatch handler in handleToolCall that validates input with AnalyzeFundSchema and invokes apiClient.analyzeFund.
    case 'analyze_fund':
      const analyzeParams = AnalyzeFundSchema.parse(args);
      const yearlyIncrease = analyzeParams.yearlyIncreaseType && analyzeParams.yearlyIncreaseValue
        ? { type: analyzeParams.yearlyIncreaseType, value: analyzeParams.yearlyIncreaseValue }
        : undefined;
      
      return await this.apiClient.analyzeFund({
        code: analyzeParams.code,
        startDate: analyzeParams.startDate,
        initialInvestment: analyzeParams.initialInvestment,
        monthlyInvestment: analyzeParams.monthlyInvestment,
        yearlyIncrease,
        includeMonthlyDetails: analyzeParams.includeMonthlyDetails
      });
  • Zod schema definition for input validation of analyze_fund tool parameters.
    const AnalyzeFundSchema = z.object({
      code: z.string(),
      startDate: z.enum(['last_1_day', 'last_1_week', 'last_1_month', 'last_3_months', 'last_6_months', 'year_start', 'last_1_year', 'last_3_years', 'last_5_years']),
      initialInvestment: z.number().min(0),
      monthlyInvestment: z.number().min(0).optional(),
      yearlyIncreaseType: z.enum(['percentage', 'amount']).optional(),
      yearlyIncreaseValue: z.number().min(0).optional(),
      includeMonthlyDetails: z.boolean().optional()
    });
  • src/tools.ts:183-225 (registration)
    MCP tool registration entry in getTools() array, defining name, description, and input schema for analyze_fund.
    {
      name: 'analyze_fund',
      description: 'Fon için yatırım analizi yapar',
      inputSchema: {
        type: 'object',
        properties: {
          code: {
            type: 'string',
            description: 'Fon kodu'
          },
          startDate: {
            type: 'string',
            description: 'Başlangıç tarihi',
            enum: ['last_1_day', 'last_1_week', 'last_1_month', 'last_3_months', 'last_6_months', 'year_start', 'last_1_year', 'last_3_years', 'last_5_years']
          },
          initialInvestment: {
            type: 'number',
            description: 'Başlangıç yatırımı (TL)',
            minimum: 0
          },
          monthlyInvestment: {
            type: 'number',
            description: 'Aylık yatırım tutarı (TL, opsiyonel)',
            minimum: 0
          },
          yearlyIncreaseType: {
            type: 'string',
            description: 'Yıllık artış tipi (opsiyonel)',
            enum: ['percentage', 'amount']
          },
          yearlyIncreaseValue: {
            type: 'number',
            description: 'Yıllık artış değeri (opsiyonel)',
            minimum: 0
          },
          includeMonthlyDetails: {
            type: 'boolean',
            description: 'Aylık detayları getir (varsayılan: true)'
          }
        },
        required: ['code', 'startDate', 'initialInvestment']
      }
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'analysis' but doesn't clarify if this is a read-only operation, what permissions might be needed, whether it performs calculations or fetches data, or what the output format might be. For a tool with 7 parameters and no output schema, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Turkish, making it concise. However, it's not front-loaded with critical details—it could better prioritize key information like the tool's specific analysis type. There's no wasted text, but it's under-specified rather than optimally structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what the analysis entails, what results to expect, or how to interpret outputs. For a financial analysis tool with multiple investment parameters, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly with descriptions, enums, and constraints. The description adds no additional meaning beyond what the schema provides, such as explaining relationships between parameters (e.g., how 'yearlyIncreaseType' interacts with 'yearlyIncreaseValue'). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Fon için yatırım analizi yapar' (Performs investment analysis for funds) states the general purpose but lacks specificity about what kind of analysis it performs. It doesn't distinguish from siblings like 'compare_funds' or 'fund_historical_data', which might offer overlapping functionality. The description is vague about the analysis scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'compare_funds' or 'fund_historical_data'. The description doesn't mention prerequisites, exclusions, or specific contexts for usage, leaving the agent to infer based on parameter names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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