Skip to main content
PATCH
/
v2
/
voice-agents
/
web-tool
/
{id}
Update Web Tool
curl --request PATCH \
  --url https://api.tryhamsa.com/v2/voice-agents/web-tool/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "FUNCTION",
  "name": "Get Weather Data",
  "description": "Fetches current weather data for a given location",
  "async": false,
  "messages": [
    {
      "type": "REQUEST_START",
      "content": "Fetching weather data..."
    }
  ],
  "params": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "description": "The city name to get weather for"
      },
      "units": {
        "type": "string",
        "description": "Temperature units",
        "enum": [
          "celsius",
          "fahrenheit"
        ]
      }
    },
    "required": [
      "location"
    ]
  }
}
'
{
  "success": true,
  "data": {
    "id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "persistentId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "version": 1,
    "name": "Get Weather Data",
    "type": "FUNCTION",
    "userId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "projectId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "isActive": true,
    "async": false,
    "description": "Fetches current weather data for a given location",
    "collectionId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "toolSettings": {
      "httpHeaders": {},
      "pathParameters": {},
      "serverUrl": "<string>",
      "timeout": 123,
      "authToken": "<string>",
      "methodType": "<string>"
    },
    "params": {},
    "messages": [
      {
        "type": "REQUEST_START",
        "content": "Fetching weather data..."
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.tryhamsa.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Path Parameters

id
string<uuid>
required

The unique identifier of the web tool to update

Example:

"48f7656f-098b-4c43-b165-7cfd2cc8ac30"

Body

application/json
type
enum<string>

The type of web tool

Available options:
FUNCTION,
MCP,
WEB_TOOL
Example:

"FUNCTION"

name
string

The name of the web tool

Maximum string length: 250
Example:

"Get Weather Data"

description
string

A description of what the web tool does

Maximum string length: 1000
Example:

"Fetches current weather data for a given location"

async
boolean

Whether the tool runs asynchronously. Not allowed for MCP type.

Example:

false

toolSettings
object

Server configuration for the web tool. Required for FUNCTION and MCP types, not allowed for WEB_TOOL type.

messages
object[]

Messages to display during tool execution

params
object

OpenAPI-style schema defining the parameters for the web tool. Not allowed for MCP type.

Response

Web tool updated successfully

success
boolean
Example:

true

data
object