---
title: "Execute agent-tool-selection-quality evaluator"
method: POST
path: "/v2/evaluators/agent-tool-selection-quality/execute"
tags: ["evaluators"]
---

# Execute agent-tool-selection-quality evaluator

`POST /v2/evaluators/agent-tool-selection-quality/execute`

Evaluate whether the agent selected the most appropriate tool(s) for the task at hand

**Request Body:**
- `input.input_messages` (array of objects, required): The agent's input messages — system prompt + conversation history as a JSON array of message objects (`role`, `content`, optional `tool_calls`, etc.)
- `input.output_messages` (array of objects, required): The agent's output messages for this step as a JSON array of message objects (may contain tool calls or plain text)

## Request body

- RequestAgentToolSelectionQualityRequest
  - `input` RequestAgentToolSelectionQualityInput, required
    - `input_messages` string, required
    - `output_messages` string, required

## Response `200`

OK

- ResponseAgentToolSelectionQualityResponse
  - `correct_args` boolean
  - `correct_args_reason` string
  - `tool_selection` string
  - `tool_selection_reason` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/traceloop/apis/traceloop-api.md) · [All operations](https://skmtc.net/traceloop/apis/traceloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/traceloop/traceloop-api/versions/9c12a04a5947/schema)
