OpenBB-finance/OpenBB · error · ValueError

No tools found in '{category}'/'{subcategory}'. Available ca

Error message

No tools found in '{category}'/'{subcategory}'. Available categories: {', '.join(sorted(available))}

What it means

Raised by the MCP server's category-activation tool when the category (or category/subcategory pair) resolves to zero tool names, meaning nothing can be activated for the session. This happens when the category key is wrong or when a valid category exists in the index but has no tools registered (extension installed but not exposed). The message lists available categories.

Source

Thrown at openbb_platform/extensions/mcp_server/openbb_mcp_server/app/app.py:724

        @mcp.tool(tags={"admin"})
        async def activate_category(
            category: Annotated[
                str, Field(description="Category name to activate all tools for")
            ],
            ctx: Context,
            subcategory: Annotated[
                str | None,
                Field(description="Optional subcategory to narrow activation"),
            ] = None,
        ) -> str:
            """Activate all tools in a category (or subcategory) for this session."""
            if subcategory:
                names = category_index.get_subcategory_names(category, subcategory)
            else:
                names = category_index.get_category_names(category)
            if not names:
                available = list(category_index.get_categories().keys())
                raise ValueError(
                    f"No tools found in '{category}'"
                    + (f"/'{subcategory}'" if subcategory else "")
                    + f". Available categories: {', '.join(sorted(available))}"
                )
            await ctx.enable_components(names=names)
            scope = f"'{category}'" + (f"/'{subcategory}'" if subcategory else "")
            return (
                f"Activated {len(names)} tools in {scope}"
                f": {', '.join(sorted(names))}"
            )

    # Expose prompts and resources as tools via transforms so that
    # tool-only clients can list/render prompts and list/read resources.
    mcp.add_transform(PromptsAsTools(mcp))
    mcp.add_transform(ResourcesAsTools(mcp))

    @mcp.tool(tags={"resource", "admin"})
    async def install_skill(

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Use an exact category from the 'Available categories' list in the error message.
  2. If the category is right but empty, check your MCP/OpenBB config for route exclusions and re-enable the extension's routes.
  3. Verify the extension is installed and loaded (list_categories) before activating.
  4. For subcategory activation, confirm the subcategory key with the listing tool first.

Example fix

# before
msg = await activate_category(category="nonexistent")

# after
available = (await list_categories()).keys()
msg = await activate_category(category=next(c for c in available if "equity" in c))
Defensive patterns

Strategy: validation

Validate before calling

async def activate_category_safe(mcp_client, category: str):
    cats = await mcp_client.call_tool("list_categories", {})
    names = {c["name"] for c in cats.result}
    if category not in names:
        raise ValueError(f"{category!r} not in available categories: {sorted(names)}")
    return await mcp_client.call_tool("activate_category", {"category": category})

Type guard

def is_activatable(category: str, subcategory: str | None, index_names: list[str]) -> bool:
    return bool(index_names) and category in {n.split("_")[0] for n in index_names}

Try / catch

try:
    msg = await activate_category(category=cat)
except ValueError as e:
    if "No tools found in" in str(e):
        # category exists but is empty or wrong: fall back to listing then activating by exact name
        tools = await list_category_tools(category=sorted(category_index.get_categories())[0])
    else:
        raise

Prevention

When it happens

Trigger: Calling activate_category(category='crypto', subcategory='invalid') where the subcategory miss yields an empty name list; activating a category whose extension is installed but whose routes were excluded from MCP exposure via config; typos in category.

Common situations: MCP clients bulk-activating tool groups by name; OpenBB MCP config excluding routes (expose: false) so a category index exists but is empty; stale category names after upgrades.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/223e2d80dec1218e. Report an issue: GitHub.