dataflow.api.routes.tools_routes¶
Tools API routes for discovering and listing available tools.
This module provides FastAPI routes for discovering and listing all available tools in the Haive ecosystem. It scans the haive-tools package and returns information about available tools and toolkits.
Attributes¶
Classes¶
Information about a tool. |
|
Request to invoke a tool. |
|
Response from tool invocation. |
|
Tool input/output schema information. |
|
Response for tools list endpoint. |
Functions¶
|
Discover all available tools from haive-tools package. |
|
Get detailed information about a specific tool. |
|
Extract input schema from a tool module. |
|
Get the input/output schema for a specific tool. |
|
Extract input schema for a specific tool by name. |
|
Invoke a tool with given arguments. |
|
Invoke a tool with the provided arguments. |
|
List all available tools. |
|
Search for tools by query, category, or type. |
|
Simple tool discovery that always works. |
Module Contents¶
- class dataflow.api.routes.tools_routes.ToolInfo(/, **data: Any)¶
Bases:
pydantic.BaseModelInformation about a tool.
- class dataflow.api.routes.tools_routes.ToolInvokeRequest(/, **data: Any)¶
Bases:
pydantic.BaseModelRequest to invoke a tool.
- class dataflow.api.routes.tools_routes.ToolInvokeResponse(/, **data: Any)¶
Bases:
pydantic.BaseModelResponse from tool invocation.
- result: Any = None¶
- class dataflow.api.routes.tools_routes.ToolSchema(/, **data: Any)¶
Bases:
pydantic.BaseModelTool input/output schema information.
- class dataflow.api.routes.tools_routes.ToolsListResponse(/, **data: Any)¶
Bases:
pydantic.BaseModelResponse for tools list endpoint.
- dataflow.api.routes.tools_routes.discover_tools() list[ToolInfo]¶
Discover all available tools from haive-tools package.
- async dataflow.api.routes.tools_routes.get_tool_details(tool_name: str) dict[str, Any]¶
Get detailed information about a specific tool.
- Parameters:
tool_name – Name of the tool to get details for
- Returns:
Detailed information about the tool
- dataflow.api.routes.tools_routes.get_tool_schema(tool_module_path: str) dict[str, Any]¶
Extract input schema from a tool module.
- async dataflow.api.routes.tools_routes.get_tool_schema_endpoint(tool_name: str) ToolSchema¶
Get the input/output schema for a specific tool.
- Parameters:
tool_name – Name of the tool to get schema for
- Returns:
ToolSchema containing input and output schemas
- dataflow.api.routes.tools_routes.get_tool_schema_for_name(tool_module_path: str, target_tool_name: str) dict[str, Any]¶
Extract input schema for a specific tool by name.
- async dataflow.api.routes.tools_routes.invoke_tool(tool_module_path: str, arguments: dict[str, Any]) Any¶
Invoke a tool with given arguments.
- async dataflow.api.routes.tools_routes.invoke_tool_endpoint(request: ToolInvokeRequest) ToolInvokeResponse¶
Invoke a tool with the provided arguments.
- Parameters:
request – Tool invocation request with tool name and arguments
- Returns:
ToolInvokeResponse with the result or error
- async dataflow.api.routes.tools_routes.list_tools() ToolsListResponse¶
List all available tools.
- Returns:
ToolsListResponse containing list of available tools and total count
- async dataflow.api.routes.tools_routes.search_tools(query: str | None = None, category: str | None = None, tool_type: str | None = None) ToolsListResponse¶
Search for tools by query, category, or type.
- Parameters:
query – Search query to match against tool names and descriptions
category – Filter by category (e.g., ‘search’, ‘development’, ‘database’)
tool_type – Filter by type (‘tool’ or ‘toolkit’)
- Returns:
ToolsListResponse containing filtered list of tools
- dataflow.api.routes.tools_routes.simple_discover_tools() list[ToolInfo]¶
Simple tool discovery that always works.
- dataflow.api.routes.tools_routes.logger¶
- dataflow.api.routes.tools_routes.router¶