OneTick Data Tools#

These bundled tools run live OneTick queries to return reference data as tables. Each is a custom tool shipped with the server, enabled by its own name (or all-on by default). They require OneTick access to be configured — see OneTick WebAPI authentication.

See OneTick data tools for sample questions these tools answer.

Tools#

Tool

Parameters

When to use

search_symbol_universe

start_date, end_date, filters, limit (see below)

Look up instruments and their attributes (market, currency, security type, identifiers such as ISIN/MIC). Use when resolving a company or symbol to its full listing details across venues, or to identify which datasets or venues provide data for a filter.

list_continuous_contracts

db_name (required); product_code (optional — empty returns all)

List the continuous (rolling) futures contract series for a database, optionally for one product; returns each contract name and its roll methodology.

list_products

db_name (required); description_query (optional — matches product code / Bloomberg symbol / name)

List the products (roots, e.g. CL, ES) for a database, or find a product by description; returns product code, Bloomberg symbol, name and contract counts by security type.

db_load_availability

db_name (required)

Report when a database’s data was most recently loaded (data freshness / availability). Historic data is typically loaded once a day.

futures_trading_hours

tdi_product_code and/or bsym_product_code (Bloomberg preferred)

List the regular trading-hours sessions (open/close times) for a futures product.

futures_holiday_calendar

tdi_product_code and/or bsym_product_code (Bloomberg preferred); last_n (default 50)

List recent market holidays / closures for a futures product.

search_symbol_universe#

Looks up instruments from OneTick’s symbol universe. It takes finer parameters than the other data tools:

Parameter

Description

start_date

YYYY-MM-DD start date. Defaults to the previous trading day.

end_date

YYYY-MM-DD end date. Defaults to start_date + 1 day.

filters

Map of {filter_name: value} to narrow results (e.g. sec_type, db_symbol, db_name, currency, mic, isin). The supported names are listed in the tool description the model reads; unknown names are ignored.

limit

Maximum number of rows the query fetches (default 100). The returned rows are then truncated to QUERY_TOOL_MAX_RESULTS (default 100) before they are sent to the client (see Result size below); narrow broad requests with filters rather than requesting very large result sets.

Note

The queried date span is bounded by MAX_QUERY_SPAN_DAYS (default 1 day): the query is a daily snapshot, so wide, inverted, or empty start_date / end_date ranges are clamped.

To run a different symbology query, add your own custom tool (with its own name) and disable this one by leaving search_symbol_universe out of ONETICK_DB_TOOLS. There is no setting that points this tool at a different query file. See “Replacing a bundled tool” in Custom Tools for the steps and a complete example.

Identifying a futures product#

futures_trading_hours and futures_holiday_calendar identify a product by its Bloomberg code (preferred) or its TDI code. The Bloomberg code is a standard Bloomberg security identifier of the form <ticker> <yellow key> — for example CL Comdty, SPX Index, EUR Curncy. The yellow key is one of Bloomberg’s ten market-sector classifiers: Comdty, Index, Curncy, Equity, Govt, Corp, Mtge, Muni, Pfd, M-Mkt.

The code is case-insensitive and accepts either a space or an underscore as the separator: CL Comdty, cl comdty and CL_Comdty are all accepted. It is normalized internally to the casing OneTick stores (ticker upper-cased, yellow key in its canonical spelling), so callers never need to match the exact case.

Authentication and timeout#

These tools authenticate against OneTick using ONETICK_DB_OUTBOUND_STRATEGY (see OneTick WebAPI authentication) and are each bounded by OTP_QUERY_TIMEOUT (default 120 seconds).

On a long-running deployment, see Deployment for a known failure mode where search_symbol_universe starts failing with a stale-.otq-path FileNotFoundError after the process has been up for a while.

Result size#

To keep a broad result within the MCP client’s tool-result size limit, a query tool’s result is truncated to QUERY_TOOL_MAX_RESULTS rows (default 100). When more rows match than are shown, the result reports the total count and asks the model to narrow the request with the tool’s parameters rather than request more rows. To see specific rows, narrow with the tool’s filters / query parameters; an operator can raise QUERY_TOOL_MAX_RESULTS for a client that accepts larger payloads, or set it to 0 to disable the cap — but the client still rejects any result over its own size limit, so there is no way to return an arbitrarily large result through the MCP channel.

The row cap is resolved with this precedence: an explicitly set QUERY_TOOL_MAX_RESULTS (environment / .env) overrides everything; otherwise a tool’s own max_results (see Custom Tools) applies; otherwise the 100 default.

Note

If the deployment’s OneTick credentials are not entitled to a database that a tool queries, the tool fails the call with a clear message — Error: access to OneTick database '<NAME>' is denied for this deployment's credentials. — rather than exposing the raw engine error. This surfaces as an MCP protocol-level error (CallToolResult.is_error=True), not a string result, so a client can’t mistake it for a successful answer. Grant the database to the account (see OneTick WebAPI authentication) to use it.

Adding your own#

These are ordinary bundled custom tools. To add another OneTick-query tool (or replace one of these), write a tool module and register it — see Custom Tools.