ToolCategory

Categorize tools by their primary function.

Usage

Source

ToolCategory

Every tool registered with the @tool decorator belongs to exactly one category. Categories drive filtering in ToolRegistry.get_tools_by_category() and appear in debugging dashboards, so choosing the right category helps users discover and organize their tools.

Values

  • WEB: tools that make HTTP requests or interact with web APIs
  • FILE: tools that read, write, or transform files on disk
  • DATA: tools that query databases, transform datasets, or compute metrics
  • COMMUNICATION: tools that send emails, messages, or notifications
  • SYSTEM: tools that interact with the operating system or shell
  • CUSTOM: catch-all for tools that do not fit another category (the default)
  • ANALYSIS: tools that perform analysis, summarization, or inference
  • SEARCH: tools that search indexes, documents, or knowledge bases

Examples

Pass a category when registering a tool:

import talk_box as tb

@tb.tool(category=tb.ToolCategory.WEB)
def fetch_page(url: str) -> str:
    ...

Filter registered tools by category:

registry = tb.get_global_registry()
web_tools = registry.get_tools_by_category(tb.ToolCategory.WEB)