Tool Calling
Below, you can find all the tools that are available for tool calling.
For examples on how to call these tools via OpenAI, Anthropic, or Gemini, see the LLM-ready API examples.
Note: The tool definitions below cannot be called directly and are intended for documentation only. They are auto-generated from langchain BaseTools. To see the BaseTool behind a function definition, click on the source of the definition.
- get_latest(use_local_timezone: bool = True) LatestPeriods [source]
Get the latest annual reporting year, latest quarterly reporting quarter and year, and current date.
- Parameters:
use_local_timezone (bool) – Whether to use the local timezone of the user
- Return type:
LatestPeriods
- get_n_quarters_ago(n: int) YearAndQuarter [source]
Get the year and quarter corresponding to [n] quarters before the current quarter.
- Parameters:
n (int) – Number of quarters before the current quarter
- Return type:
YearAndQuarter
- get_isin_from_ticker(ticker_str: str) str [source]
Get the ISIN associated with a ticker.
- Parameters:
ticker_str (str) – The ticker
- Return type:
str
- get_cusip_from_ticker(ticker_str: str) str [source]
Get the CUSIP associated with a ticker.
- Parameters:
ticker_str (str) – The ticker
- Return type:
str
- get_info_from_identifier(identifier: str) str [source]
Get the information associated with an identifier. Info includes company name, status, type, simple industry, number of employees (if available), founding date, webpage, HQ address, HQ city, HQ zip code, HQ state, HQ country, and HQ country iso code.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
- Return type:
str
- get_earnings_call_datetimes_from_identifier(identifier: str) str [source]
Get earnings call datetimes associated with an identifier.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
- Return type:
str
- get_earnings(identifier: str) list[dict] [source]
Get all earnings for a given identifier. Returns a list of dictionaries, each with ‘name’ (str), ‘key_dev_id’ (int), and ‘datetime’ (str in ISO 8601 format with UTC timezone) attributes.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
- Return type:
list
- get_latest_earnings(identifier: str) dict [source]
Get the latest earnings for a given identifier. Returns a dictionary with ‘name’ (str), ‘key_dev_id’ (int), and ‘datetime’ (str in ISO 8601 format with UTC timezone) attributes.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
- Return type:
dict
- get_next_earnings(identifier: str) dict [source]
Get the next earnings for a given identifier. Returns a dictionary with ‘name’ (str), ‘key_dev_id’ (int), and ‘datetime’ (str in ISO 8601 format with UTC timezone) attributes.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
- Return type:
dict
- get_history_metadata_from_identifier(identifier: str) HistoryMetadata [source]
Get the history metadata associated with an identifier. History metadata includes currency, symbol, exchange name, instrument type, and first trade date.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
- Return type:
HistoryMetadata
- get_capitalization_from_identifier(identifier: str, capitalization: Capitalization, start_date: str | None = None, end_date: str | None = None) str [source]
Get the historical market cap, tev (Total Enterprise Value), or shares outstanding of an identifier between inclusive start_date and inclusive end date. When requesting the most recent values, leave start_date and end_date empty.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
capitalization (Capitalization) – The capitalization type
start_date (Union[date, NoneType]) – The start date for historical capitalization retrieval
end_date (Union[date, NoneType]) – The end date for historical capitalization retrieval
- Return type:
str
- get_financial_statement_from_identifier(identifier: str, statement: StatementType, period_type: PeriodType | None = None, start_year: int | None = None, end_year: int | None = None, start_quarter: Literal[1, 2, 3, 4] | None = None, end_quarter: Literal[1, 2, 3, 4] | None = None) str [source]
Get the financial statement associated with an identifier.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
statement (StatementType) – The type of financial statement
period_type (Union[PeriodType, NoneType]) – The period type
start_year (Union[int, NoneType]) – The starting year for the data range
end_year (Union[int, NoneType]) – The ending year for the data range
start_quarter (Union[Annotated[Literal[1, 2, 3, 4], BeforeValidator], NoneType]) – Starting quarter
end_quarter (Union[Annotated[Literal[1, 2, 3, 4], BeforeValidator], NoneType]) – Ending quarter
- Return type:
str
- get_financial_line_item_from_identifier(identifier: str, line_item: str, period_type: PeriodType | None = None, start_year: int | None = None, end_year: int | None = None, start_quarter: Literal[1, 2, 3, 4] | None = None, end_quarter: Literal[1, 2, 3, 4] | None = None) str [source]
Get the financial line item associated with an identifier.
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
line_item (Literal['revenue', 'regular_revenue', 'normal_revenue', 'finance_division_revenue', 'insurance_division_revenue', 'revenue_from_sale_of_assets', 'revenue_from_sale_of_investments', 'revenue_from_interest_and_investment_income', 'other_revenue', 'total_other_revenue', 'fees_and_other_income', 'total_revenue', 'cost_of_goods_sold', 'cogs', 'finance_division_operating_expense', 'operating_expense_finance_division', 'insurance_division_operating_expense', 'operating_expense_insurance_division', 'finance_division_interest_expense', 'interest_expense_finance_division', 'cost_of_revenue', 'cor', 'gross_profit', 'selling_general_and_admin_expense', 'sga', 'selling_general_and_admin', 'sg_and_a', 'selling_general_and_admin_cost', 'exploration_and_drilling_costs', 'exploration_and_drilling_expense', 'provision_for_bad_debts', 'provision_for_bad_debt', 'pre_opening_costs', 'pre_opening_expense', 'total_selling_general_and_admin_expense', 'total_selling_general_and_admin_cost', 'total_sga', 'total_selling_general_and_admin', 'research_and_development_expense', 'r_and_d_expense', 'r_and_d_cost', 'rnd_cost', 'research_and_development_cost', 'rnd_expense', 'depreciation_and_amortization', 'd_and_a', 'dna', 'amortization_of_goodwill_and_intangibles', 'impairment_of_oil_gas_and_mineral_properties', 'impairment_o_and_g', 'impairment_of_oil_and_gas', 'total_depreciation_and_amortization', 'total_d_and_a', 'total_dna', 'other_operating_expense', 'total_other_operating_expense', 'total_operating_expense', 'operating_expense', 'operating_income', 'interest_expense', 'interest_and_investment_income', 'net_interest_expense', 'income_from_affiliates', 'currency_exchange_gains', 'other_non_operating_income', 'total_other_non_operating_income', 'ebt_excluding_unusual_items', 'earnings_before_taxes_excluding_unusual_items', 'restructuring_charges', 'merger_charges', 'merger_and_restructuring_charges', 'impairment_of_goodwill', 'gain_from_sale_of_assets', 'gain_from_sale_of_investments', 'asset_writedown', 'in_process_research_and_development_expense', 'in_process_rnd_expense', 'in_process_rnd_cost', 'in_process_research_and_development_cost', 'in_process_r_and_d_cost', 'in_process_r_and_d_expense', 'insurance_settlements', 'legal_settlements', 'other_unusual_items', 'total_other_unusual_items', 'total_unusual_items', 'unusual_items', 'ebt_including_unusual_items', 'earnings_before_taxes_including_unusual_items', 'income_tax_expense', 'income_taxes', 'income_tax', 'earnings_from_continued_operations', 'continued_operations_earnings', 'earnings_from_discontinued_operations', 'discontinued_operations_earnings', 'extraordinary_item_and_accounting_change', 'net_income_to_company', 'minority_interest_in_earnings', 'net_income_to_minority_interest', 'net_income', 'premium_on_redemption_of_preferred_stock', 'preferred_stock_dividend', 'other_preferred_stock_adjustments', 'other_adjustments_to_net_income', 'preferred_dividends_and_other_adjustments', 'net_income_allocable_to_general_partner', 'net_income_to_common_shareholders_including_extra_items', 'net_income_to_common_shareholders_excluding_extra_items', 'cash_and_equivalents', 'cash_and_cash_equivalents', 'cash', 'short_term_investments', 'trading_asset_securities', 'total_cash_and_short_term_investments', 'cash_and_short_term_investments', 'accounts_receivable', 'short_term_accounts_receivable', 'current_accounts_receivable', 'other_receivables', 'short_term_other_receivables', 'current_other_receivables', 'notes_receivable', 'short_term_notes_receivable', 'current_notes_receivable', 'total_receivables', 'short_term_total_receivables', 'total_receivable', 'short_term_total_receivable', 'current_total_receivable', 'current_total_receivables', 'inventory', 'inventories', 'prepaid_expense', 'prepaid_expenses', 'finance_division_loans_and_leases_short_term', 'short_term_finance_division_loans_and_leases', 'finance_division_short_term_loans_and_leases', 'short_term_loans_and_leases_of_the_finance_division', 'finance_division_other_current_assets', 'other_current_assets_of_the_finance_division', 'other_short_term_assets_of_the_finance_division', 'finance_division_other_short_term_assets', 'loans_held_for_sale', 'deferred_tax_asset_current_portion', 'current_deferred_tax_asset', 'short_term_deferred_tax_asset', 'restricted_cash', 'other_current_assets', 'total_current_assets', 'current_assets', 'short_term_assets', 'total_short_term_assets', 'gross_property_plant_and_equipment', 'gross_ppe', 'gppe', 'accumulated_depreciation', 'net_property_plant_and_equipment', 'net_ppe', 'nppe', 'ppe', 'property_plant_and_equipment', 'long_term_investments', 'non_current_investments', 'goodwill', 'other_intangibles', 'finance_division_loans_and_leases_long_term', 'long_term_finance_division_loans_and_leases', 'long_term_loans_and_leases_of_the_finance_division', 'finance_division_long_term_loans_and_leases', 'finance_division_other_non_current_assets', 'other_non_current_assets_of_the_finance_division', 'other_long_term_assets_of_the_finance_division', 'finance_division_other_long_term_assets', 'long_term_accounts_receivable', 'non_current_accounts_receivable', 'long_term_loans_receivable', 'loans_receivable', 'non_current_loans_receivable', 'long_term_deferred_tax_assets', 'non_current_deferred_tax_assets', 'long_term_deferred_charges', 'non_current_deferred_charges', 'other_long_term_assets', 'long_term_other_assets', 'non_current_other_assets', 'other_non_current_assets', 'total_assets', 'assets', 'accounts_payable', 'accrued_expenses', 'short_term_borrowings', 'current_borrowings', 'short_term_borrowing', 'current_borrowing', 'current_portion_of_long_term_debt', 'current_portion_of_non_current_debt', 'current_portion_of_lt_debt', 'current_portion_of_capital_leases', 'current_portion_of_cap_leases', 'current_portion_of_capitalized_leases', 'current_portion_of_leases', 'current_portion_of_long_term_debt_and_capital_leases', 'current_portion_of_non_current_debt_and_capitalized_leases', 'total_current_portion_of_lt_debt_and_cap_leases', 'current_portion_of_lt_debt_and_cap_leases', 'total_current_portion_of_non_current_debt_and_capital_leases', 'current_portion_of_non_current_debt_and_capital_leases', 'total_current_portion_of_long_term_debt_and_capitalized_leases', 'total_current_portion_of_non_current_debt_and_capitalized_leases', 'current_portion_of_long_term_debt_and_capitalized_leases', 'total_current_portion_of_long_term_debt_and_capital_leases', 'finance_division_debt_current_portion', 'finance_division_other_current_liabilities', 'current_income_taxes_payable', 'current_portion_of_income_taxes_payable', 'current_unearned_revenue', 'current_portion_of_unearned_revenue', 'current_deferred_tax_liability', 'other_current_liability', 'other_current_liabilities', 'total_current_liabilities', 'current_liabilities', 'long_term_debt', 'non_current_debt', 'capital_leases', 'capitalized_leases', 'long_term_leases', 'finance_division_debt_non_current_portion', 'finance_division_debt_long_term_portion', 'finance_division_long_term_debt', 'finance_division_non_current_debt', 'finance_division_other_non_current_liabilities', 'finance_division_other_long_term_liabilities', 'non_current_unearned_revenue', 'long_term_unearned_revenue', 'pension_and_other_post_retirement_benefit', 'non_current_deferred_tax_liability', 'other_non_current_liabilities', 'non_current_other_liabilities', 'other_long_term_liabilities', 'long_term_other_liabilities', 'total_liabilities', 'liabilities', 'preferred_stock_redeemable', 'redeemable_preferred_stock', 'preferred_stock_non_redeemable', 'non_redeemable_preferred_stock', 'preferred_stock_convertible', 'convertible_preferred_stock', 'preferred_stock_other', 'other_preferred_stock', 'preferred_stock_additional_paid_in_capital', 'additional_paid_in_capital_preferred_stock', 'preferred_stock_equity_adjustment', 'equity_adjustment_preferred_stock', 'treasury_stock_preferred_stock_convertible', 'treasury_preferred_stock_convertible', 'treasury_stock_convertible_preferred_stock', 'treasury_convertible_preferred_stock', 'treasury_stock_preferred_stock_non_redeemable', 'treasury_non_redeemable_preferred_stock', 'treasury_preferred_stock_non_redeemable', 'treasury_stock_non_redeemable_preferred_stock', 'treasury_stock_preferred_stock_redeemable', 'treasury_preferred_stock_redeemable', 'treasury_stock_redeemable_preferred_stock', 'treasury_redeemable_preferred_stock', 'total_preferred_equity', 'total_preferred_stock', 'preferred_stock', 'preferred_equity', 'common_stock', 'additional_paid_in_capital', 'retained_earnings', 'treasury_stock', 'other_equity', 'total_common_equity', 'common_equity', 'total_equity', 'total_shareholders_equity', 'equity', 'shareholders_equity', 'total_liabilities_and_equity', 'liabilities_and_equity', 'common_shares_outstanding', 'adjustments_to_cash_flow_net_income', 'other_amortization', 'total_other_non_cash_items', 'net_decrease_in_loans_originated_and_sold', 'provision_for_credit_losses', 'loss_on_equity_investments', 'stock_based_compensation', 'tax_benefit_from_stock_options', 'net_cash_from_discontinued_operation', 'cash_from_discontinued_operation', 'other_operating_activities', 'change_in_trading_asset_securities', 'change_in_accounts_receivable', 'change_in_inventories', 'change_in_accounts_payable', 'change_in_unearned_revenue', 'change_in_income_taxes', 'change_in_deferred_taxes', 'change_in_other_net_operating_assets', 'change_in_net_operating_assets', 'cash_from_operations', 'cash_flow_from_operations', 'cash_from_operating_activities', 'capital_expenditure', 'capex', 'capital_expenditures', 'sale_of_property_plant_and_equipment', 'sale_of_ppe', 'cash_acquisitions', 'divestitures', 'sale_of_real_estate', 'sale_of_real_properties', 'sale_of_real_estate_properties', 'sale_of_intangible_assets', 'sale_of_intangibles', 'sale_of_intangible_asset', 'net_cash_from_investments', 'net_decrease_in_investment_loans_originated_and_sold', 'other_investing_activities', 'total_other_investing_activities', 'cash_from_investing', 'cashflow_from_investing_activities', 'cashflow_from_investing', 'cash_from_investing_activities', 'short_term_debt_issued', 'current_debt_issued', 'long_term_debt_issued', 'non_current_debt_issued', 'total_debt_issued', 'short_term_debt_repaid', 'current_debt_repaid', 'long_term_debt_repaid', 'non_current_debt_repaid', 'total_debt_repaid', 'issuance_of_common_stock', 'repurchase_of_common_stock', 'issuance_of_preferred_stock', 'repurchase_of_preferred_stock', 'common_dividends_paid', 'preferred_dividends_paid', 'total_dividends_paid', 'dividends_paid', 'special_dividends_paid', 'other_financing_activities', 'cash_from_financing', 'cashflow_from_financing_activities', 'cash_from_financing_activities', 'cashflow_from_financing', 'foreign_exchange_rate_adjustments', 'foreign_exchange_adjustments', 'fx_adjustments', 'miscellaneous_cash_flow_adjustments', 'misc_cash_flow_adj', 'net_change_in_cash', 'change_in_cash', 'depreciation', 'depreciation_of_rental_assets', 'sale_proceeds_from_rental_assets', 'basic_eps', 'basic_eps_including_extra_items', 'basic_earning_per_share', 'basic_earning_per_share_including_extra_items', 'basic_eps_excluding_extra_items', 'basic_earning_per_share_excluding_extra_items', 'basic_eps_from_accounting_change', 'basic_earning_per_share_from_accounting_change', 'basic_eps_from_extraordinary_items', 'basic_earning_per_share_from_extraordinary_items', 'basic_eps_from_accounting_change_and_extraordinary_items', 'basic_earning_per_share_from_accounting_change_and_extraordinary_items', 'weighted_average_basic_shares_outstanding', 'diluted_eps', 'diluted_earning_per_share_including_extra_items', 'diluted_earning_per_share', 'diluted_eps_including_extra_items', 'diluted_eps_excluding_extra_items', 'diluted_earning_per_share_excluding_extra_items', 'weighted_average_diluted_shares_outstanding', 'normalized_basic_eps', 'normalized_basic_earning_per_share', 'normalized_diluted_eps', 'normalized_diluted_earning_per_share', 'dividends_per_share', 'distributable_cash_per_share', 'diluted_eps_from_accounting_change_and_extraordinary_items', 'diluted_earning_per_share_from_accounting_change_and_extraordinary_items', 'diluted_eps_from_accounting_change', 'diluted_earning_per_share_from_accounting_change', 'diluted_eps_from_extraordinary_items', 'diluted_earning_per_share_from_extraordinary_items', 'diluted_eps_from_discontinued_operations', 'diluted_earning_per_share_from_discontinued_operations', 'funds_from_operations', 'ffo', 'ebitda', 'earnings_before_interest_taxes_depreciation_and_amortization', 'ebita', 'earnings_before_interest_taxes_and_amortization', 'ebit', 'earnings_before_interest_and_taxes', 'ebitdar', 'earnings_before_interest_taxes_depreciation_amortization_and_rental_expense', 'net_debt', 'effective_tax_rate', 'tax_rate', 'current_ratio', 'quick_ratio', 'total_debt_to_capital', 'net_working_capital', 'working_capital', 'change_in_net_working_capital', 'total_debt', 'total_debt_to_equity_ratio', 'debt_ratio', 'total_debt_ratio', 'total_debt_to_equity', 'total_debt_to_total_equity']) – The type of financial line_item requested
period_type (Union[PeriodType, NoneType]) – The period type
start_year (Union[int, NoneType]) – The starting year for the data range
end_year (Union[int, NoneType]) – The ending year for the data range
start_quarter (Union[Annotated[Literal[1, 2, 3, 4], BeforeValidator], NoneType]) – Starting quarter
end_quarter (Union[Annotated[Literal[1, 2, 3, 4], BeforeValidator], NoneType]) – Ending quarter
- Return type:
str
- get_business_relationship_from_identifier(identifier: str, business_relationship: BusinessRelationshipType) dict [source]
Get the current and previous company IDs that are relationship_type of a given identifier. For example, “What are the current distributors of SPGI?” or “What are the previous borrowers of JPM?”
- Parameters:
identifier (str) – The identifier, which can be a ticker symbol, ISIN, or CUSIP
business_relationship (BusinessRelationshipType) – The type of business relationship
- Return type:
dict