TL;DR: Databases in Milvus are exact names too. List them with `milvus_list_databases`, switch with the exact name via `milvus_use_database`, and set `MILVUS_DB` to it for future sessions.

```text
Database not found: analytics
```

## Fix it

1. List the databases:

```json
{ "name": "milvus_list_databases", "arguments": {} }
```

   Expected: the real database names, usually starting with `default`.

2. Switch to the right one:

```json
{ "name": "milvus_use_database", "arguments": { "database": "analytics" } }
```

   Use the exact name from step 1.

3. To make it stick across restarts, set it in the client config:

```json
{
  "env": {
    "MILVUS_DB": "analytics"
  }
}
```

4. Restart the MCP client.

   Expected: collections in that database become visible.

## When to use this

- `milvus_use_database` fails with database not found.
- Collections you know exist are invisible (you are in `default`, they are elsewhere).

## When NOT to use this

- Collection not found within the right database. That is the collection name.
- Connection or auth errors. Fix those first.

## Compatibility

- zilliztech/mcp-server-milvus (milvus_list_databases, milvus_use_database, MILVUS_DB).
- Milvus 2.4+ (named databases). Milvus Lite ignores named databases.

## Why it happens

Named databases are a newer Milvus feature, and most examples still use `default`. Data loaded by another tool into a named database is invisible from `default`, which reads exactly like missing data until you switch.

## Edge cases

- Database names are case-sensitive.
- The `default` database always exists. If in doubt, check there first.
- Users need privileges on the database, not just the instance. A 403 after switching is a grants problem.