> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/mba/api-ref/insights/get-tool-call-insights.md).

# Get tool call insights

Retrieve how each of your tools performed over a date range: how many conversations called it, how long it took to respond, and how often it succeeded, failed, or timed out. Only tools you supplied are reported. Figures are rolled up once a day, so the most recent day may still be incomplete.

```json
{"openapi":"3.1.0","info":{"title":"Business Agent API","version":"1.51.5"},"tags":[{"name":"Insights","description":"Endpoints for retrieving the agent's usage insights"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"insights.ToolCallInsightsResponse":{"description":"The tool call insights for the requested range","properties":{"data":{"description":"One row per tool called in the range, busiest first. Empty when no tool of yours was called","items":{"$ref":"#/components/schemas/insights.BizAIOmniChannelToolCallInsights"},"type":"array","uniqueItems":false}},"required":["data"],"type":"object"},"insights.BizAIOmniChannelToolCallInsights":{"description":"Call volume, latency, and health for a single tool","properties":{"avg_latency_ms":{"description":"Mean time the tool took to respond, in milliseconds, over every call in the range that was timed. Null when none were timed","type":"number"},"error_rate":{"description":"Share of calls that returned an error, between 0 and 1. Timeouts are errors, so they are included here as well as in timeout_rate. Null when no call in the range reported an outcome","maximum":1,"minimum":0,"type":"number"},"success_rate":{"description":"Share of calls that returned without an error, between 0 and 1. Null when no call in the range reported an outcome","maximum":1,"minimum":0,"type":"number"},"thread_count":{"description":"Conversations that called this tool, counted once per day and summed over the range. A conversation that called the tool on three separate days counts three times","type":"integer"},"timeout_rate":{"description":"Share of calls that timed out, between 0 and 1. A subset of error_rate. Null when no call in the range reported an outcome","maximum":1,"minimum":0,"type":"number"},"tool_name":{"description":"The tool these figures cover, as you named it when you registered it. Only tools you supplied are reported","type":"string"}},"required":["thread_count","tool_name"],"type":"object"},"insights.StandardError":{"description":"Standard error response for Meta Business Agent endpoints","properties":{"detail":{"description":"Human-readable explanation of the error","type":"string"},"status":{"description":"HTTP status code","type":"integer"},"title":{"description":"Short, human-readable summary of the problem","type":"string"},"type":{"description":"A URI reference identifying the problem type","type":"string"}},"type":"object"}}},"paths":{"/insights/tool_calls":{"get":{"description":"Retrieve how each of your tools performed over a date range: how many conversations called it, how long it took to respond, and how often it succeeded, failed, or timed out. Only tools you supplied are reported. Figures are rolled up once a day, so the most recent day may still be incomplete.","operationId":"get-tool-call-insights","parameters":[{"description":"Meta Business Agent API version","in":"header","name":"X-API-Version","schema":{"enum":["2.0.0"],"type":"string"}},{"description":"First day to include, as YYYY-MM-DD in the business time zone. The boundary is inclusive.","in":"query","name":"start_date","required":true,"schema":{"type":"string"}},{"description":"Last day to include, as YYYY-MM-DD in the business time zone. The boundary is inclusive. start_date and end_date may span at most 30 days, counting both the first and last day.","in":"query","name":"end_date","required":true,"schema":{"type":"string"}},{"description":"Return only this tool, named as you registered it. Omit to get every tool that was called in the range.","in":"query","name":"tool_name","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.ToolCallInsightsResponse"}}},"description":"The tool call insights for the requested range"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Not found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/insights.StandardError"}}},"description":"Server error"}},"summary":"Get tool call insights","tags":["Insights"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/mba/api-ref/insights/get-tool-call-insights.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
