discover

discover is a command for coding agents from Azure/ai-gateway. It costs 21 tokens per session (522 once invoked), scanned A, original, MIT.

A read-only command for exploring the models and MCP tool servers registered in an AI Gateway. MCP is a standard way for applications to connect to external tools.

In plain words
What is it for?
Use it to inspect a specific Azure AI Gateway and compare its available models and tool servers with your use case.
Why use it?
It helps identify which AI models and tools are available before any code is written or resources are changed.

Command

Part of the ai-gateway plugin — 1 skill, 2 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/azure/ai-gateway/discover
Clone the repo
git clone --depth 1 https://github.com/Azure/ai-gateway

Or install ai-gateway, the plugin that ships this one along with the rest of its 1 skill, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for discover

README.md
[![agentmods](https://agentmods.dev/badge/commands/azure/ai-gateway/discover.svg)](https://agentmods.dev/commands/azure/ai-gateway/discover)
Your own site
<a href="https://agentmods.dev/commands/azure/ai-gateway/discover"><img src="https://agentmods.dev/badge/commands/azure/ai-gateway/discover.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 522 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.00522
Opus 5 $0.00010 $0.00261
Sonnet 5 $0.00004 $0.00104
Haiku 4.5 $0.00002 $0.00052

Measured 4d ago against content hash fd2234f1bcfd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

discover scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/discover.md · 37 lines

What it actually says

/ai-gateway:discover

Discover — and only discover — the AI assets registered in an AI Gateway. This is a read-only exploration command: it lists models and MCP tool servers and helps the user pick the ones that match their intent. It never provisions, updates, or deletes anything, and it does not scaffold code (use /ai-gateway:build for that).

Follow the discovery workflow defined in the bundled skill skills/use-ai-gateway/SKILL.md — specifically Part 1 — Discover & select assets:

  1. Determine the target gateway from $ARGUMENTS if provided. Discovery goes through the ARM control plane, so you need the gateway's ARM gatewayResourceId — a runtime host alone is not enough to list assets. If only a host is given, resolve the id (az resource list --name <name>) or ask the user. If the target is missing or ambiguous, ask before making any call. The gateway is a Microsoft.ApiManagement/service or Microsoft.ApiManagement/aigateways resource; both work identically.
  2. List the models in the gateway workspace and read each model's properties.deployment.modelName (the exact identifier accepted by the OpenAI passthrough — prefer it over the ARM name or displayName).
  3. List the MCP tool servers, build each MCP endpoint URL as https://{gateway-host}/default/toolservers/{toolServerName}/mcp (the /default/ workspace segment is required), and verify each server actually exposes tools via a full initializenotifications/initializedtools/list MCP handshake (carry the Mcp-Session-Id from initialize). Read the runtime host from the resource's properties.gatewayUrl.
  4. Present a clear, grouped summary: models (id + description) and tool servers (name + endpoint + tool count), highlighting the best matches for the user's stated use case. Then ask which assets they want to use.

Stop after presenting the assets. Do not retrieve credentials or generate code unless the user explicitly asks to continue (or runs /ai-gateway:build).

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 37 lines · 21 tokens per session scan A fd2234f1bcfd

Subscribe to this mod's changes

discover is a command published in the GitHub repository Azure/ai-gateway (3 stars, last pushed 7d ago), licensed MIT. It adds 21 tokens to every session and 522 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.