Tools
Retrieve and manage tools and tool plugins.
GET /tools/
Summary: Get list of tools
Retrieve a list of all tools available in the system. Returns an array of tool objects.
Query Parameters
type
โ
No
Filter by tool type (native or custom)
Request Body: None
Responses
200
Successfully retrieved list of tools
application/json โ BaseResponse_list_ToolListItem__
422
Validation Error
application/json โ HTTPValidationError
POST /tools/
Summary: Create a new tool
Create a new tool entry by providing tool metadata. Returns the created tool object.
Request Body (required)
application/jsonโ ToolBase
For complete field specifications, constraints, and validation rules, see the Tools Schema Reference: https://gdplabs.gitbook.io/gl-aip/resources/reference/schemas/tools
Responses
200
Tool created successfully
application/json โ BaseResponse_dict_str__Any__
422
Validation Error
โ
POST /tools/upload
Summary: Upload and register a new tool plugin
This endpoint allows uploading a Python file containing a tool plugin class. The plugin will be validated, registered at runtime, and stored in the database.
This endpoint is for creating new tools only, not updating existing ones. For updates, use PUT /tools/{tool_id}/upload instead.
Request Body (required)
multipart/form-dataโ Body_upload_and_register_plugin_tools_upload_post
Responses
200
Tool plugin uploaded and registered successfully
application/json โ BaseResponse_dict_str__Any__
400
Invalid plugin file
โ
409
Tool with the same name already exists
โ
422
Validation Error
application/json โ HTTPValidationError
500
Failed to register plugin
โ
Example upload
Note: The file calculator.py must export a tool_plugin entry point. See the Tools guide for a full walkthrough of packaging and re-uploading custom tools: https://gdplabs.gitbook.io/gl-aip/how-to-guides/tools-guide#create-tools
PUT /tools/{id}
Summary: Update tool metadata
Update metadata for an existing tool by its ID. Returns the updated tool object.
Path Parameters
id
string (uuid)
Yes
โ
Request Body (required)
application/jsonโ ToolBase
For complete field specifications, constraints, and validation rules, see the Tools Schema Reference: https://gdplabs.gitbook.io/gl-aip/resources/reference/schemas/tools
Responses
200
Tool updated successfully
application/json โ BaseResponse_dict_str__Any__
404
Tool not found
โ
422
Validation Error
โ
GET /tools/{id}
Summary: Get tool details by ID
Retrieve detailed information about a specific tool by its ID.
Path Parameters
id
string (uuid)
Yes
โ
Request Body: None
Responses
200
Tool details retrieved successfully
application/json โ BaseResponse_dict_str__Any__
404
Tool not found
โ
422
Validation Error
application/json โ HTTPValidationError
DELETE /tools/{id}
Summary: Delete a tool
Delete a specific tool by its ID. Returns a confirmation message upon successful deletion.
Path Parameters
id
string (uuid)
Yes
โ
Request Body: None
Responses
200
Tool deleted successfully
application/json โ BaseResponse_dict_str__str__
404
Tool not found
โ
422
Validation Error
application/json โ HTTPValidationError
POST /tools/{id}/restore
Summary: Restore a soft-deleted tool
Restore a soft-deleted tool to an active state.
Path Parameters
id
string (uuid)
Yes
โ
Request Body: None
Responses
200
Tool restored successfully
application/json โ BaseResponse_dict_str__str__
404
Tool not found or not deleted
โ
422
Validation Error
application/json โ HTTPValidationError
GET /tools/{tool_id}/script
Summary: Get the script content for a tool
Retrieve the Python script content for a specific tool by its ID.
Path Parameters
tool_id
string
Yes
โ
Request Body: None
Responses
200
Tool script retrieved successfully
application/json โ BaseResponse_dict_str__Any__
404
Tool or script not found
โ
422
Validation Error
application/json โ HTTPValidationError
PUT /tools/{tool_id}/upload
Summary: Update a tool plugin via file upload
This endpoint allows updating an existing tool plugin by uploading a new Python file. The plugin will be validated, registered at runtime, and the database record will be updated.
Path Parameters
tool_id
string (uuid)
Yes
The ID of the tool to update
Request Body (required)
multipart/form-dataโ Body_update_tool_via_upload_tools__tool_id__upload_put
Responses
200
Tool plugin updated successfully
application/json โ BaseResponse_dict_str__Any__
400
Invalid plugin file
โ
404
Tool not found
โ
422
Validation Error
application/json โ HTTPValidationError
500
Failed to update plugin
โ