remove_effect
Remove an audio effect from its processing chain by providing the effect's GUID.
Instructions
Remove an effect from its chain.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| effect_guid | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- fmod_mcp/tools/effects.py:268-280 (handler)Core handler: executes FMOD Studio script that finds an effect by GUID using _FIND_EFFECT_HELPER JS helper, calls deleteObject(hit.effect) to remove it from its chain, and returns {removed, guid, type, target_path}.
async def remove_effect(client: StudioClient, effect_guid: str) -> dict[str, Any]: js = ( _FIND_EFFECT_HELPER + f""" var hit = __mcp_findEffect({json.dumps(effect_guid)}); if (!hit) throw new Error("Effect not found for guid: " + {json.dumps(effect_guid)}); var path = hit.target_path; var type = hit.effect.entity; studio.project.deleteObject(hit.effect); return {{ removed: true, guid: {json.dumps(effect_guid)}, type: type, target_path: path }}; """ ) return await client.eval(js) - fmod_mcp/server.py:169-172 (registration)Tool registration: decorated with @mcp.tool() exposing the tool to MCP clients. Calls effects.remove_effect with the studio client.
@mcp.tool() async def remove_effect(effect_guid: str) -> dict[str, Any]: """Remove an effect from its chain.""" return await effects.remove_effect(_studio(), effect_guid) - fmod_mcp/tools/effects.py:101-143 (helper)JavaScript helper _FIND_EFFECT_HELPER: walks all bus effect chains (master + descendants) and all event tracks (master + group) to locate an effect by GUID. Used by remove_effect and other effect tools.
_FIND_EFFECT_HELPER = r""" function __mcp_findEffect(guid) { function scanChain(chain, target_path) { if (!chain || !chain.effects) return null; for (var j = 0; j < chain.effects.length; j++) { if (chain.effects[j].id === guid) { return { effect: chain.effects[j], chain: chain, index: j, target_path: target_path }; } } return null; } /* Master bus + descendant buses (walk mixer tree) */ function walkBus(bus) { if (!bus || !bus.isValid) return null; var hit = scanChain(bus.effectChain, bus.getPath()); if (hit) return hit; var rel = bus.relationships && bus.relationships.items; var children = rel && rel.destinations; if (children) for (var i = 0; i < children.length; i++) { var h = walkBus(children[i]); if (h) return h; } return null; } var hit = walkBus(studio.project.workspace.mixer.masterBus); if (hit) return hit; /* All event tracks */ var events = studio.project.model.Event.findInstances(); for (var i = 0; i < events.length; i++) { if (!events[i].isValid) continue; var tracks = [events[i].masterTrack]; if (events[i].groupTracks) for (var t = 0; t < events[i].groupTracks.length; t++) tracks.push(events[i].groupTracks[t]); for (var t = 0; t < tracks.length; t++) { if (!tracks[t]) continue; var mg = tracks[t].mixerGroup; if (!mg || !mg.effectChain) continue; var label = events[i].getPath() + (t === 0 ? "#track=master" : "#track=" + (t-1)); var h = scanChain(mg.effectChain, label); if (h) return h; } } return null; }