dart_financial
Retrieve Korean company financial statements from DART, including income statements, balance sheets, and cash flow data for analysis.
Instructions
Retrieve financial statements for a Korean company from DART. Includes income statement, balance sheet, and cash flow data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| corp_code | Yes | DART corporation code (8 digits) | |
| bsns_year | Yes | Business year (YYYY) | |
| reprt_code | No | Report type: 11013=Q1, 11012=H1, 11014=Q3, 11011=Annual (default) |
Implementation Reference
- src/index.ts:16-39 (handler)The tool registration and dynamic handler logic, which executes a gateway request based on the tool's endpoint definition.
server.tool( tool.name, tool.description, tool.inputSchema.shape, async (params) => { const method = tool.method || "POST"; const result = await gatewayRequest(method, tool.endpoint, params as Record<string, unknown>); if (result.error) { return { content: [{ type: "text" as const, text: `Error (${result.status}): ${result.error}` }], isError: true, }; } const text = typeof result.data === "string" ? result.data : JSON.stringify(result.data, null, 2); return { content: [{ type: "text" as const, text }], }; }, ); - src/tools/dart.ts:18-28 (schema)The schema definition for the dart_financial tool, including input validation and the API endpoint.
{ name: "dart_financial", description: "Retrieve financial statements for a Korean company from DART. Includes income statement, balance sheet, and cash flow data.", inputSchema: z.object({ corp_code: z.string().describe("DART corporation code (8 digits)"), bsns_year: z.string().describe("Business year (YYYY)"), reprt_code: z.enum(["11013", "11012", "11014", "11011"]).optional() .describe("Report type: 11013=Q1, 11012=H1, 11014=Q3, 11011=Annual (default)"), }), endpoint: "/v1/dart/financial", },