talib_list_indicators
List TA-Lib indicators filtered by group, category, or keyword. Returns indicator names with group and category metadata.
Instructions
List TA-Lib indicators with optional group, category, and search filters.
Returns indicator names with group and category metadata. Use the optional filters to narrow results by TA-Lib group, category, or keyword search.
Args: group: Optional TA-Lib group filter (e.g., "Overlap Studies"). category: Optional category filter (e.g., "Trend", "Momentum"). search: Optional keyword search for indicator names. limit: Maximum number of indicators to return (1-1000).
Returns: List of indicator summaries with name, group, and category.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | ||
| category | No | ||
| search | No | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/ta_lib_mcp/server.py:53-86 (handler)The talib_list_indicators MCP tool handler function. Decorated with @mcp.tool, it takes optional group, category, search, and limit parameters, constructs a ListIndicatorsInput model, delegates to list_indicators() from indicators module, and returns IndicatorSummary dicts.
@mcp.tool(annotations=_TOOL_ANNOTATIONS) def talib_list_indicators( group: str | None = None, category: str | None = None, search: str | None = None, limit: int = 200, ) -> list[dict[str, Any]]: """List TA-Lib indicators with optional group, category, and search filters. Returns indicator names with group and category metadata. Use the optional filters to narrow results by TA-Lib group, category, or keyword search. Args: group: Optional TA-Lib group filter (e.g., "Overlap Studies"). category: Optional category filter (e.g., "Trend", "Momentum"). search: Optional keyword search for indicator names. limit: Maximum number of indicators to return (1-1000). Returns: List of indicator summaries with name, group, and category. """ input_model = ListIndicatorsInput( group=group, category=category, search=search, limit=limit, ) raw = list_indicators( group=input_model.group, category=input_model.category, search=input_model.search, limit=input_model.limit, ) return [IndicatorSummary(**row).model_dump() for row in raw] - src/ta_lib_mcp/models.py:12-40 (schema)ListIndicatorsInput Pydantic model defining the input schema for the talib_list_indicators tool, with fields: group, category, search (all optional str), and limit (int, default 200, max 1000).
class ListIndicatorsInput(BaseModel): """Input for talib_list_indicators tool.""" group: str | None = Field( default=None, description=( "Optional TA-Lib group filter. " "Examples: 'Overlap Studies', 'Momentum Indicators', 'Volume Indicators'." ), max_length=MAX_INPUT_LENGTH, ) category: str | None = Field( default=None, description=( "Optional category filter. Examples: 'Trend', 'Momentum', 'Volume', 'Volatility'." ), max_length=MAX_INPUT_LENGTH, ) search: str | None = Field( default=None, description="Optional keyword search filter for indicator names.", max_length=MAX_INPUT_LENGTH, ) limit: int = Field( default=DEFAULT_LIMIT, description=f"Maximum number of indicators to return (1-{MAX_LIMIT}).", ge=1, le=MAX_LIMIT, ) - src/ta_lib_mcp/models.py:73-78 (schema)IndicatorSummary Pydantic model defining the output schema for talib_list_indicators, with fields: name, group, and category (all str).
class IndicatorSummary(BaseModel): """Summary of a single indicator.""" name: str = Field(description="Indicator name (uppercase).") group: str = Field(description="TA-Lib function group.") category: str = Field(description="Indicator category.") - src/ta_lib_mcp/indicators.py:106-149 (helper)The core list_indicators() function that queries TA-Lib via get_function_groups() and get_functions(), filters by group, category, and search (case-insensitive), maps groups to categories via categorize_group(), and returns up to 'limit' results.
def list_indicators( group: str | None = None, category: str | None = None, search: str | None = None, limit: int = DEFAULT_LIMIT, ) -> list[dict[str, str]]: """List available TA-Lib indicators with group and category metadata. Args: group: Optional TA-Lib group filter. category: Optional category filter. search: Optional keyword search for indicator names. limit: Maximum number of results. Returns: List of indicator dicts with name, group, and category. Raises: TALibUnavailableError: If TA-Lib is not installed. ValidationError: If filter parameters are invalid. """ limit = validate_limit(limit) talib, _ = _require_talib() group_filter = normalize_text_filter(group, "group") category_filter = normalize_text_filter(category, "category") search_filter = normalize_text_filter(search, "search") group_map, names = _get_metadata(talib) rows: list[dict[str, str]] = [] for name in names: grp = group_map.get(name, "Unknown") cat = categorize_group(grp) if group_filter and group_filter not in grp.casefold(): continue if category_filter and category_filter not in cat.casefold(): continue if search_filter and search_filter not in name.casefold(): continue rows.append({"name": name, "group": grp, "category": cat}) if len(rows) >= limit: break return rows - src/ta_lib_mcp/server.py:18-34 (registration)Import of list_indicators from ta_lib_mcp.indicators and ListIndicatorsInput/IndicatorSummary from ta_lib_mcp.models, connecting the tool handler to its dependencies.
from ta_lib_mcp.constants import ENV_LOG_LEVEL, SERVER_DESCRIPTION, SERVER_NAME from ta_lib_mcp.indicators import ( compute_indicator, get_indicator_info, list_indicators, talib_versions, ) from ta_lib_mcp.models import ( CategorySummary, ComputationResult, ComputeIndicatorInput, GetIndicatorInfoInput, IndicatorInfo, IndicatorSummary, ListIndicatorsInput, VersionInfo, )