@tpmjs/official-ratio-analysis 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.d.ts +135 -0
- package/dist/index.js +208 -0
- package/package.json +70 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2025 TPMJS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Ratio Analysis Tool for TPMJS
|
|
5
|
+
* Calculates key financial ratios from balance sheet and income statement data
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Financial statement data
|
|
9
|
+
*/
|
|
10
|
+
interface FinancialData {
|
|
11
|
+
currentAssets?: number;
|
|
12
|
+
totalAssets?: number;
|
|
13
|
+
currentLiabilities?: number;
|
|
14
|
+
totalLiabilities?: number;
|
|
15
|
+
totalEquity?: number;
|
|
16
|
+
cash?: number;
|
|
17
|
+
inventory?: number;
|
|
18
|
+
accountsReceivable?: number;
|
|
19
|
+
accountsPayable?: number;
|
|
20
|
+
longTermDebt?: number;
|
|
21
|
+
revenue?: number;
|
|
22
|
+
grossProfit?: number;
|
|
23
|
+
operatingIncome?: number;
|
|
24
|
+
netIncome?: number;
|
|
25
|
+
interestExpense?: number;
|
|
26
|
+
costOfGoodsSold?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Liquidity ratios
|
|
30
|
+
*/
|
|
31
|
+
interface LiquidityRatios {
|
|
32
|
+
currentRatio?: {
|
|
33
|
+
value: number;
|
|
34
|
+
interpretation: string;
|
|
35
|
+
};
|
|
36
|
+
quickRatio?: {
|
|
37
|
+
value: number;
|
|
38
|
+
interpretation: string;
|
|
39
|
+
};
|
|
40
|
+
cashRatio?: {
|
|
41
|
+
value: number;
|
|
42
|
+
interpretation: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Profitability ratios
|
|
47
|
+
*/
|
|
48
|
+
interface ProfitabilityRatios {
|
|
49
|
+
grossProfitMargin?: {
|
|
50
|
+
value: number;
|
|
51
|
+
interpretation: string;
|
|
52
|
+
};
|
|
53
|
+
operatingMargin?: {
|
|
54
|
+
value: number;
|
|
55
|
+
interpretation: string;
|
|
56
|
+
};
|
|
57
|
+
netProfitMargin?: {
|
|
58
|
+
value: number;
|
|
59
|
+
interpretation: string;
|
|
60
|
+
};
|
|
61
|
+
returnOnAssets?: {
|
|
62
|
+
value: number;
|
|
63
|
+
interpretation: string;
|
|
64
|
+
};
|
|
65
|
+
returnOnEquity?: {
|
|
66
|
+
value: number;
|
|
67
|
+
interpretation: string;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Leverage ratios
|
|
72
|
+
*/
|
|
73
|
+
interface LeverageRatios {
|
|
74
|
+
debtToEquity?: {
|
|
75
|
+
value: number;
|
|
76
|
+
interpretation: string;
|
|
77
|
+
};
|
|
78
|
+
debtToAssets?: {
|
|
79
|
+
value: number;
|
|
80
|
+
interpretation: string;
|
|
81
|
+
};
|
|
82
|
+
equityMultiplier?: {
|
|
83
|
+
value: number;
|
|
84
|
+
interpretation: string;
|
|
85
|
+
};
|
|
86
|
+
interestCoverage?: {
|
|
87
|
+
value: number;
|
|
88
|
+
interpretation: string;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Efficiency ratios
|
|
93
|
+
*/
|
|
94
|
+
interface EfficiencyRatios {
|
|
95
|
+
assetTurnover?: {
|
|
96
|
+
value: number;
|
|
97
|
+
interpretation: string;
|
|
98
|
+
};
|
|
99
|
+
inventoryTurnover?: {
|
|
100
|
+
value: number;
|
|
101
|
+
interpretation: string;
|
|
102
|
+
};
|
|
103
|
+
receivablesTurnover?: {
|
|
104
|
+
value: number;
|
|
105
|
+
interpretation: string;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Input interface for ratio analysis
|
|
110
|
+
*/
|
|
111
|
+
interface RatioAnalysisInput {
|
|
112
|
+
financials: FinancialData;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Output interface for financial ratios
|
|
116
|
+
*/
|
|
117
|
+
interface FinancialRatios {
|
|
118
|
+
liquidity: LiquidityRatios;
|
|
119
|
+
profitability: ProfitabilityRatios;
|
|
120
|
+
leverage: LeverageRatios;
|
|
121
|
+
efficiency: EfficiencyRatios;
|
|
122
|
+
summary: {
|
|
123
|
+
totalRatiosCalculated: number;
|
|
124
|
+
overallHealth: 'strong' | 'moderate' | 'weak' | 'insufficient-data';
|
|
125
|
+
keyStrengths: string[];
|
|
126
|
+
keyWeaknesses: string[];
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Ratio Analysis Tool
|
|
131
|
+
* Calculates financial ratios and provides interpretation
|
|
132
|
+
*/
|
|
133
|
+
declare const ratioAnalysisTool: ai.Tool<RatioAnalysisInput, FinancialRatios>;
|
|
134
|
+
|
|
135
|
+
export { type FinancialRatios, ratioAnalysisTool as default, ratioAnalysisTool };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { tool, jsonSchema } from 'ai';
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
var ratioAnalysisTool = tool({
|
|
5
|
+
description: "Calculates key financial ratios from balance sheet and income statement data. Includes liquidity, profitability, leverage, and efficiency ratios with interpretations.",
|
|
6
|
+
inputSchema: jsonSchema({
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
financials: {
|
|
10
|
+
type: "object",
|
|
11
|
+
description: "Financial statement data",
|
|
12
|
+
properties: {
|
|
13
|
+
currentAssets: { type: "number", description: "Current assets" },
|
|
14
|
+
totalAssets: { type: "number", description: "Total assets" },
|
|
15
|
+
currentLiabilities: { type: "number", description: "Current liabilities" },
|
|
16
|
+
totalLiabilities: { type: "number", description: "Total liabilities" },
|
|
17
|
+
totalEquity: { type: "number", description: "Total equity" },
|
|
18
|
+
cash: { type: "number", description: "Cash and cash equivalents" },
|
|
19
|
+
inventory: { type: "number", description: "Inventory" },
|
|
20
|
+
accountsReceivable: { type: "number", description: "Accounts receivable" },
|
|
21
|
+
accountsPayable: { type: "number", description: "Accounts payable" },
|
|
22
|
+
longTermDebt: { type: "number", description: "Long-term debt" },
|
|
23
|
+
revenue: { type: "number", description: "Total revenue" },
|
|
24
|
+
grossProfit: { type: "number", description: "Gross profit" },
|
|
25
|
+
operatingIncome: { type: "number", description: "Operating income (EBIT)" },
|
|
26
|
+
netIncome: { type: "number", description: "Net income" },
|
|
27
|
+
interestExpense: { type: "number", description: "Interest expense" },
|
|
28
|
+
costOfGoodsSold: { type: "number", description: "Cost of goods sold" }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
required: ["financials"],
|
|
33
|
+
additionalProperties: false
|
|
34
|
+
}),
|
|
35
|
+
execute: async ({ financials }) => {
|
|
36
|
+
if (!financials || typeof financials !== "object") {
|
|
37
|
+
throw new Error("Financials must be a valid object");
|
|
38
|
+
}
|
|
39
|
+
const liquidity = {};
|
|
40
|
+
const profitability = {};
|
|
41
|
+
const leverage = {};
|
|
42
|
+
const efficiency = {};
|
|
43
|
+
const keyStrengths = [];
|
|
44
|
+
const keyWeaknesses = [];
|
|
45
|
+
let totalRatiosCalculated = 0;
|
|
46
|
+
if (financials.currentAssets && financials.currentLiabilities) {
|
|
47
|
+
const value = Math.round(financials.currentAssets / financials.currentLiabilities * 100) / 100;
|
|
48
|
+
liquidity.currentRatio = {
|
|
49
|
+
value,
|
|
50
|
+
interpretation: value >= 2 ? "Strong - Company can easily meet short-term obligations" : value >= 1 ? "Adequate - Company can meet short-term obligations" : "Weak - Company may struggle with short-term obligations"
|
|
51
|
+
};
|
|
52
|
+
if (value >= 2) keyStrengths.push("Strong liquidity position");
|
|
53
|
+
if (value < 1) keyWeaknesses.push("Insufficient liquidity");
|
|
54
|
+
totalRatiosCalculated++;
|
|
55
|
+
}
|
|
56
|
+
if (financials.currentAssets && financials.inventory !== void 0 && financials.currentLiabilities) {
|
|
57
|
+
const quickAssets = financials.currentAssets - financials.inventory;
|
|
58
|
+
const value = Math.round(quickAssets / financials.currentLiabilities * 100) / 100;
|
|
59
|
+
liquidity.quickRatio = {
|
|
60
|
+
value,
|
|
61
|
+
interpretation: value >= 1 ? "Strong - Can meet obligations without selling inventory" : value >= 0.5 ? "Moderate - Some reliance on inventory sales" : "Weak - Heavy reliance on inventory to meet obligations"
|
|
62
|
+
};
|
|
63
|
+
totalRatiosCalculated++;
|
|
64
|
+
}
|
|
65
|
+
if (financials.cash && financials.currentLiabilities) {
|
|
66
|
+
const value = Math.round(financials.cash / financials.currentLiabilities * 100) / 100;
|
|
67
|
+
liquidity.cashRatio = {
|
|
68
|
+
value,
|
|
69
|
+
interpretation: value >= 0.5 ? "Strong - Substantial cash reserves" : value >= 0.2 ? "Adequate - Reasonable cash position" : "Low - Limited cash reserves"
|
|
70
|
+
};
|
|
71
|
+
totalRatiosCalculated++;
|
|
72
|
+
}
|
|
73
|
+
if (financials.grossProfit && financials.revenue) {
|
|
74
|
+
const value = Math.round(financials.grossProfit / financials.revenue * 1e4) / 100;
|
|
75
|
+
profitability.grossProfitMargin = {
|
|
76
|
+
value,
|
|
77
|
+
interpretation: value >= 40 ? "Excellent - Strong pricing power and cost control" : value >= 20 ? "Good - Healthy profit margins" : "Low - Tight margins or pricing pressure"
|
|
78
|
+
};
|
|
79
|
+
if (value >= 40) keyStrengths.push("Excellent gross margins");
|
|
80
|
+
if (value < 20) keyWeaknesses.push("Low gross profit margins");
|
|
81
|
+
totalRatiosCalculated++;
|
|
82
|
+
}
|
|
83
|
+
if (financials.operatingIncome && financials.revenue) {
|
|
84
|
+
const value = Math.round(financials.operatingIncome / financials.revenue * 1e4) / 100;
|
|
85
|
+
profitability.operatingMargin = {
|
|
86
|
+
value,
|
|
87
|
+
interpretation: value >= 20 ? "Excellent - Very efficient operations" : value >= 10 ? "Good - Solid operational efficiency" : value >= 0 ? "Moderate - Room for operational improvement" : "Negative - Operating losses"
|
|
88
|
+
};
|
|
89
|
+
if (value >= 20) keyStrengths.push("High operational efficiency");
|
|
90
|
+
if (value < 0) keyWeaknesses.push("Operating losses");
|
|
91
|
+
totalRatiosCalculated++;
|
|
92
|
+
}
|
|
93
|
+
if (financials.netIncome && financials.revenue) {
|
|
94
|
+
const value = Math.round(financials.netIncome / financials.revenue * 1e4) / 100;
|
|
95
|
+
profitability.netProfitMargin = {
|
|
96
|
+
value,
|
|
97
|
+
interpretation: value >= 15 ? "Excellent - Strong bottom-line profitability" : value >= 5 ? "Good - Healthy net profitability" : value >= 0 ? "Moderate - Thin profit margins" : "Negative - Net losses"
|
|
98
|
+
};
|
|
99
|
+
if (value >= 15) keyStrengths.push("Strong net profitability");
|
|
100
|
+
if (value < 0) keyWeaknesses.push("Net losses");
|
|
101
|
+
totalRatiosCalculated++;
|
|
102
|
+
}
|
|
103
|
+
if (financials.netIncome && financials.totalAssets) {
|
|
104
|
+
const value = Math.round(financials.netIncome / financials.totalAssets * 1e4) / 100;
|
|
105
|
+
profitability.returnOnAssets = {
|
|
106
|
+
value,
|
|
107
|
+
interpretation: value >= 10 ? "Excellent - Efficient use of assets" : value >= 5 ? "Good - Adequate asset utilization" : value >= 0 ? "Moderate - Low asset efficiency" : "Negative - Assets not generating profit"
|
|
108
|
+
};
|
|
109
|
+
totalRatiosCalculated++;
|
|
110
|
+
}
|
|
111
|
+
if (financials.netIncome && financials.totalEquity) {
|
|
112
|
+
const value = Math.round(financials.netIncome / financials.totalEquity * 1e4) / 100;
|
|
113
|
+
profitability.returnOnEquity = {
|
|
114
|
+
value,
|
|
115
|
+
interpretation: value >= 20 ? "Excellent - Strong returns for shareholders" : value >= 10 ? "Good - Solid shareholder returns" : value >= 0 ? "Moderate - Low shareholder returns" : "Negative - Destroying shareholder value"
|
|
116
|
+
};
|
|
117
|
+
if (value >= 20) keyStrengths.push("Excellent shareholder returns");
|
|
118
|
+
if (value < 0) keyWeaknesses.push("Negative shareholder returns");
|
|
119
|
+
totalRatiosCalculated++;
|
|
120
|
+
}
|
|
121
|
+
if (financials.totalLiabilities && financials.totalEquity) {
|
|
122
|
+
const value = Math.round(financials.totalLiabilities / financials.totalEquity * 100) / 100;
|
|
123
|
+
leverage.debtToEquity = {
|
|
124
|
+
value,
|
|
125
|
+
interpretation: value <= 1 ? "Low - Conservative capital structure" : value <= 2 ? "Moderate - Balanced leverage" : "High - Aggressive leverage, higher financial risk"
|
|
126
|
+
};
|
|
127
|
+
if (value <= 1) keyStrengths.push("Conservative leverage");
|
|
128
|
+
if (value > 2) keyWeaknesses.push("High financial leverage");
|
|
129
|
+
totalRatiosCalculated++;
|
|
130
|
+
}
|
|
131
|
+
if (financials.totalLiabilities && financials.totalAssets) {
|
|
132
|
+
const value = Math.round(financials.totalLiabilities / financials.totalAssets * 1e4) / 100;
|
|
133
|
+
leverage.debtToAssets = {
|
|
134
|
+
value,
|
|
135
|
+
interpretation: value <= 40 ? "Low - Most assets financed by equity" : value <= 60 ? "Moderate - Balanced financing mix" : "High - Heavy reliance on debt financing"
|
|
136
|
+
};
|
|
137
|
+
totalRatiosCalculated++;
|
|
138
|
+
}
|
|
139
|
+
if (financials.totalAssets && financials.totalEquity) {
|
|
140
|
+
const value = Math.round(financials.totalAssets / financials.totalEquity * 100) / 100;
|
|
141
|
+
leverage.equityMultiplier = {
|
|
142
|
+
value,
|
|
143
|
+
interpretation: value <= 2 ? "Low - Conservative leverage" : value <= 3 ? "Moderate - Average leverage" : "High - Aggressive use of leverage"
|
|
144
|
+
};
|
|
145
|
+
totalRatiosCalculated++;
|
|
146
|
+
}
|
|
147
|
+
if (financials.operatingIncome && financials.interestExpense) {
|
|
148
|
+
const value = Math.round(financials.operatingIncome / financials.interestExpense * 100) / 100;
|
|
149
|
+
leverage.interestCoverage = {
|
|
150
|
+
value,
|
|
151
|
+
interpretation: value >= 5 ? "Strong - Easily covers interest obligations" : value >= 2.5 ? "Adequate - Can comfortably cover interest" : value >= 1 ? "Weak - Barely covers interest payments" : "Critical - Cannot cover interest from operations"
|
|
152
|
+
};
|
|
153
|
+
if (value < 1.5) keyWeaknesses.push("Low interest coverage");
|
|
154
|
+
totalRatiosCalculated++;
|
|
155
|
+
}
|
|
156
|
+
if (financials.revenue && financials.totalAssets) {
|
|
157
|
+
const value = Math.round(financials.revenue / financials.totalAssets * 100) / 100;
|
|
158
|
+
efficiency.assetTurnover = {
|
|
159
|
+
value,
|
|
160
|
+
interpretation: value >= 2 ? "High - Efficient use of assets to generate revenue" : value >= 1 ? "Moderate - Average asset utilization" : "Low - Assets underutilized"
|
|
161
|
+
};
|
|
162
|
+
totalRatiosCalculated++;
|
|
163
|
+
}
|
|
164
|
+
if (financials.costOfGoodsSold && financials.inventory) {
|
|
165
|
+
const value = Math.round(financials.costOfGoodsSold / financials.inventory * 100) / 100;
|
|
166
|
+
efficiency.inventoryTurnover = {
|
|
167
|
+
value,
|
|
168
|
+
interpretation: value >= 8 ? "High - Fast-moving inventory, efficient management" : value >= 4 ? "Moderate - Reasonable inventory turnover" : "Low - Slow-moving inventory, may indicate obsolescence"
|
|
169
|
+
};
|
|
170
|
+
totalRatiosCalculated++;
|
|
171
|
+
}
|
|
172
|
+
if (financials.revenue && financials.accountsReceivable) {
|
|
173
|
+
const value = Math.round(financials.revenue / financials.accountsReceivable * 100) / 100;
|
|
174
|
+
efficiency.receivablesTurnover = {
|
|
175
|
+
value,
|
|
176
|
+
interpretation: value >= 10 ? "High - Efficient collections" : value >= 6 ? "Moderate - Average collection efficiency" : "Low - Slow collections, may indicate credit issues"
|
|
177
|
+
};
|
|
178
|
+
totalRatiosCalculated++;
|
|
179
|
+
}
|
|
180
|
+
let overallHealth = "insufficient-data";
|
|
181
|
+
if (totalRatiosCalculated >= 5) {
|
|
182
|
+
const strengthScore = keyStrengths.length;
|
|
183
|
+
const weaknessScore = keyWeaknesses.length;
|
|
184
|
+
if (strengthScore > weaknessScore && strengthScore >= 2) {
|
|
185
|
+
overallHealth = "strong";
|
|
186
|
+
} else if (weaknessScore > strengthScore && weaknessScore >= 2) {
|
|
187
|
+
overallHealth = "weak";
|
|
188
|
+
} else {
|
|
189
|
+
overallHealth = "moderate";
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
liquidity,
|
|
194
|
+
profitability,
|
|
195
|
+
leverage,
|
|
196
|
+
efficiency,
|
|
197
|
+
summary: {
|
|
198
|
+
totalRatiosCalculated,
|
|
199
|
+
overallHealth,
|
|
200
|
+
keyStrengths,
|
|
201
|
+
keyWeaknesses
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
var index_default = ratioAnalysisTool;
|
|
207
|
+
|
|
208
|
+
export { index_default as default, ratioAnalysisTool };
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tpmjs/official-ratio-analysis",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Calculates key financial ratios from balance sheet and income statement data",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"tpmjs",
|
|
8
|
+
"finance",
|
|
9
|
+
"ratios",
|
|
10
|
+
"analysis",
|
|
11
|
+
"financial-statements"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"tsup": "^8.3.5",
|
|
24
|
+
"typescript": "^5.9.3",
|
|
25
|
+
"@tpmjs/tsconfig": "0.0.0"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/anthropics/tpmjs.git",
|
|
33
|
+
"directory": "packages/tools/official/ratio-analysis"
|
|
34
|
+
},
|
|
35
|
+
"homepage": "https://tpmjs.com",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"tpmjs": {
|
|
38
|
+
"category": "finance",
|
|
39
|
+
"frameworks": [
|
|
40
|
+
"vercel-ai"
|
|
41
|
+
],
|
|
42
|
+
"tools": [
|
|
43
|
+
{
|
|
44
|
+
"name": "ratioAnalysisTool",
|
|
45
|
+
"description": "Calculates key financial ratios from balance sheet and income statement data",
|
|
46
|
+
"parameters": [
|
|
47
|
+
{
|
|
48
|
+
"name": "financials",
|
|
49
|
+
"type": "object",
|
|
50
|
+
"description": "Financial statement data including balance sheet and income statement",
|
|
51
|
+
"required": true
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"returns": {
|
|
55
|
+
"type": "FinancialRatios",
|
|
56
|
+
"description": "Calculated ratios with interpretations across liquidity, profitability, leverage, and efficiency"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"ai": "6.0.0-beta.124"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "tsup",
|
|
66
|
+
"dev": "tsup --watch",
|
|
67
|
+
"type-check": "tsc --noEmit",
|
|
68
|
+
"clean": "rm -rf dist .turbo"
|
|
69
|
+
}
|
|
70
|
+
}
|