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.
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)¶
Bases:
pydantic.BaseModel
Information about a tool.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class dataflow.api.routes.tools_routes.ToolInvokeRequest(/, **data)¶
Bases:
pydantic.BaseModel
Request to invoke a tool.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class dataflow.api.routes.tools_routes.ToolInvokeResponse(/, **data)¶
Bases:
pydantic.BaseModel
Response from tool invocation.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class dataflow.api.routes.tools_routes.ToolSchema(/, **data)¶
Bases:
pydantic.BaseModel
Tool input/output schema information.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class dataflow.api.routes.tools_routes.ToolsListResponse(/, **data)¶
Bases:
pydantic.BaseModel
Response for tools list endpoint.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- dataflow.api.routes.tools_routes.discover_tools()¶
Discover all available tools from haive-tools package.
- async dataflow.api.routes.tools_routes.get_tool_details(tool_name)¶
Get detailed information about a specific tool.
- dataflow.api.routes.tools_routes.get_tool_schema(tool_module_path)¶
Extract input schema from a tool module.
- async dataflow.api.routes.tools_routes.get_tool_schema_endpoint(tool_name)¶
Get the input/output schema for a specific tool.
- Parameters:
tool_name (str) – Name of the tool to get schema for
- Returns:
ToolSchema containing input and output schemas
- Return type:
- dataflow.api.routes.tools_routes.get_tool_schema_for_name(tool_module_path, target_tool_name)¶
Extract input schema for a specific tool by name.
- async dataflow.api.routes.tools_routes.invoke_tool(tool_module_path, arguments)¶
Invoke a tool with given arguments.
- async dataflow.api.routes.tools_routes.invoke_tool_endpoint(request)¶
Invoke a tool with the provided arguments.
- Parameters:
request (ToolInvokeRequest) – Tool invocation request with tool name and arguments
- Returns:
ToolInvokeResponse with the result or error
- Return type:
- async dataflow.api.routes.tools_routes.list_tools()¶
List all available tools.
- Returns:
ToolsListResponse containing list of available tools and total count
- Return type:
- async dataflow.api.routes.tools_routes.search_tools(query=None, category=None, tool_type=None)¶
Search for tools by query, category, or type.
- Parameters:
- Returns:
ToolsListResponse containing filtered list of tools
- Return type: