Skip to the content

Help / AI

MCP tool reference

Every tool an AI app gets when it’s connected to OpenTapefolio’s MCP server (see Connect Claude or ChatGPT). You don’t call these yourself: ask your AI app in plain words and it picks the tools. The names help when you want to know what it can do, or to read what it did.

Note:An app connected with Look only (or a read-only key) is never offered the tools that change things, and the server refuses them anyway. Apps are asked to check with you before using one.

Market data and analysis#

Symbols can be given as BTC/USDT, BTCUSDT or binance:BTCUSDT; when a name trades on several venues, the tool asks which. Times are UTC.

ToolWhat it doesAccess
list_symbolsThe symbols there’s data for, optionally filtered (“BTC”); a search also finds your own stocks and forexLook only
get_quoteA symbol’s latest price, 24-hour change, high, low and volumeLook only
get_barsCandles (time, open, high, low, close, volume), oldest first, up to 500, at any timeframe: the latest, a date range, or around a momentLook only
list_indicatorsThe built-in indicators get_indicator can work out, with their inputsLook only
get_indicatorAn indicator’s recent values on a symbol and timeframe (RSI, MACD, Bollinger Bands…), with your own inputsLook only
get_technical_ratingThe buy/sell summary of 15 moving averages and 11 oscillators, with each readingLook only
run_screenerSymbols filtered by 24-hour change and volume, and optionally RSI and trend on a timeframe, as the app’s screener works them out; it says how many it scanned and which it couldn’t readLook only
get_chart_snapshotA chart in words and numbers: price, change, range, rating, the patterns, divergences and trend lines the app finds, and your drawings on itLook only
get_newsRecent news headlines and summaries for a symbolLook only
get_fundamentalsA US stock’s figures from its SEC filings: revenue, earnings, margins, valuationLook only
get_economic_calendarThe economic calendar: releases such as CPI, jobs and rates, with their figuresLook only
get_corporate_eventsA stock’s earnings dates, dividends and splitsLook only
get_order_flowThe order book now, a perpetual’s funding and open interest, recent liquidations, or large tradesLook only
ask_chartAsks the app’s own chart assistant about a chart (spends your daily assistant tokens); a long answer comes back as an id for get_answerLook only
get_answerAn answer ask_chart was still working on, once it’s ready (kept ten minutes)Look only
parse_alertReads a sentence as an alert, checked but not created, for you to confirmLook only
parse_screenReads a sentence as the screener’s settingsLook only
list_strategiesThe built-in strategies run_backtest tests, with their inputsLook only
run_backtestBacktests a built-in strategy on a symbol, with your inputs (checked: a misspelt or out-of-range one is refused, not ignored)Look only
backtest_scriptBacktests a strategy script it wrote on the symbol’s stored history, in the server’s sandbox (counts against your deep backtests)Look only
get_backtestA deep backtest’s results, once it’s done (backtest_script answers with its id after 40 seconds)Look only
Note:AI apps see the shared symbols (crypto, and forex history from Dukascopy) and your own: US stocks and ETFs from your Alpaca keys and live forex from your OANDA account, as AAPL, EUR/USD or oanda:EUR_USD. They’re read with your keys and only for apps you connected. list_symbols finds yours when given a search (“AAPL”), marked as your own; they can’t be listed all at once.

Your watchlists, alerts, account and scripts#

ToolWhat it doesAccess
list_watchlistsYour watchlists, with each symbol’s last price and 24-hour changeLook only
list_alertsYour alerts and whether each is activeLook only
get_alert_historyThe alerts that fired lately: when, at what price, and their messageLook only
get_paper_accountYour paper account: balance, open positions and open ordersLook only
list_scriptsYour scripts in the Script editor, by nameLook only
get_scriptOne of your scripts, with its sourceLook only
get_script_referenceHow to write a script: the rules, the full API and examples (an app reads this before save_script)Look only

Tools that change things#

ToolWhat it doesAccess
create_price_alertAn alert for when price crosses a fixed level (either way, up or down), with a message. It fires with the app closedLook and change things
create_alertAn alert between the price, a level and built-in indicators: price crossing its 50-day average, RSI under 30Look and change things
pause_alertPauses one of your alerts, or resumes itLook and change things
delete_alertDeletes one of your alertsLook and change things
place_paper_orderA paper (simulated) market, limit or stop order, with an optional take profit and stop loss. No real moneyLook and change things
cancel_paper_orderCancels an open paper orderLook and change things
get_usageWhat this API key may do and how much of its plan is usedLook and change things
modify_paper_orderMoves an open paper order to a new priceLook and change things
close_paper_positionCloses a paper position at marketLook and change things
add_to_watchlistAdds symbols to one of your watchlists. It only adds: nothing on the list is removed or movedLook and change things
add_drawingDraws a horizontal or vertical line, a trend line or ray, a zone or a text note on your chart of a symbol. It only adds: your own drawings are never changedLook and change things
save_scriptSaves a new indicator or strategy to your Script editor (checked to parse, not run). It appears when the app next loadsLook and change things

Each counts against your plan’s changes by AI apps and API keys an hour (see limits), and each is listed on the Account page under What AI apps and API keys changed.

Strategy Lab#

The first three read your own portfolios. The rest read ai-algo’s strategies, which only accounts given ai-algo access can see (the admin’s, unless the server opens them to everyone); for other accounts they return nothing.

ToolWhat it doesAccess
lab_list_portfoliosYour Strategy Lab portfolios: name, swing or day trades, strategies, startLook only
lab_portfolio_performanceHow a portfolio is doing: value, time-weighted return, drawdown, model against actual, money in and out, fees, each strategy’s P&LLook only
lab_combined_performancePortfolios side by side and together, with returns, drawdown, trades and feesLook only
lab_list_strategiesai-algo’s strategies: each algo and its strategies, when they went live, trade countsLook only
lab_get_strategyOne strategy’s settings, latest signals, recent trades and win ratesLook only
lab_open_positionsOpen positions: side, entry, latest close, open return, distance to stopLook only
lab_run_portfolioRuns a portfolio of strategies with equal weights and rebalancing, against buy and hold and an ETFLook only
lab_compareEvery swing or day-trade strategy over one window, the best and worst against buy and hold, with how far to trust eachLook only
lab_suggest_portfolioSuggests a portfolio: the best Sharpe first, then each next best that doesn’t move with those already pickedLook only

ai-algo’s signals#

These read ai-algo’s signals API, which takes a key of its own: an ai-algo signals key from the Account page, offered to accounts with ai-algo. Connected with that key, an AI app gets these two tools and nothing else; with any other key it doesn’t get them.

ToolWhat it doesAccess
ai_algo_todayai-algo’s day as its emails tell it: each folder’s runs, what opens, what closes at the close, what closed and why, what’s near its stopLook only
ai_algo_signalsThe pre-open swing signals that act (or all of them), and the day trades with how they wentLook only

Text people typed is data#

Tools whose results include text someone typed (watchlist, script and portfolio names, a script’s source, investors’ names, drawings’ text, news, alert messages) mark it as data, never instructions, so a sentence hidden in a script’s comments can’t steer the app. In the Strategy Lab, investors appear as “Investor 1”, “Investor 2” to AI apps; their names stay on the site.

TradingView and Pine Script are trademarks of TradingView, Inc. OpenTapefolio is not affiliated with or endorsed by TradingView.