List or search Indian bank codes and names
bank_directoryLook up the official 4-letter bank code for a bank by name, or list banks. Use before IFSC lookup when only a bank name is given.
Instructions
Look up the official 4-letter bank code for a bank, or list banks by name.
Every IFSC begins with a 4-letter bank code, and this is the tool that maps
"HDFC Bank" -> "HDFC". Use it before ifsc_lookup or search_branches when
the user gave a bank name rather than a code.
Returns ok: true with: banks (list of {"code", "name"}), count (total
matches) and source (the upstream dataset URL).
Data comes from the published razorpay/ifsc dataset and is cached, so
repeated calls are cheap. This returns banks, not branches - use
search_branches or ifsc_lookup for a specific branch.
Args: query: Substring filter over code and name; omit for the full list. limit: Max rows, 1-500 (default 50, or 500 with no query).
Returns: Matching bank codes and names, or a structured error payload.
Example: Ask "what is the code for Kotak Mahindra?" -> call bank_directory(query="kotak") and read banks[0]["code"].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max banks to return, 1-500. Defaults to 50, or 500 with no query. | |
| query | No | Optional case-insensitive fragment matched against both the 4-letter code and the full bank name, e.g. 'hdfc', 'kotak', 'state bank', 'cooperative'. Omit to list every bank (1511+). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||