Tools Calling - Vapi
# general-english
s
You are using the deprecated function. In order to use tools, you need to use API endpoint. https://docs.vapi.ai/tools-calling
e
Thanks @Sahil . Does this look right?
Copy code
{
  "maxDurationSeconds": 1800,
  "assistant": {
    "transcriber": {
      "provider": "deepgram",
      "model": "nova-2",
      "language": "en"
    },
    "tools": {
    "type": "function",
    "messages": [
        {
            "type": "request-start",
            "content": "Ok"
        }
    ],
    "function": {
        "name": "name of tool",
        "parameters": {
            "type": "object",
            "properties": {
                "user_message": {
                    "type": "string"
                }
            }
        },
        "description": "description of tool"
    },
    "async": true,
    "server": {
        "url": "https://your-webhook-url"
    }
},
    "model": {
      "messages": [...
s
It is incorrect.
I have shared some payload for tools call can you search on discord?
e
ok thanks Sahil, will search
@Sahil ok, how is this please? And is it ok to leave out request_complete/failed/delayed if I don't want the LLM to say anything?
Copy code
{
  "maxDurationSeconds": 1800,
  "assistant": {
    "transcriber": {
      "provider": "deepgram",
      "model": "nova-2",
      "language": "en"
    },
    "model": {
      "messages": [
        {
          "content": "system prompt",
          "role": "system"
        }
      ],
      "tools": {
        "type": "function",
        "messages": [
          {
            "type": "request-start",
            "content": "Ok"
          }
        ],
        "function": {
          "name": "tool_name",
          "parameters": {
            "type": "object",
            "properties": {
              "user_message": {
                "type": "string"
              }
            }
          },
          "description": "tool description"
        },
        "async": true,
        "server": {
          "url": "https://your-make.com/webhook-url"
        }
      },
s
yeah you can leave that part.
e
It’s working, thank you!