post https://api.voicecreator.ai/api/v1/tools
Create a new tool.
This endpoint creates a new tool for an organization. Tools are used
by voice assistants for interacting with external systems or performing
specific tasks during conversations.
Parameters:
tool (ToolCreate): The tool data to create
request (Request): The FastAPI request object
db (AsyncSession): The database session (injected)
organization_id (Optional[int]): The organization ID from the API key or request
Returns:
Tool: The created tool
Raises:
HTTPException:
- 400: If organization ID is missing
- 422: If there's a validation error in the request body
- 500: If an unexpected error occurs during creation