Package io.jmix.aitools.tool
Interface AiToolRegistry
- All Known Implementing Classes:
AiToolRegistryImpl
public interface AiToolRegistry
Central registry of all AI tools available in the application.
The registry is built once at application startup from every Spring bean implementing
JmixAiTool. For each such bean the registry collects @Tool-annotated methods,
applies @ToolOverride resolution and produces a flat list of
ResolvedAiTool entries.
-
Method Summary
Modifier and TypeMethodDescriptionfindByMarker(Class<? extends JmixAiTool> marker) Returns all resolved tools produced by beans implementing the given marker sub-interface ofJmixAiTool(e.g.findByName(String name) Returns a resolved tool by its name (the value passed to@Tool(name=...)or derived from the method name), or empty when no such tool is registered.getAll()Returns all resolved tools in registration order.List<org.springframework.ai.tool.ToolCallback> Shortcut returningToolCallbacks of all resolved tools in the same order asgetAll().
-
Method Details
-
getAll
List<ResolvedAiTool> getAll()Returns all resolved tools in registration order.- Returns:
- all resolved tools
-
findByName
Returns a resolved tool by its name (the value passed to@Tool(name=...)or derived from the method name), or empty when no such tool is registered.- Parameters:
name- tool name to look up- Returns:
- the matching tool, or empty when none is registered under that name
-
findByMarker
Returns all resolved tools produced by beans implementing the given marker sub-interface ofJmixAiTool(e.g.DataLoadAiTool.class).- Parameters:
marker- marker sub-interface to filter by- Returns:
- resolved tools whose source bean implements the marker
-
getAllCallbacks
List<org.springframework.ai.tool.ToolCallback> getAllCallbacks()Shortcut returningToolCallbacks of all resolved tools in the same order asgetAll().- Returns:
- callbacks of all resolved tools
-