fmp-ai-tools 0.2.0-beta.8 → 0.2.0-beta.9
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/dist/providers/openai/index.d.mts +8 -1
- package/dist/providers/openai/index.d.ts +8 -1
- package/dist/providers/openai/index.js +62 -0
- package/dist/providers/openai/index.js.map +1 -1
- package/dist/providers/openai/index.mjs +56 -1
- package/dist/providers/openai/index.mjs.map +1 -1
- package/dist/providers/vercel-ai/index.d.mts +8 -1
- package/dist/providers/vercel-ai/index.d.ts +8 -1
- package/dist/providers/vercel-ai/index.js +68 -3
- package/dist/providers/vercel-ai/index.js.map +1 -1
- package/dist/providers/vercel-ai/index.mjs +62 -4
- package/dist/providers/vercel-ai/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -8,6 +8,7 @@ declare const getIntraday: Tool<unknown>;
|
|
|
8
8
|
declare const getCompanyProfile: Tool<unknown>;
|
|
9
9
|
declare const getCompanySharesFloat: Tool<unknown>;
|
|
10
10
|
declare const getCompanyExecutiveCompensation: Tool<unknown>;
|
|
11
|
+
declare const getStockPeers: Tool<unknown>;
|
|
11
12
|
declare const getEarningsCalendar: Tool<unknown>;
|
|
12
13
|
declare const getEconomicCalendar: Tool<unknown>;
|
|
13
14
|
declare const getTreasuryRates: Tool<unknown>;
|
|
@@ -25,6 +26,11 @@ declare const getIncomeGrowth: Tool<unknown>;
|
|
|
25
26
|
declare const getBalanceSheetGrowth: Tool<unknown>;
|
|
26
27
|
declare const getFinancialGrowth: Tool<unknown>;
|
|
27
28
|
declare const getEarningsHistorical: Tool<unknown>;
|
|
29
|
+
declare const getFinancialScores: Tool<unknown>;
|
|
30
|
+
declare const getKeyMetricsTTM: Tool<unknown>;
|
|
31
|
+
declare const getFinancialRatiosTTM: Tool<unknown>;
|
|
32
|
+
declare const getRevenueProductSegmentation: Tool<unknown>;
|
|
33
|
+
declare const getRevenueGeographicSegmentation: Tool<unknown>;
|
|
28
34
|
declare const getInsiderTrading: Tool<unknown>;
|
|
29
35
|
declare const getInstitutionalHolders: Tool<unknown>;
|
|
30
36
|
declare const getMarketPerformance: Tool<unknown>;
|
|
@@ -45,6 +51,7 @@ declare const searchSymbol: Tool<unknown>;
|
|
|
45
51
|
declare const getAnalystEstimates: Tool<unknown>;
|
|
46
52
|
declare const getPriceTargetConsensus: Tool<unknown>;
|
|
47
53
|
declare const getStockGrades: Tool<unknown>;
|
|
54
|
+
declare const getGradesConsensus: Tool<unknown>;
|
|
48
55
|
declare const getDiscountedCashFlow: Tool<unknown>;
|
|
49
56
|
declare const getCompanyRating: Tool<unknown>;
|
|
50
57
|
declare const getTechnicalIndicator: Tool<unknown>;
|
|
@@ -70,4 +77,4 @@ declare const senateHouseTools: Tool<unknown>[];
|
|
|
70
77
|
declare const stockTools: Tool<unknown>[];
|
|
71
78
|
declare const fmpTools: Tool<unknown>[];
|
|
72
79
|
|
|
73
|
-
export { analystTools, calendarTools, companyTools, economicTools, etfTools, financialTools, fmpTools, getAnalystEstimates, getBalanceSheet, getBalanceSheetGrowth, getCashFlowStatement, getCashflowGrowth, getCompanyExecutiveCompensation, getCompanyProfile, getCompanyRating, getCompanySharesFloat, getDiscountedCashFlow, getDividendHistory, getETFHoldings, getETFProfile, getEarningsCalendar, getEarningsHistorical, getEconomicCalendar, getEconomicIndicators, getEnterpriseValue, getFinancialGrowth, getFinancialRatios, getGainers, getHistoricalPrice, getHouseTrading, getHouseTradingByName, getHouseTradingRSSFeed, getIncomeGrowth, getIncomeStatement, getInsiderTrading, getInstitutionalHolders, getIntraday, getKeyMetrics, getLosers, getMarketCap, getMarketPerformance, getMostActive, getPriceTargetConsensus, getSectorPerformance, getSenateTrading, getSenateTradingByName, getSenateTradingRSSFeed, getStockGrades, getStockNews, getStockNewsBySymbol, getStockQuote, getStockSplits, getTechnicalIndicator, getTreasuryRates, insiderTools, institutionalTools, marketTools, newsTools, quoteTools, screenStocks, screenerTools, searchSymbol, searchTools, senateHouseTools, stockTools, technicalTools, valuationTools };
|
|
80
|
+
export { analystTools, calendarTools, companyTools, economicTools, etfTools, financialTools, fmpTools, getAnalystEstimates, getBalanceSheet, getBalanceSheetGrowth, getCashFlowStatement, getCashflowGrowth, getCompanyExecutiveCompensation, getCompanyProfile, getCompanyRating, getCompanySharesFloat, getDiscountedCashFlow, getDividendHistory, getETFHoldings, getETFProfile, getEarningsCalendar, getEarningsHistorical, getEconomicCalendar, getEconomicIndicators, getEnterpriseValue, getFinancialGrowth, getFinancialRatios, getFinancialRatiosTTM, getFinancialScores, getGainers, getGradesConsensus, getHistoricalPrice, getHouseTrading, getHouseTradingByName, getHouseTradingRSSFeed, getIncomeGrowth, getIncomeStatement, getInsiderTrading, getInstitutionalHolders, getIntraday, getKeyMetrics, getKeyMetricsTTM, getLosers, getMarketCap, getMarketPerformance, getMostActive, getPriceTargetConsensus, getRevenueGeographicSegmentation, getRevenueProductSegmentation, getSectorPerformance, getSenateTrading, getSenateTradingByName, getSenateTradingRSSFeed, getStockGrades, getStockNews, getStockNewsBySymbol, getStockPeers, getStockQuote, getStockSplits, getTechnicalIndicator, getTreasuryRates, insiderTools, institutionalTools, marketTools, newsTools, quoteTools, screenStocks, screenerTools, searchSymbol, searchTools, senateHouseTools, stockTools, technicalTools, valuationTools };
|
|
@@ -8,6 +8,7 @@ declare const getIntraday: Tool<unknown>;
|
|
|
8
8
|
declare const getCompanyProfile: Tool<unknown>;
|
|
9
9
|
declare const getCompanySharesFloat: Tool<unknown>;
|
|
10
10
|
declare const getCompanyExecutiveCompensation: Tool<unknown>;
|
|
11
|
+
declare const getStockPeers: Tool<unknown>;
|
|
11
12
|
declare const getEarningsCalendar: Tool<unknown>;
|
|
12
13
|
declare const getEconomicCalendar: Tool<unknown>;
|
|
13
14
|
declare const getTreasuryRates: Tool<unknown>;
|
|
@@ -25,6 +26,11 @@ declare const getIncomeGrowth: Tool<unknown>;
|
|
|
25
26
|
declare const getBalanceSheetGrowth: Tool<unknown>;
|
|
26
27
|
declare const getFinancialGrowth: Tool<unknown>;
|
|
27
28
|
declare const getEarningsHistorical: Tool<unknown>;
|
|
29
|
+
declare const getFinancialScores: Tool<unknown>;
|
|
30
|
+
declare const getKeyMetricsTTM: Tool<unknown>;
|
|
31
|
+
declare const getFinancialRatiosTTM: Tool<unknown>;
|
|
32
|
+
declare const getRevenueProductSegmentation: Tool<unknown>;
|
|
33
|
+
declare const getRevenueGeographicSegmentation: Tool<unknown>;
|
|
28
34
|
declare const getInsiderTrading: Tool<unknown>;
|
|
29
35
|
declare const getInstitutionalHolders: Tool<unknown>;
|
|
30
36
|
declare const getMarketPerformance: Tool<unknown>;
|
|
@@ -45,6 +51,7 @@ declare const searchSymbol: Tool<unknown>;
|
|
|
45
51
|
declare const getAnalystEstimates: Tool<unknown>;
|
|
46
52
|
declare const getPriceTargetConsensus: Tool<unknown>;
|
|
47
53
|
declare const getStockGrades: Tool<unknown>;
|
|
54
|
+
declare const getGradesConsensus: Tool<unknown>;
|
|
48
55
|
declare const getDiscountedCashFlow: Tool<unknown>;
|
|
49
56
|
declare const getCompanyRating: Tool<unknown>;
|
|
50
57
|
declare const getTechnicalIndicator: Tool<unknown>;
|
|
@@ -70,4 +77,4 @@ declare const senateHouseTools: Tool<unknown>[];
|
|
|
70
77
|
declare const stockTools: Tool<unknown>[];
|
|
71
78
|
declare const fmpTools: Tool<unknown>[];
|
|
72
79
|
|
|
73
|
-
export { analystTools, calendarTools, companyTools, economicTools, etfTools, financialTools, fmpTools, getAnalystEstimates, getBalanceSheet, getBalanceSheetGrowth, getCashFlowStatement, getCashflowGrowth, getCompanyExecutiveCompensation, getCompanyProfile, getCompanyRating, getCompanySharesFloat, getDiscountedCashFlow, getDividendHistory, getETFHoldings, getETFProfile, getEarningsCalendar, getEarningsHistorical, getEconomicCalendar, getEconomicIndicators, getEnterpriseValue, getFinancialGrowth, getFinancialRatios, getGainers, getHistoricalPrice, getHouseTrading, getHouseTradingByName, getHouseTradingRSSFeed, getIncomeGrowth, getIncomeStatement, getInsiderTrading, getInstitutionalHolders, getIntraday, getKeyMetrics, getLosers, getMarketCap, getMarketPerformance, getMostActive, getPriceTargetConsensus, getSectorPerformance, getSenateTrading, getSenateTradingByName, getSenateTradingRSSFeed, getStockGrades, getStockNews, getStockNewsBySymbol, getStockQuote, getStockSplits, getTechnicalIndicator, getTreasuryRates, insiderTools, institutionalTools, marketTools, newsTools, quoteTools, screenStocks, screenerTools, searchSymbol, searchTools, senateHouseTools, stockTools, technicalTools, valuationTools };
|
|
80
|
+
export { analystTools, calendarTools, companyTools, economicTools, etfTools, financialTools, fmpTools, getAnalystEstimates, getBalanceSheet, getBalanceSheetGrowth, getCashFlowStatement, getCashflowGrowth, getCompanyExecutiveCompensation, getCompanyProfile, getCompanyRating, getCompanySharesFloat, getDiscountedCashFlow, getDividendHistory, getETFHoldings, getETFProfile, getEarningsCalendar, getEarningsHistorical, getEconomicCalendar, getEconomicIndicators, getEnterpriseValue, getFinancialGrowth, getFinancialRatios, getFinancialRatiosTTM, getFinancialScores, getGainers, getGradesConsensus, getHistoricalPrice, getHouseTrading, getHouseTradingByName, getHouseTradingRSSFeed, getIncomeGrowth, getIncomeStatement, getInsiderTrading, getInstitutionalHolders, getIntraday, getKeyMetrics, getKeyMetricsTTM, getLosers, getMarketCap, getMarketPerformance, getMostActive, getPriceTargetConsensus, getRevenueGeographicSegmentation, getRevenueProductSegmentation, getSectorPerformance, getSenateTrading, getSenateTradingByName, getSenateTradingRSSFeed, getStockGrades, getStockNews, getStockNewsBySymbol, getStockPeers, getStockQuote, getStockSplits, getTechnicalIndicator, getTreasuryRates, insiderTools, institutionalTools, marketTools, newsTools, quoteTools, screenStocks, screenerTools, searchSymbol, searchTools, senateHouseTools, stockTools, technicalTools, valuationTools };
|
|
@@ -326,6 +326,12 @@ var companyDefinitions = [
|
|
|
326
326
|
description: "Get the company executive compensation",
|
|
327
327
|
inputSchema: symbolSchema,
|
|
328
328
|
execute: async ({ symbol: symbol2 }) => toToolResponse(await getFMPClient().company.getExecutiveCompensation(symbol2))
|
|
329
|
+
}),
|
|
330
|
+
defineTool({
|
|
331
|
+
name: "getStockPeers",
|
|
332
|
+
description: "Get a list of peer companies (with price and market cap) for a company",
|
|
333
|
+
inputSchema: symbolSchema,
|
|
334
|
+
execute: async ({ symbol: symbol2 }) => toToolResponse(await getFMPClient().company.getStockPeers(symbol2))
|
|
329
335
|
})
|
|
330
336
|
];
|
|
331
337
|
var period = zod.z.enum(["annual", "quarter"]).default("annual").describe("The period type (annual or quarter)");
|
|
@@ -406,6 +412,40 @@ var financialDefinitions = [
|
|
|
406
412
|
limit: zod.z.number().default(10).describe("The number of periods to retrieve")
|
|
407
413
|
}),
|
|
408
414
|
execute: async ({ symbol: symbol2, limit: limit2 }) => toToolResponse(await getFMPClient().financial.getEarningsHistorical({ symbol: symbol2, limit: limit2 }))
|
|
415
|
+
}),
|
|
416
|
+
defineTool({
|
|
417
|
+
name: "getFinancialScores",
|
|
418
|
+
description: "Get financial health scores for a company (Altman Z-Score bankruptcy risk + Piotroski fundamental-strength score)",
|
|
419
|
+
inputSchema: zod.z.object({ symbol: symbol("financial scores") }),
|
|
420
|
+
execute: async ({ symbol: symbol2 }) => toToolResponse(await getFMPClient().financial.getFinancialScores({ symbol: symbol2 }))
|
|
421
|
+
}),
|
|
422
|
+
defineTool({
|
|
423
|
+
name: "getKeyMetricsTTM",
|
|
424
|
+
description: "Get current trailing-twelve-month (TTM) key metrics for a company (one snapshot row)",
|
|
425
|
+
inputSchema: zod.z.object({ symbol: symbol("TTM key metrics") }),
|
|
426
|
+
execute: async ({ symbol: symbol2 }) => toToolResponse(await getFMPClient().financial.getKeyMetricsTTM({ symbol: symbol2 }))
|
|
427
|
+
}),
|
|
428
|
+
defineTool({
|
|
429
|
+
name: "getFinancialRatiosTTM",
|
|
430
|
+
description: "Get current trailing-twelve-month (TTM) financial ratios for a company (margins, returns, liquidity)",
|
|
431
|
+
inputSchema: zod.z.object({ symbol: symbol("TTM financial ratios") }),
|
|
432
|
+
execute: async ({ symbol: symbol2 }) => toToolResponse(await getFMPClient().financial.getFinancialRatiosTTM({ symbol: symbol2 }))
|
|
433
|
+
}),
|
|
434
|
+
defineTool({
|
|
435
|
+
name: "getRevenueProductSegmentation",
|
|
436
|
+
description: "Get revenue broken down by product line for a company",
|
|
437
|
+
inputSchema: zod.z.object({ symbol: symbol("product revenue segmentation"), period }),
|
|
438
|
+
execute: async ({ symbol: symbol2, period: period2 }) => toToolResponse(
|
|
439
|
+
await getFMPClient().financial.getRevenueProductSegmentation({ symbol: symbol2, period: period2 })
|
|
440
|
+
)
|
|
441
|
+
}),
|
|
442
|
+
defineTool({
|
|
443
|
+
name: "getRevenueGeographicSegmentation",
|
|
444
|
+
description: "Get revenue broken down by geographic region for a company",
|
|
445
|
+
inputSchema: zod.z.object({ symbol: symbol("geographic revenue segmentation"), period }),
|
|
446
|
+
execute: async ({ symbol: symbol2, period: period2 }) => toToolResponse(
|
|
447
|
+
await getFMPClient().financial.getRevenueGeographicSegmentation({ symbol: symbol2, period: period2 })
|
|
448
|
+
)
|
|
409
449
|
})
|
|
410
450
|
];
|
|
411
451
|
var dateRangeSchema = zod.z.object({
|
|
@@ -681,6 +721,14 @@ var analystDefinitions = [
|
|
|
681
721
|
}
|
|
682
722
|
return toToolResponse(res);
|
|
683
723
|
}
|
|
724
|
+
}),
|
|
725
|
+
defineTool({
|
|
726
|
+
name: "getGradesConsensus",
|
|
727
|
+
description: "Get the analyst rating consensus for a company (counts of strongBuy/buy/hold/sell/strongSell + overall consensus)",
|
|
728
|
+
inputSchema: zod.z.object({
|
|
729
|
+
symbol: zod.z.string().min(1).describe("The stock symbol (e.g., AAPL)")
|
|
730
|
+
}),
|
|
731
|
+
execute: async ({ symbol: symbol2 }) => toToolResponse(await getFMPClient().analyst.getGradesConsensus({ symbol: symbol2 }))
|
|
684
732
|
})
|
|
685
733
|
];
|
|
686
734
|
var symbolSchema2 = zod.z.object({
|
|
@@ -833,6 +881,7 @@ var getIntraday = byName.getIntraday;
|
|
|
833
881
|
var getCompanyProfile = byName.getCompanyProfile;
|
|
834
882
|
var getCompanySharesFloat = byName.getCompanySharesFloat;
|
|
835
883
|
var getCompanyExecutiveCompensation = byName.getCompanyExecutiveCompensation;
|
|
884
|
+
var getStockPeers = byName.getStockPeers;
|
|
836
885
|
var getEarningsCalendar = byName.getEarningsCalendar;
|
|
837
886
|
var getEconomicCalendar = byName.getEconomicCalendar;
|
|
838
887
|
var getTreasuryRates = byName.getTreasuryRates;
|
|
@@ -850,6 +899,11 @@ var getIncomeGrowth = byName.getIncomeGrowth;
|
|
|
850
899
|
var getBalanceSheetGrowth = byName.getBalanceSheetGrowth;
|
|
851
900
|
var getFinancialGrowth = byName.getFinancialGrowth;
|
|
852
901
|
var getEarningsHistorical = byName.getEarningsHistorical;
|
|
902
|
+
var getFinancialScores = byName.getFinancialScores;
|
|
903
|
+
var getKeyMetricsTTM = byName.getKeyMetricsTTM;
|
|
904
|
+
var getFinancialRatiosTTM = byName.getFinancialRatiosTTM;
|
|
905
|
+
var getRevenueProductSegmentation = byName.getRevenueProductSegmentation;
|
|
906
|
+
var getRevenueGeographicSegmentation = byName.getRevenueGeographicSegmentation;
|
|
853
907
|
var getInsiderTrading = byName.getInsiderTrading;
|
|
854
908
|
var getInstitutionalHolders = byName.getInstitutionalHolders;
|
|
855
909
|
var getMarketPerformance = byName.getMarketPerformance;
|
|
@@ -870,6 +924,7 @@ var searchSymbol = byName.searchSymbol;
|
|
|
870
924
|
var getAnalystEstimates = byName.getAnalystEstimates;
|
|
871
925
|
var getPriceTargetConsensus = byName.getPriceTargetConsensus;
|
|
872
926
|
var getStockGrades = byName.getStockGrades;
|
|
927
|
+
var getGradesConsensus = byName.getGradesConsensus;
|
|
873
928
|
var getDiscountedCashFlow = byName.getDiscountedCashFlow;
|
|
874
929
|
var getCompanyRating = byName.getCompanyRating;
|
|
875
930
|
var getTechnicalIndicator = byName.getTechnicalIndicator;
|
|
@@ -923,7 +978,10 @@ exports.getEconomicIndicators = getEconomicIndicators;
|
|
|
923
978
|
exports.getEnterpriseValue = getEnterpriseValue;
|
|
924
979
|
exports.getFinancialGrowth = getFinancialGrowth;
|
|
925
980
|
exports.getFinancialRatios = getFinancialRatios;
|
|
981
|
+
exports.getFinancialRatiosTTM = getFinancialRatiosTTM;
|
|
982
|
+
exports.getFinancialScores = getFinancialScores;
|
|
926
983
|
exports.getGainers = getGainers;
|
|
984
|
+
exports.getGradesConsensus = getGradesConsensus;
|
|
927
985
|
exports.getHistoricalPrice = getHistoricalPrice;
|
|
928
986
|
exports.getHouseTrading = getHouseTrading;
|
|
929
987
|
exports.getHouseTradingByName = getHouseTradingByName;
|
|
@@ -934,11 +992,14 @@ exports.getInsiderTrading = getInsiderTrading;
|
|
|
934
992
|
exports.getInstitutionalHolders = getInstitutionalHolders;
|
|
935
993
|
exports.getIntraday = getIntraday;
|
|
936
994
|
exports.getKeyMetrics = getKeyMetrics;
|
|
995
|
+
exports.getKeyMetricsTTM = getKeyMetricsTTM;
|
|
937
996
|
exports.getLosers = getLosers;
|
|
938
997
|
exports.getMarketCap = getMarketCap;
|
|
939
998
|
exports.getMarketPerformance = getMarketPerformance;
|
|
940
999
|
exports.getMostActive = getMostActive;
|
|
941
1000
|
exports.getPriceTargetConsensus = getPriceTargetConsensus;
|
|
1001
|
+
exports.getRevenueGeographicSegmentation = getRevenueGeographicSegmentation;
|
|
1002
|
+
exports.getRevenueProductSegmentation = getRevenueProductSegmentation;
|
|
942
1003
|
exports.getSectorPerformance = getSectorPerformance;
|
|
943
1004
|
exports.getSenateTrading = getSenateTrading;
|
|
944
1005
|
exports.getSenateTradingByName = getSenateTradingByName;
|
|
@@ -946,6 +1007,7 @@ exports.getSenateTradingRSSFeed = getSenateTradingRSSFeed;
|
|
|
946
1007
|
exports.getStockGrades = getStockGrades;
|
|
947
1008
|
exports.getStockNews = getStockNews;
|
|
948
1009
|
exports.getStockNewsBySymbol = getStockNewsBySymbol;
|
|
1010
|
+
exports.getStockPeers = getStockPeers;
|
|
949
1011
|
exports.getStockQuote = getStockQuote;
|
|
950
1012
|
exports.getStockSplits = getStockSplits;
|
|
951
1013
|
exports.getTechnicalIndicator = getTechnicalIndicator;
|