Request Body
The request body structure varies based on the tool type you’re creating:Endpoint Tool
Endpoint Tool
Create a tool that makes HTTP requests to external APIs.
Example Request
Python Function Tool
Python Function Tool
Create a tool that executes custom Python code.
Example Request
AWS Lambda Tool
AWS Lambda Tool
Create a tool that invokes AWS Lambda functions.
Example Request
Response
A successful request returns the created tool object:Response
Field Descriptions
name
(string, required): Unique identifier for the tool within your organizationdisplay_name
(string, required): Human-readable name shown in the UIdescription
(string, required): Clear description of what the tool doestool_type
(string, required): Type of tool ("endpoint"
,"python_function"
, or"lambda"
)configuration
(object, required): Tool-specific configuration (varies by type)function_definition
(object, required): OpenAI function calling schemais_active
(boolean, optional): Whether the tool is active (default:true
)is_public
(boolean, optional): Whether other organizations can see this tool (default:false
)timeout_seconds
(integer, optional): Maximum execution time (default: 30)retry_attempts
(integer, optional): Number of retry attempts on failure (default: 1)
Error Responses
400 Bad RequestConfiguration Examples
Advanced Endpoint Configuration
Advanced Endpoint Configuration
Python Function with Libraries
Python Function with Libraries
Lambda Function with Environment Variables
Lambda Function with Environment Variables
Best Practices
- Naming: Use clear, descriptive names that indicate the tool’s purpose
- Security: Never include sensitive data in tool definitions; use environment variables
- Testing: Test tools thoroughly before deploying to production
- Documentation: Provide clear descriptions and parameter documentation
- Error Handling: Design tools to handle failures gracefully
- Performance: Set appropriate timeouts and optimize for call-time execution