# Tool descriptions are routing.

> Say when a tool does not apply.

- **Format:** short video, 9 steps, ~51 seconds
- **Topic:** Function tools for a Microsoft Foundry agent in ASP.NET Core: tool descriptions are routing logic, the run loop executes calls, errors come back as data, and a round cap stops it looping.
- **Author:** Suthahar Jegatheesan (MSDEVBUILD)
- **Category:** Azure · Azure
- **Published:** 2026-05-14
- **Tags:** microsoftfoundry, azureai, aiagents, dotnet, flutter, azure, aicoding, msdevbuild
- **Canonical URL:** https://blog.msdevbuild.com/shorts/foundry-tool-descriptions-are-routing/

---
## What you'll learn

- Why descriptions decide which tool runs
- How the run loop works
- Why a round cap matters

## Understand it one step at a time

### 1. No way to the price

The agent refused to invent a price, and had no tool to look one up.

### 2. Too many tools

The first version had too many, and the model kept picking the wrong one.

### 3. Nine survive

Nine tools, each a thin wrapper over a tested service method.

### 4. When NOT to use it

The change that fixed most wrong-tool calls: a sentence saying when the tool does not apply.

### 5. The run loop

Response asks for a tool, the executor runs it, outputs go back.

### 6. Errors as data

A tool failure returns a structured error the model can read, not an exception.

### 7. Cap the rounds

Past the cap, stop and tell the user. Never loop forever.

### 8. Trim the output

Return the fields the answer needs, not the whole row.

### 9. Descriptions route, caps stop loops

Errors as data, trimmed output, and a hard limit on tool rounds.

---

## The takeaway

**Descriptions route. Caps stop loops.**

The single change that fixed most wrong-tool calls was one sentence saying when the tool does not apply.
