> For the complete documentation index, see [llms.txt](https://docs.wayfound.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wayfound.ai/agents/connecting-tool-calls.md).

# Connecting Tool Calls

After [Connecting Agents](/agents/connecting-agents.md) to Wayfound, you can also connect tool call information. This allows Wayfound to track tool call success rates in  [Performance](/supervisor/performance.md) reports. You can do so by adding a "tool\_call" event to "messages":

```json
{
    "timestamp": "2025-05-07T10:00:03Z",
    "event_type": "tool_call",
    "label": "Tool Call: FlightService.SearchFlights",
    "description": "Searching for flights from SFO to JFK",
    "attributes": {
        "success": true,
        "tool_name": "FlightService",
        "latency_ms": 120,
        "tool_input": {
          "to": "SFO",
          "from": "JFK",
          "dates": [
            "2025-06-10",
            "2025-06-15"
          ]
        },
        "tool_output": [
          {
            "price": 320,
            "flight_id": "FS123"
          },
          {
            "price": 290,
            "flight_id": "FS456"
          }
        ]
      }
}
```

This will add the following information to the agent's Wayfound session transcript:

<figure><img src="/files/NvHYdHmaByJvtHtavNmN" alt=""><figcaption></figcaption></figure>

Clicking the arrow will reveal the details of the tool call event:

<figure><img src="/files/53hnnFuUqtrZphzf70rU" alt=""><figcaption></figcaption></figure>

Note that tool calls should be logged regardless of success or failure for accurate performance tracking.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wayfound.ai/agents/connecting-tool-calls.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
