From cd9a520485b40d1971522cdeebb9cb5144be23af Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Fri, 2 Oct 2026 12:32:30 -0700 Subject: [PATCH] Added in how to read tool call logs --- fern/observability/logs/call-logs.mdx | 13 +++++++++++++ fern/tools/api-request/response-handling.mdx | 5 +++-- fern/tools/custom-tools-troubleshooting.mdx | 2 ++ fern/tools/custom-tools.mdx | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/fern/observability/logs/call-logs.mdx b/fern/observability/logs/call-logs.mdx index 9538aa063..21ce6266d 100644 --- a/fern/observability/logs/call-logs.mdx +++ b/fern/observability/logs/call-logs.mdx @@ -97,6 +97,19 @@ This tab shows the stored conversation-message objects for the call, in order. A 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. +### Function and API Request tools + +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. + +| Tool type | Where to inspect | Correlation details | +| --- | --- | --- | +| 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. | +| 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. | + +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. + +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. + ### Call Cost 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. diff --git a/fern/tools/api-request/response-handling.mdx b/fern/tools/api-request/response-handling.mdx index 9d4eb5a5f..e251b34dd 100644 --- a/fern/tools/api-request/response-handling.mdx +++ b/fern/tools/api-request/response-handling.mdx @@ -150,12 +150,13 @@ After a test call, inspect the tool arguments and result before changing the sch - Open [Logs](https://dashboard.vapi.ai/logs), select the call, and inspect its messages and tool-call entries. Confirm: + Open [Logs → Calls](https://dashboard.vapi.ai/logs), select the call, and inspect its **Messages** and **Logs** tabs. Confirm: - The assistant called the expected tool. - The model-generated arguments contain the confirmed customer name, product ID, and quantity. - The tool result contains either the accepted order or the structured error. - The assistant did not claim success after a failed request. + - The **Logs** tab shows the API Request destination's resolved request and response when detailed logging is available. @@ -174,7 +175,7 @@ After a test call, inspect the tool arguments and result before changing the sch -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. +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). ## Diagnose common failures diff --git a/fern/tools/custom-tools-troubleshooting.mdx b/fern/tools/custom-tools-troubleshooting.mdx index 58001ecf6..cab83e397 100644 --- a/fern/tools/custom-tools-troubleshooting.mdx +++ b/fern/tools/custom-tools-troubleshooting.mdx @@ -325,6 +325,8 @@ Tool behavior doesn't match your expectations. processing for long-running operations. +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. + ## Reference: Required formats ### Response format template diff --git a/fern/tools/custom-tools.mdx b/fern/tools/custom-tools.mdx index 9dd83efa4..9e9dbfd80 100644 --- a/fern/tools/custom-tools.mdx +++ b/fern/tools/custom-tools.mdx @@ -312,6 +312,8 @@ If the location can't be found, report the failure through `error` instead of `r 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. +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. + **Some Key Points:** - Pay attention to the required parameters and response format of your functions.