company_details
Retrieve portfolio management company details and associated funds in Turkey using company codes to access investment data through FonParam API.
Instructions
Portföy yönetim şirketi detaylarını getirir
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Şirket kodu | |
| include_funds | No | Şirketin fonlarını da getir (varsayılan: true) |
Implementation Reference
- src/tools.ts:513-515 (handler)The MCP tool handler case in handleToolCall that validates input parameters using Zod schema and delegates to the API client method for fetching company details. Note: case label has a typo ('ompany_details') compared to the tool name.
case 'ompany_details': const companyParams = CompanyDetailsSchema.parse(args); return await this.apiClient.getCompanyDetails(companyParams.code, companyParams.include_funds); - src/tools.ts:53-56 (schema)Zod schema for input validation of the company_details tool parameters: required code (string) and optional include_funds (boolean).
const CompanyDetailsSchema = z.object({ code: z.string(), include_funds: z.boolean().optional() }); - src/tools.ts:305-322 (registration)Registration of the company_details tool in the getTools() method, including name, description, and input schema definition for MCP protocol.
{ name: 'company_details', description: 'Portföy yönetim şirketi detaylarını getirir', inputSchema: { type: 'object', properties: { code: { type: 'string', description: 'Şirket kodu' }, include_funds: { type: 'boolean', description: 'Şirketin fonlarını da getir (varsayılan: true)' } }, required: ['code'] } }, - src/api-client.ts:120-124 (helper)API client helper method that performs the HTTP GET request to fetch company details from the backend API, including optional funds.
async getCompanyDetails(code: string, includeFunds: boolean = true): Promise<CompanyDetails> { const params = { include_funds: includeFunds }; const response: AxiosResponse<CompanyDetails> = await this.client.get(`/companies/${code}`, { params }); return response.data; } - src/types.ts:153-156 (schema)TypeScript interface defining the structure of the CompanyDetails response object, used for type safety in the tool implementation.
export interface CompanyDetails { company: FundManagementCompany; stats?: CompanyStatistics; }