# Build the URL before the agent.

> If Postman fails, the agent will too.

- **Format:** short video, 9 steps, ~51 seconds
- **Topic:** Building an ASP.NET Core Minimal API over SQL Server for a Microsoft Foundry agent: test the URL in Postman first, because the agent is only a caller that picks the parameters a person would have typed.
- **Author:** Suthahar Jegatheesan (MSDEVBUILD)
- **Category:** Azure · Azure
- **Published:** 2026-04-28
- **Tags:** microsoftfoundry, azureai, aiagents, dotnet, flutter, azure, aicoding, msdevbuild
- **Canonical URL:** https://blog.msdevbuild.com/shorts/foundry-build-the-url-before-the-agent/

---
## What you'll learn

- Why the API comes before the agent
- What the agent actually does in a call
- Why a wrong URL looks like an AI bug

## Understand it one step at a time

### 1. The least glamorous moment

A URL, a few query parameters, a Send button.

### 2. Eleven milliseconds

Three dishes, spicy, none over RM20. The system works.

### 3. Who did the work?

A person knew maxPrice, not priceLimit, and the exact path.

### 4. The agent is a caller

It picks the parameters you would have typed, and reads the JSON you would have read.

### 5. But the API was missing

The reference app reads its menu on the client. No server, nothing to call.

### 6. Build it, step by step

Minimal API, EF Core, a migration, seed data, one test per method.

### 7. Postman first

If the URL is wrong, the failure arrives dressed as an AI problem.

### 8. Then hand it over

One function tool, one schema. The agent turns a sentence into the same call.

### 9. Build the URL first, then the agent

A wrong URL fails dressed as an AI problem, the most expensive kind of bug.

---

## The takeaway

**Build the URL first. Then the agent.**

A Foundry agent picks the parameters you would have typed and reads the JSON you would have read.
