This guide explains how to call tools, interpret responses, discover capabilities, use prompts, and handle errors when interacting with an OpenBB MCP server.
This guide explains how to call tools, interpret responses, discover capabilities, use prompts, and handle errors when interacting with an OpenBB MCP server.
When first connecting, the server exposes a small set of admin tools for discovering and activating the full catalog. Not all tools are active by default.
All visibility changes are per-session — each connected client maintains its own active toolset, so multiple agents can operate independently.
Call available_categories (no arguments) to see what is installed:
[
{
"name": "equity",
"subcategories": [
{"name": "price", "tool_count": 5},
{"name": "fundamental", "tool_count": 12}
],
"total_tools": 17
},
{
"name": "economy",
"subcategories": [
{"name": "general", "tool_count": 3}
],
"total_tools": 3
}
]
Each category maps to a top-level API router. Subcategories are nested routers.
Call available_tools with a category name:
// Input
{"category": "equity", "subcategory": "price"}
// Output
[
{"name": "equity_price_historical", "active": true, "description": "Get historical price data..."},
{"name": "equity_price_quote", "active": false, "description": "Get current price quote..."}
]
The active field shows whether the tool is currently enabled. Inactive tools
cannot be called until activated, but they still show a short cached description
so they remain discoverable.
The subcategory argument is optional. Omit it to see all tools in the
category.
Call activate_tools with a list of tool names:
// Input
{"tool_names": ["equity_price_quote", "equity_price_historical"]}
// Output
"Activated: equity_price_quote, equity_price_historical"
Tools that were already active are silently included. Unknown names are reported in the response:
"Activated: equity_price_quote Not found: nonexistent_tool"
Call activate_category to bulk-activate all tools in a category (or subcategory):
// Activate everything in equity
{"category": "equity"}
// Activate only equity/price tools
{"category": "equity", "subcategory": "price"}
// Output
"Activated 5 tools in 'equity'/'price': equity_price_historical, equity_price_quote, ..."
This is faster than listing tool names individually when you need a whole category.
Call deactivate_tools to disable tools no longer needed:
{"tool_names": ["equity_price_quote"]}
This reduces noise in the active tool list and can improve context efficiency.
If the server was started without --tool-discovery, the admin tools are not
available. All tools in default_tool_categories are permanently active.
Every data tool has a JSON Schema describing its input. A typical tool schema:
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "Symbol to get data for."
},
"provider": {
"type": "string",
"enum": ["fmp", "polygon", "yfinance"],
"description": "The provider to use for the query."
},
"start_date": {
"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}],
"description": "Start date of the data."
},
"end_date": {
"anyOf": [{"type": "string", "format": "date"}, {"type": "null"}],
"description": "End date of the data."
},
"interval": {
"type": "string",
"default": "1d",
"description": "Time interval of the data."
}
},
"required": ["symbol"]
}
Key rules:
provider — present only on endpoints that use the provider interface.
When listed, its enum shows available provider sources. If the endpoint has
only one provider, you can omit it and the sole provider is used
automatically. When multiple providers are available, select one from the
enum. Different providers may return different fields or support different
parameters. Endpoints that do not use the provider interface (basic GET/POST
routes) have no provider parameter at all.symbol formatting — symbols are case-insensitive. Multiple symbols can
be comma-separated: "AAPL,MSFT,GOOG".YYYY-MM-DD strings.anyOf with a null type or a default
value. Omit them to use defaults.{
"name": "equity_price_historical",
"arguments": {
"symbol": "AAPL",
"provider": "fmp",
"start_date": "2025-01-01",
"end_date": "2025-02-01",
"interval": "1d"
}
}
Every OpenBB tool returns an OBBject — a standardized response envelope:
{
"id": "06520558-d54a-7e53-8000-7aafc8a42694",
"results": [...],
"provider": "fmp",
"warnings": null,
"chart": null,
"extra": {
"metadata": {
"arguments": {...},
"duration": 565256375,
"route": "/equity/price/historical",
"timestamp": "2025-01-15 11:28:57.149548"
}
}
}
| Field | Type | Description |
|---|---|---|
id | string | UUID identifying this request |
results | list[dict] | dict | string | null | The actual data. Usually a list of records |
provider | string | null | Which provider fulfilled the request |
warnings | list[object] | null | Non-fatal warnings from the provider or platform |
chart | object | null | Chart data if chart=true was passed |
extra | dict | Execution metadata and results metadata |
results FieldThis is the primary data payload. Its structure depends on the endpoint:
Tabular data — most common, a list of dictionaries (one per row):
"results": [
{"date": "2025-01-02", "open": 150.0, "high": 155.0, "low": 149.0, "close": 153.5, "volume": 1000000},
{"date": "2025-01-03", "open": 153.0, "high": 157.0, "low": 152.0, "close": 156.2, "volume": 1200000}
]
Single record — some endpoints return a single dict:
"results": {"symbol": "AAPL", "price": 185.50, "change": 2.30, "volume": 45000000}
Empty results — when no data is available:
"results": null
or
"results": []
Field names vary by provider — different providers may return different columns for the same endpoint. Always check the keys in the returned records.
warnings FieldWarnings are non-fatal issues that occurred during execution:
"warnings": [
{
"category": "OpenBBWarning",
"message": "Parameter 'source' is not supported by fmp. Available for: intrinio."
}
]
Common warning scenarios:
When warnings is null, no warnings were generated.
extra FieldContains execution metadata and optional results metadata:
"extra": {
"metadata": {
"arguments": {
"provider_choices": {"provider": "fmp"},
"standard_params": {"symbol": "AAPL", "start_date": "2025-01-01"},
"extra_params": {}
},
"duration": 565256375,
"route": "/equity/price/historical",
"timestamp": "2025-01-15 11:28:57.149548"
},
"results_metadata": {
"...provider-specific metadata..."
}
}
metadata — always present (unless disabled):
arguments — the exact parameters used, split into provider choices,
standard params, and extra (provider-specific) paramsduration — nanoseconds the request tookroute — the API endpoint pathtimestamp — when the request was maderesults_metadata — present when the provider returns contextual
information about the data (e.g., FRED series metadata, CBOE options
metadata). Contents vary by endpoint and provider.
chart FieldWhen a tool is called with chart: true (where supported), the chart field
contains a Plotly figure:
"chart": {
"content": { "data": [...], "layout": {...} },
"fig": { "data": [...], "layout": {...} }
}
The content key contains the Plotly JSON that can be rendered directly.
Not all endpoints support charting.
Each data endpoint can have multiple provider sources (e.g., FMP, Yahoo Finance, Polygon). Providers differ in:
When a tool's input schema includes provider, its enum lists all installed
provider sources for that endpoint. If there is only one provider, the
parameter can be omitted — the sole provider is selected automatically.
When multiple providers are available, pick one based on:
~/.openbb_platform/user_settings.jsonEndpoints that do not use the provider interface (basic GET/POST routes added
via router.command(methods=["GET"]) or raw FastAPI) have no provider
parameter.
If a provider fails due to missing credentials, the error message will indicate an authentication issue.
Some parameters only apply to certain providers. For example, the source
parameter might only be available with the intrinio provider. Passing it to
fmp generates a warning but does not cause an error.
The server includes a prompt system for accessing documentation, usage guides, and analysis frameworks.
Call list_prompts (no arguments):
[
{"name": "develop_extension", "tags": ["skill"], "arguments": []},
{"name": "build_workspace_app", "tags": ["skill"], "arguments": []},
{"name": "configure_mcp_server", "tags": ["skill"], "arguments": []},
{"name": "analyze_stock", "tags": ["analysis"], "arguments": [
{"name": "symbol", "type": "str", "required": true},
{"name": "focus", "type": "str", "required": false, "default": "fundamentals"}
]}
]
Call execute_prompt with the prompt name and any required arguments:
// Input
{"prompt_name": "analyze_stock", "arguments": {"symbol": "AAPL"}}
// Output - rendered prompt content
{
"messages": [
{"role": "user", "content": "Analyze AAPL focusing on fundamentals..."}
]
}
Prompts with no arguments (like skills) return their full content as-is. Prompts with arguments substitute the provided values into the template.
| Tag | Source | Description |
|---|---|---|
system | System prompt file | Server-wide context and instructions |
server | Server prompts JSON | Reusable analysis frameworks |
route-specific | Inline on API routes | Endpoint usage guides |
| Scenario | What Happens |
|---|---|
| Invalid parameters | Error with HTTP 422 details explaining which parameter failed validation |
| Missing required parameter | Error with HTTP 422 indicating the missing field |
| Provider authentication failure | Error with HTTP 401/403 indicating credentials are missing or invalid |
| Provider rate limit | Error with HTTP 429 or provider-specific rate limit message |
| No data available | Successful response with results: null or results: [] |
| Tool not active | Tool does not appear in the available tools list |
| Unknown tool name | Standard MCP protocol error |
| Category not found (discovery) | Error listing available categories |
| Connection failure | Error with "Request error: ..." |
A response with results: null or results: [] is not an error — it
means the provider had no data matching the query. Common causes:
Try a different provider, adjust the date range, or verify the symbol format.
Validation errors (HTTP 422) include detail about what went wrong:
HTTP error 422: Unprocessable Entity - {"detail": [{"loc": ["query", "symbol"], "msg": "field required", "type": "value_error.missing"}]}
The loc field shows which parameter failed, and msg explains why.
activate_tools(["equity_price_historical"]){"symbol": "AAPL", "provider": "fmp", "start_date": "2025-01-01", "end_date": "2025-02-01"}
results — each record has date, open, high, low, close,
volume (field names depend on provider)Pass comma-separated symbols:
{"symbol": "AAPL,MSFT,GOOG", "provider": "fmp"}
Results will contain records for all symbols. Filter by the symbol field in
each record if present, or by the ordering pattern.
Use the output of one tool as input to another:
equity_compare_peers({"symbol": "AAPL", "provider": "fmp"})resultsequity_price_quote({"symbol": "AAPL,PEER1,PEER2", "provider": "fmp"})When unsure what providers are available for an endpoint, look at the tool's
input schema — the provider parameter's enum lists all installed options.
Pass chart: true to get a pre-built Plotly visualization:
{"symbol": "AAPL", "provider": "fmp", "chart": true}
The chart field in the response contains the Plotly figure JSON.
The server reads user settings from ~/.openbb_platform/user_settings.json:
Provider credentials are stored under credentials:
{
"credentials": {
"fmp_api_key": "YOUR_KEY",
"polygon_api_key": "YOUR_KEY"
}
}
Without the required API key, calls to that provider will fail with an authentication error.
Set a default provider per endpoint so it is preselected:
{
"defaults": {
"commands": {
"/equity/price/historical": {"provider": "yfinance"},
"/economy/cpi": {"provider": "oecd"}
}
}
}
When multiple providers are available, this determines the default selection if the parameter is omitted.
Individual parameters can be defaulted so they are applied when not explicitly