> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thecontextcompany.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools and models

> Analyze which tools and models your agent uses, how often they fail, and how they contribute to cost, latency, and failures.

Tools and models are first-class analytical dimensions. Every [tool call](/concepts#tool-calls) and every [model step](/concepts#steps) is captured with its arguments, results, latency, and cost, so you can rank, filter, and investigate at the tool or model level.

## Tools

The Context Company records every tool invocation the agent makes: the tool name, the arguments passed, the result returned, whether it succeeded or errored, and its latency.

### What you can analyze

* Which tools are called most frequently.
* Which tools have the highest error rate.
* Which recurring [failures](/analyze/failures) involve a particular tool.
* Which arguments were passed to a specific tool over a time range.
* What results the tool returned, including for failing runs.
* Which tools contribute most to latency.
* Which tool sequences commonly precede an error or negative feedback.

### API and MCP

```bash theme={null}
GET /v1/tools?range=2w
```

Returns a breakdown of tool usage. See the [API reference](/access-data/api#tools).

MCP calls like `get_agent_runs` accept `failureContains` and `onlyErrored`, so you can pull runs where a specific tool failed directly into your coding agent's context.

### Example questions

> Which tool is responsible for the most failed runs in the last week?

> Find runs where the `search` tool returned an empty result and the agent still produced a confident answer.

> What arguments were passed to `issueRefund` in the runs that errored?

## Models

Model steps record which model was used, the input and output tokens, the resulting cost, latency, and any error at the step level.

### What you can analyze

* Models used, aggregated by run count, tokens, and cost.
* Cost and token usage per model over time.
* Latency per model.
* Error rate per model where measurable.
* Comparisons between models on the same task.
* Filter any other analysis to a specific model.

### API

```bash theme={null}
GET /v1/models?range=2w
```

Returns a breakdown of model usage. See the [API reference](/access-data/api#models).

### Example questions

> How have my costs shifted between models this month?

> Which models are slowest on multi-turn conversations over 5 messages?

> Did failure rate increase after we switched to `gpt-4o-mini` on the `summarize` step?

## Tools and models in Insight Search

Because tool and model dimensions are indexed as native columns, Insight Search can join them freely with any other dimension:

> Find runs where the `search` tool was called after the `summarize` tool, on `gpt-4o`, for organizations on the enterprise plan, where the final response didn't answer the user's question.

## Limitations

* Arguments and results are captured as recorded by the instrumentation. If your framework does not expose a tool's arguments (rare), that field will be empty for those calls.
* Model-level cost depends on the framework surfacing token counts. All supported frameworks do; custom instrumentation is responsible for reporting tokens.

## Related

<CardGroup cols={2}>
  <Card title="Traces" icon="diagram-project" href="/investigate/traces">
    See tool and model behavior inside a single run.
  </Card>

  <Card title="Failures" icon="triangle-exclamation" href="/analyze/failures">
    Runtime errors grouped, including tool-call errors.
  </Card>

  <Card title="Insight Search" icon="comment-question" href="/analyze/insight-search">
    Ask cross-dimensional questions about tools and models.
  </Card>

  <Card title="What TCC captures" icon="database" href="/what-tcc-captures">
    The exact fields recorded per tool call and model step.
  </Card>
</CardGroup>
