Skip to Content

MCP tools

Every tool of the spectre-terminal-mcp server: what it does, what it takes and whether it changes anything.

All tools

ToolAccessWhat it does
account_overviewread-onlyBalances, open positions with PnL and how many orders are open, for one connection.
leverageread-onlyLeverage, its maximum, the terminal's leverage mode and the margin mode of an instrument.
open_ordersread-onlyOpen orders and trigger orders of a connection, with the key and exchange id of each.
recent_fillsread-onlyThe latest fills of a connection, oldest first, with buy and sell volume totals.
find_instrumentread-onlyFind the exact instrument address for a coin or symbol.
market_snapshotread-onlyLast price, best bid and ask with the spread, mark price and 24h change and volume.
order_book_topread-onlyThe top levels of the order book with volume per side and the imbalance.
recent_trades_summaryread-onlyBuy and sell volume, delta, VWAP, price range and the largest print of recent trades.
cluster_summaryread-onlyVolume clusters per bucket.
candlesread-onlyOHLCV bars for an interval, newest limit bars, oldest first.
settingsread-onlySettings rows as stored, with whether each is writable through update_settings.
orderbook_settingsread-onlyThe stack settings of one instrument as its stack on the connection sees them.
update_settingschanges stateWrite settings the way the terminal's settings window does.
terminal_statusread-onlyCheck that Spectre Terminal is running and list its exchange connections.
place_orderchanges statePlace a limit or market order on a connection.
cancel_orderchanges stateCancel one order by the terminal's key or the exchange's id.
cancel_all_orderschanges stateCancel every open order of the instrument on this connection.
close_positionchanges stateClose the instrument's position the way the terminal window does.
place_triggerchanges statePlace a stop loss, take profit or stop the way the window does.
cancel_triggerchanges stateCancel one trigger order by its numeric id from open_orders.
cancel_all_triggerschanges stateCancel every trigger order of the instrument; plain orders stay.
amend_triggerchanges stateMove a trigger to a new price (cancel, then place).
set_leveragechanges stateSet the leverage of a futures instrument the way the window does.
set_margin_modechanges stateSet the margin mode of a futures instrument.
workspaceread-onlyEvery window of the terminal with its tabs, stacks (order books) and charts.
open_stackchanges stateOpen a stack of the instrument in a new tab or a new window, optionally with a chart.
open_tabchanges stateOpen one tab with several instruments.
add_stackschanges stateAdd instruments to an existing tab.
open_multiviewchanges stateOpen a coin on every venue of «Exchange layout», as the Multiview button does.
set_stack_instrumentchanges stateSwitch a stack (and the charts that follow it) to another instrument.
close_stackchanges stateClose one stack, as its close button does.
close_tabchanges stateClose a tab of a window.
activate_tabchanges stateSelect a tab in its window; the window's focus is untouched (see activate_window).
close_windowchanges stateClose a window.
activate_windowchanges stateRestore a window if it is minimised and bring it to the front.

Account

account_overview

read-only

Balances, open positions with PnL and how many orders are open, for one connection.

The cheapest way to answer "what is this account holding". Balances and fills are what the terminal has accumulated since its API was switched on; positions and orders are live state.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)

leverage

read-only

Leverage, its maximum, the terminal's leverage mode and the margin mode of an instrument.

Read from the terminal's cache: an instrument the terminal has not touched yet answers not_active — open it in the terminal or set the leverage with set_leverage.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrFutures instrument address exchange:market:symbol

open_orders

read-only

Open orders and trigger orders of a connection, with the key and exchange id of each.

Use the key (t-…) to cancel an order placed through the API, and to recognise it after place_order.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentoptionalstr | NoneOnly this instrument (exchange:market:symbol); all when omitted

recent_fills

read-only

The latest fills of a connection, oldest first, with buy and sell volume totals.

Fills are kept by the terminal since its API was switched on (the last 1000 per connection); older history is not available here.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
limitoptionalintNewest fills to return Default: 20.
since_tsoptionalint | NoneOnly fills at or after this UTC millisecond timestamp

Instruments

find_instrument

read-only

Find the exact instrument address for a coin or symbol.

Searches the catalogue of the terminal's connections — one connection, one exchange, or all of them — and returns matches best first: an exact symbol or base coin, then the same base behind a numeric prefix (1000PEPE), then prefixes. Use the instrument field of a match in every other tool.

ParameterTypeDescription
queryrequiredstrCoin or symbol fragment, case-insensitive: BTC, ETHUSDT, SOL-USDT
exchangeoptionalstr | NoneExchange in lower case: binance, bybit, okx, …; all when omitted
marketoptionalstr | Nonespot or futures; both when omitted
connection_idoptionalint | NoneSearch one connection only (from terminal_status)
limitoptionalintMatches to return Default: 10.

Market data

market_snapshot

read-only

Last price, best bid and ask with the spread, mark price and 24h change and volume.

The cheapest way to answer "where is X trading right now". Fields the terminal has not received yet are null; for an instrument that is not open in the terminal the tool waits briefly once to fill them.

ParameterTypeDescription
instrumentrequiredstrInstrument address exchange:market:symbol
connection_idoptionalint | NoneConnection id from terminal_status; it must trade (keys, enabled)

order_book_top

read-only

The top levels of the order book with volume per side and the imbalance.

imbalance is (bid volume - ask volume) / (bid volume + ask volume) over the returned levels: +1 is all bids, -1 is all asks. Levels are [price, size] pairs, bids from the best price down, asks from the best price up.

ParameterTypeDescription
instrumentrequiredstrInstrument address exchange:market:symbol
depthoptionalintLevels per side Default: 10.
connection_idoptionalint | NoneConnection id from terminal_status; it must trade (keys, enabled)

recent_trades_summary

read-only

Buy and sell volume, delta, VWAP, price range and the largest print of recent trades.

Summarises the latest limit trades the terminal has for the instrument (it keeps the last 1000). The trades themselves are not returned; span_ms says how much time the batch covers.

ParameterTypeDescription
instrumentrequiredstrInstrument address exchange:market:symbol
limitoptionalintHow many of the latest trades to summarise Default: 200.
connection_idoptionalint | NoneConnection id from terminal_status; it must trade (keys, enabled)

cluster_summary

read-only

Volume clusters per bucket: volume by side, delta, VWAP, range, busiest price levels.

Buckets are at the interval the trader selected in the terminal for this instrument (5m by default); the newest bucket is usually still open (completed false). An instrument the terminal was not computing yet is started on request and seeded with history; the tool waits once for the seed.

ParameterTypeDescription
instrumentrequiredstrInstrument address exchange:market:symbol
bucketsoptionalintNewest buckets to return Default: 3.
top_levelsoptionalintPrice levels per bucket, by volume Default: 5.
connection_idoptionalint | NoneConnection id from terminal_status; it must trade (keys, enabled)

candles

read-only

OHLCV bars for an interval, newest limit bars, oldest first.

Rows are compact arrays under columns. ts is the bar open; closed false marks the bar still forming. Page backwards by passing the first row's ts as end.

ParameterTypeDescription
instrumentrequiredstrInstrument address exchange:market:symbol
intervaloptionalstrBar interval: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1M Default: '1m'.
limitoptionalintNewest bars to return Default: 50.
endoptionalint | NoneRight boundary as UTC milliseconds; now when omitted
connection_idoptionalint | NoneConnection id from terminal_status; it must trade (keys, enabled)

Settings

settings

read-only

Settings rows as stored, with whether each is writable through update_settings.

Without arguments: the terminal-wide rows (multiview, chart, sounds, hotkeys, …). The settings of one stack, resolved the way the stack sees them, are orderbook_settings.

ParameterTypeDescription
scopeoptionalstr | Noneglobal (default) or order_book
categoryoptionalstr | NoneCategory filter
keyoptionalstr | NoneKey filter
connection_idoptionalint | NoneThe connection's rows; else app-wide
instrumentoptionalstr | NoneThe pair's rows (scope order_book)

orderbook_settings

read-only

The stack settings of one instrument as its stack on the connection sees them.

Every key names the level it was resolved from: the pair's own row, the connection's default, the pair's row without a connection, or the global default.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status
instrumentrequiredstrInstrument address exchange:market:symbol

update_settings

changes state

Write settings the way the terminal's settings window does.

A change with instrument writes the pair's row; scope order_book with connection_id the connection's default; neither the global default. Every change is checked first — unknown key, wrong type, out of range, wrong shape — and refused by index with nothing written; leverage is refused (use set_leverage). The first failed change stops the list; earlier ones stay applied.

ParameterTypeDescription
changesrequiredlist[dict[str, Any]]Changes in order; each has category, key, value and optionally scope (global or order_book), instrument and connection_id

Status

terminal_status

read-only

Check that Spectre Terminal is running and list its exchange connections.

Returns the terminal version, API health, the stream topics it serves, the limits that matter for an agent, and every connection with its id, exchange, market and state. Call this first when a session starts or when another tool reports the terminal unreachable.

Trading

place_order

changes state

Place a limit or market order on a connection. Answers "accepted", not "filled".

Give exactly one of size (base coin) or notional (quote amount). Prices and amounts are decimal strings; the terminal checks the venue's minimums and steps before sending and refuses with the reason. Watch open_orders for the returned key.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol
siderequiredstrbuy or sell
order_typerequiredstrlimit (needs price) or market (no price)
client_keyrequiredstrYour idempotency key for this intent, e.g. 'rebalance-2026-11-03-1'. A retry with the same key returns the previous answer and places nothing.
priceoptionalstr | NoneLimit price as a decimal string
sizeoptionalstr | NoneAmount in the base coin as a decimal string
notionaloptionalstr | NoneAmount in the quote currency as a decimal string
reduce_onlyoptionalboolOnly reduce an existing position Default: False.
post_onlyoptionalboolReject instead of taking liquidity Default: False.
time_in_forceoptionalstr | Nonegtc, ioc, fok or post_only; the venue's default when omitted

cancel_order

changes state

Cancel one order by the terminal's key or the exchange's id. Answers "accepted".

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol
order_idrequiredstrThe terminal key (t-…) from open_orders or the exchange's order id

cancel_all_orders

changes state

Cancel every open order of the instrument on this connection. Answers "accepted".

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol

close_position

changes state

Close the instrument's position the way the terminal window does. Answers "accepted".

Futures: a market order for the whole position. Spot: cancel all and sell as one atomic command. Refused when there is no open position.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol

place_trigger

changes state

Place a stop loss, take profit or stop the way the window does. Answers "accepted".

The returned key (sl_…, tp_…, stop_…) shows up as client_id of the trigger in open_orders; cancel or move it by the numeric id from there. Refused without an open position for stop_loss/take_profit, and with unsupported on a venue without trigger orders in the terminal.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol
kindrequiredstrstop_loss or take_profit (placed on the open position: its side, size and rule come from the position) or stop (your own side and notional)
trigger_pricerequiredstrTrigger price as a decimal string
client_keyrequiredstrYour idempotency key for this intent. A retry with the same key returns the previous answer and places nothing.
sideoptionalstr | Nonestop only: buy or sell
notionaloptionalstr | Nonestop only: amount in the quote currency, decimal string
ruleoptionalstr | Nonestop only: price_above_or_equal or price_below_or_equal; omitted means above the market for a buy, below for a sell

cancel_trigger

changes state

Cancel one trigger order by its numeric id from open_orders. Answers "accepted".

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol
trigger_idrequiredstrThe numeric id of the trigger from open_orders

cancel_all_triggers

changes state

Cancel every trigger order of the instrument; plain orders stay. Answers "accepted".

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol

amend_trigger

changes state

Move a trigger to a new price (cancel, then place). Answers "accepted".

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol
trigger_idrequiredstrThe numeric id of the trigger from open_orders
kindrequiredstrstop_loss, take_profit or stop — the trigger's type
trigger_pricerequiredstrNew trigger price as a decimal string
sideoptionalstr | Nonestop only: buy or sell
ruleoptionalstr | Nonestop only: price_above_or_equal or price_below_or_equal

set_leverage

changes state

Set the leverage of a futures instrument the way the window does. Answers "accepted".

Exactly one of leverage and mode. Read the applied value with leverage after the exchange answered.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol
leverageoptionalint | NoneLeverage as an integer of at least 1; or give mode
modeoptionalstr | Nonemax or smart (the terminal's modes); or give leverage

set_margin_mode

changes state

Set the margin mode of a futures instrument. Answers "accepted".

The exchange refuses the change while a position is open, as in the window; the accepted answer does not know that yet.

ParameterTypeDescription
connection_idrequiredintConnection id from terminal_status; it must trade (keys, enabled)
instrumentrequiredstrInstrument address exchange:market:symbol
margin_moderequiredstrcross or isolated

Workspace

workspace

read-only

Every window of the terminal with its tabs, stacks (order books) and charts.

The main window cannot be closed; tabs are numbered per window; stack and chart widget ids are global. Read this before any workspace command: the ids change with every run of the terminal.

open_stack

changes state

Open a stack of the instrument in a new tab or a new window, optionally with a chart.

Answers the window, the new tab and the new widget ids. An instrument the terminal's catalogue does not know is invalid_request.

ParameterTypeDescription
instrumentrequiredstrInstrument address exchange:market:symbol
connection_idoptionalint | NoneConnection; the general rule picks one
chartoptionalboolOpen a chart over the stack Default: False.
targetoptionalstrnew_tab (in window_id, or the focused window) or new_window Default: 'new_tab'.
window_idoptionalint | NoneWindow for the new tab
activateoptionalboolFalse opens the tab in the background; a new window always takes focus Default: True.

open_tab

changes state

Open one tab with several instruments: a column per item, in a new tab or window.

Each item is a stack and, with chart, a chart over it. One to fifty items. Answers the window, the new tab and the new widget ids in column order. A refusal names the item (items[1]: …) and nothing is opened.

ParameterTypeDescription
itemsrequiredlist[dict[str, Any]]Columns in order; each has instrument (exchange:market:symbol) and optionally connection_id and chart (true opens a chart over the stack)
nameoptionalstr | NoneTab name, up to 64 characters; None names it after the instruments
targetoptionalstrnew_tab (in window_id, or the focused window) or new_window Default: 'new_tab'.
window_idoptionalint | NoneWindow for the new tab
activateoptionalboolFalse opens the tab in the background; a new window always takes focus Default: True.

add_stacks

changes state

Add instruments to an existing tab: a column per item after the tab's last column.

The tab keeps its name and its column widths. Answers only the added stack and chart widget ids. No such window or tab is not_found.

ParameterTypeDescription
window_idrequiredintWindow id from the workspace tool
tab_idrequiredintTab id from the workspace tool; tabs are numbered per window
itemsrequiredlist[dict[str, Any]]Columns in order; each has instrument (exchange:market:symbol) and optionally connection_id and chart (true opens a chart over the stack)

open_multiview

changes state

Open a coin on every venue of «Exchange layout», as the Multiview button does.

not_found when no enabled row of the layout lists the coin.

ParameterTypeDescription
baserequiredstrCoin (BTC) or pair (BTC/USDT)
targetoptionalstr | Nonenew_tab or new_window; None follows the terminal setting
window_idoptionalint | NoneWindow for the new tab
activateoptionalboolFalse opens the tab in the background; a new window always takes focus Default: True.

set_stack_instrument

changes state

Switch a stack (and the charts that follow it) to another instrument.

ParameterTypeDescription
widget_idrequiredintStack widget_id from the workspace tool
instrumentrequiredstrInstrument address exchange:market:symbol
connection_idoptionalint | NoneConnection; the general rule picks one

close_stack

changes state

Close one stack, as its close button does. A chart widget id is invalid_request.

ParameterTypeDescription
widget_idrequiredintStack widget_id from the workspace tool

close_tab

changes state

Close a tab of a window. The only tab of a window cannot be closed.

ParameterTypeDescription
window_idrequiredintWindow id from the workspace tool
tab_idrequiredintTab id from the workspace tool; tabs are numbered per window

activate_tab

changes state

Select a tab in its window; the window's focus is untouched (see activate_window).

ParameterTypeDescription
window_idrequiredintWindow id from the workspace tool
tab_idrequiredintTab id from the workspace tool; tabs are numbered per window

close_window

changes state

Close a window. The main window is refused: closing it would quit the terminal.

ParameterTypeDescription
window_idrequiredintWindow id from the workspace tool

activate_window

changes state

Restore a window if it is minimised and bring it to the front.

ParameterTypeDescription
window_idrequiredintWindow id from the workspace tool

Generated from the code of spectre-terminal-mcp at commit 2d1c324.

On this page