Skip to content

Commit cd9a520

Browse files
committed
Added in how to read tool call logs
1 parent fbd797a commit cd9a520

4 files changed

Lines changed: 20 additions & 2 deletions

File tree

‎fern/observability/logs/call-logs.mdx‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,19 @@ This tab shows the stored conversation-message objects for the call, in order. A
9797

9898
Use this tab to inspect the message data retained for the call. The objects are not necessarily the exact payloads sent to or returned by the model provider. The stored history depends on your artifact configuration.
9999

100+
### Function and API Request tools
101+
102+
Use **Messages** to inspect a tool call and its result. Use the call's **Logs** tab to inspect request and response details when the assistant's **Logging** setting is enabled.
103+
104+
| Tool type | Where to inspect | Correlation details |
105+
| --- | --- | --- |
106+
| Function | Open **Logs → Webhooks** and find the `tool-calls` entry. Use the call's **Messages** tab to inspect the tool call and result. | The webhook includes the call and tool-call IDs. Vapi also sends the call ID in the `X-Call-Id` header. |
107+
| API Request | Open the call's **Logs** tab for the resolved request and response. Use **Messages** to inspect the tool call and result. | Vapi sends the call ID in the `X-Call-Id` header. Your destination can return its own `requestId` for its server logs. Vapi does not add `toolCallId` to the destination request by default. |
108+
109+
The **Logs → API** tab records requests made to the Vapi API. It does not show requests that an API Request tool sends to your destination.
110+
111+
For an async Function tool, Vapi returns an immediate `Success.` result to the assistant and ignores the webhook's later result. Open **Logs → Webhooks** to inspect the webhook response after it finishes. Detailed entries in the call's **Logs** tab depend on the assistant's **Logging** setting. See [Logs overview](/observability/logs/overview#retention-and-logging-configuration) for retention and compliance limits.
112+
100113
### Call Cost
101114

102115
When available, the **Call Cost** tab shows the call's total cost, duration, and per-category breakdown. The tab may be hidden for organizations with invoiced billing. Contact your account team for cost details that reflect your agreement.

‎fern/tools/api-request/response-handling.mdx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ After a test call, inspect the tool arguments and result before changing the sch
150150

151151
<Tabs>
152152
<Tab title="Dashboard">
153-
Open [Logs](https://dashboard.vapi.ai/logs), select the call, and inspect its messages and tool-call entries. Confirm:
153+
Open [Logs → Calls](https://dashboard.vapi.ai/logs), select the call, and inspect its **Messages** and **Logs** tabs. Confirm:
154154

155155
- The assistant called the expected tool.
156156
- The model-generated arguments contain the confirmed customer name, product ID, and quantity.
157157
- The tool result contains either the accepted order or the structured error.
158158
- The assistant did not claim success after a failed request.
159+
- The **Logs** tab shows the API Request destination's resolved request and response when detailed logging is available.
159160
</Tab>
160161

161162
<Tab title="cURL">
@@ -174,7 +175,7 @@ After a test call, inspect the tool arguments and result before changing the sch
174175
</Tab>
175176
</Tabs>
176177

177-
The call artifact does not show the final HTTP request after Vapi resolves Liquid values and merges static fields. Use logs from the destination API to inspect final headers and body values. Correlate the coffee endpoint's `requestId` with its `X-Request-Id` response header and server logs when investigating a specific request.
178+
When the assistant's **Logging** setting is enabled, the call's **Logs** tab records the resolved API Request URL, method, request data, and response details. Vapi sends the call ID in the `X-Call-Id` request header. The destination does not receive `toolCallId` by default, so use the call ID and a destination-generated `requestId` to correlate with your server logs. Sensitive values can be redacted or omitted based on logging and compliance settings. The **Logs → API** tab records requests made to Vapi's API, not requests sent by an API Request tool. For Function and API Request tool log locations, see [Call logs](/observability/logs/call-logs#function-and-api-request-tools).
178179

179180
## Diagnose common failures
180181

‎fern/tools/custom-tools-troubleshooting.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ Tool behavior doesn't match your expectations.
325325
processing for long-running operations.
326326
</Tip>
327327

328+
For an async Function tool, Vapi returns an immediate `Success.` result to the assistant and does not use the webhook's eventual response as the tool result. Inspect the later webhook response in [Logs → Webhooks](/observability/logs/webhook-logs) and check your server logs for the completed action. See [Call logs](/observability/logs/call-logs#function-and-api-request-tools) for the Function and API Request log locations.
329+
328330
## Reference: Required formats
329331

330332
### Response format template

‎fern/tools/custom-tools.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ If the location can't be found, report the failure through `error` instead of `r
312312

313313
For multiple tool calls in one request, return a result for every call in the `results` array and match each result to its call with `toolCallId`. Results can appear in any order. Use `result` for success and `error` for failure.
314314

315+
To inspect a Function tool call, open its [call log](/observability/logs/call-logs#function-and-api-request-tools). The call's **Messages** tab shows the tool call and result. **Logs → Webhooks** shows the Function webhook request and response.
316+
315317
**Some Key Points:**
316318

317319
- Pay attention to the required parameters and response format of your functions.

0 commit comments

Comments
 (0)