agents
channels.twilio.numbers
agents.test
conversations
data_sources
events
incidents
insights
insights.folders
insights.workflows
insights.tools
custom_messages
permissions
prompts
session_labels
sessions.transcript
sessions.full-summary
sessions.latency
session_debug
channels.targets
directory
dashboards
outbound.batches
- GETList Outbound Communication Batches
- POSTCreate Outbound Communication Batch
- GETGet Outbound Communication Batch
- PUTUpdate Outbound Communication Batch
- DELDelete Outbound Communication Batch
- POSTUpload Outbound Communication Batch
- GETFetch Outbound Communication Batch Results
- POSTCreate Outbound Communication Request
- POSTDelete Requests By List Of Reference Ids
outbound.campaigns
language_groups
tools
Create Tool
Create a new tool
POST
/
api
/
v1
/
tools
/
Copy
Ask AI
import os
import syllable_sdk
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.tools.create(request={
"name": "Weather Fetcher",
"definition": {
"type": syllable_sdk.Type.ENDPOINT,
"tool": {
"function": {
"name": "get_weather",
"description": "Get the weather for a city",
"parameters": {
},
},
},
"endpoint": {
"url": "https://api.example.com",
"method": syllable_sdk.ToolHTTPMethod.POST,
"argument_location": syllable_sdk.ToolArgumentLocation.PATH,
},
"defaults": "<value>",
"static_parameters": [
{
"name": "temperature_unit",
"description": "Whether the temperature information should be fetched in Celsius or Fahrenheit",
"required": False,
"type": syllable_sdk.StaticToolParameterType.STRING,
"default": "fahrenheit",
},
],
},
"service_id": 1,
})
# Handle response
print(res)
Copy
Ask AI
{
"name": "Weather Fetcher",
"definition": {
"endpoint": {
"argument_location": "query",
"method": "get",
"url": "https://api.open-meteo.com/v1/forecast"
},
"tool": {
"function": {
"description": "Get the weather for a city",
"name": "get_weather",
"parameters": {
"properties": {
"latitude": {
"description": "Latitude of the city",
"type": "number"
},
"longitude": {
"description": "Longitude of the city",
"type": "number"
},
"current": {
"default": "temperature_2m,relative_humidity_2m,precipitation,rain,showers",
"description": "Information to retrieve from the open-meteo API, comma-separated",
"type": "string"
}
},
"required": [
"latitude",
"longitude",
"current"
],
"type": "object"
}
},
"type": "function"
},
"type": "endpoint"
},
"service_id": 1,
"id": 1,
"last_updated_comments": "Updated to use new API endpoint",
"service_name": "<string>",
"prompts_info": [
{
"id": 1,
"name": "Test Prompt"
}
],
"agents_info": [
{
"id": 1,
"name": "Test Agent"
}
],
"last_updated": "2023-11-07T05:31:56Z",
"last_updated_by": "user@email.com"
}
Authorizations
Body
application/json
Request model to create a tool.
Response
200
application/json
Successful Response
Response model for tool operations. A tool is a function that an agent can call to perform actions like accessing databases, making API calls, or processing data. For an agent to have access to a tool, the prompt associated with that agent should be linked to the tool and include instructions to use it. For more information, see Console docs.
Copy
Ask AI
import os
import syllable_sdk
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.tools.create(request={
"name": "Weather Fetcher",
"definition": {
"type": syllable_sdk.Type.ENDPOINT,
"tool": {
"function": {
"name": "get_weather",
"description": "Get the weather for a city",
"parameters": {
},
},
},
"endpoint": {
"url": "https://api.example.com",
"method": syllable_sdk.ToolHTTPMethod.POST,
"argument_location": syllable_sdk.ToolArgumentLocation.PATH,
},
"defaults": "<value>",
"static_parameters": [
{
"name": "temperature_unit",
"description": "Whether the temperature information should be fetched in Celsius or Fahrenheit",
"required": False,
"type": syllable_sdk.StaticToolParameterType.STRING,
"default": "fahrenheit",
},
],
},
"service_id": 1,
})
# Handle response
print(res)
Copy
Ask AI
{
"name": "Weather Fetcher",
"definition": {
"endpoint": {
"argument_location": "query",
"method": "get",
"url": "https://api.open-meteo.com/v1/forecast"
},
"tool": {
"function": {
"description": "Get the weather for a city",
"name": "get_weather",
"parameters": {
"properties": {
"latitude": {
"description": "Latitude of the city",
"type": "number"
},
"longitude": {
"description": "Longitude of the city",
"type": "number"
},
"current": {
"default": "temperature_2m,relative_humidity_2m,precipitation,rain,showers",
"description": "Information to retrieve from the open-meteo API, comma-separated",
"type": "string"
}
},
"required": [
"latitude",
"longitude",
"current"
],
"type": "object"
}
},
"type": "function"
},
"type": "endpoint"
},
"service_id": 1,
"id": 1,
"last_updated_comments": "Updated to use new API endpoint",
"service_name": "<string>",
"prompts_info": [
{
"id": 1,
"name": "Test Prompt"
}
],
"agents_info": [
{
"id": 1,
"name": "Test Agent"
}
],
"last_updated": "2023-11-07T05:31:56Z",
"last_updated_by": "user@email.com"
}
Assistant
Responses are generated using AI and may contain mistakes.