list_banks
Retrieve all banks from the currently open FMOD project to inventory and manage audio assets.
Instructions
List every bank in the currently open project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- fmod_mcp/tools/discovery.py:21-27 (handler)The actual implementation of list_banks. Uses FMOD Studio's JavaScript eval to call studio.project.model.Bank.findInstances(), filters valid banks, and maps each to {path, guid, name}.
async def list_banks(client: StudioClient) -> list[dict[str, str]]: js = """ return studio.project.model.Bank.findInstances() .filter(function(b) { return b.isValid; }) .map(function(b) { return { path: b.getPath(), guid: b.id, name: b.name }; }); """ return await client.eval(js) - fmod_mcp/server.py:41-44 (registration)The MCP tool registration using @mcp.tool() decorator. Exposes list_banks as an MCP tool with description 'List every bank in the currently open project.' Delegates to discovery.list_banks(_studio()).
@mcp.tool() async def list_banks() -> list[dict[str, str]]: """List every bank in the currently open project.""" return await discovery.list_banks(_studio()) - fmod_mcp/server.py:42-42 (schema)Return type schema: list[dict[str, str]] — each bank is a dict with path, guid, and name string fields.
async def list_banks() -> list[dict[str, str]]: - tests/test_server_registration.py:9-42 (registration)Test file that verifies list_banks is registered as an expected tool in the FastMCP server tool registry.
"list_banks", "list_events", "list_buses", "get_event", # audio + events "import_audio", "create_event", "add_single_sound", "set_event_property", "assign_to_bank", "assign_to_bus", # effects "list_effect_types", "add_effect", "list_effects", "get_effect", "set_effect_param", "remove_effect", "bypass_effect", # project "save_project", "build_banks", # escape "run_js", } def test_all_tools_registered(): tools = set(mcp._tool_manager._tools.keys()) missing = EXPECTED_TOOLS - tools extra = tools - EXPECTED_TOOLS assert not missing, f"Missing tools: {missing}" assert not extra, f"Unexpected extra tools: {extra}" - tests/test_tools.py:37-41 (helper)Unit test exercising the list_banks handler directly against the discovery module, verifying the correct JS findInstances call is made.
js = _last_sent_js(mock_studio) assert "studio.version" in js async def test_list_banks_uses_find_instances(