Skip to main content
Glama

list_effects

List audio effects applied to a bus or event-track chain, excluding the built-in fader. Specify the target path to retrieve the effects.

Instructions

List effects on a bus or event-track chain (excludes the built-in fader).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core implementation of list_effects: builds a JS snippet that iterates over the target's effectChain, filters out the built-in MixerBusFader, and returns guid/type/position/bypass for each effect.
    async def list_effects(client: StudioClient, target_path: str) -> list[dict[str, Any]]:
        """List every effect on the target's chain (skips the built-in bus fader)."""
        chain_expr = _chain_expr(target_path)
        js = f"""
            var chain = {chain_expr};
            var out = [];
            for (var i = 0; i < chain.effects.length; i++) {{
                var e = chain.effects[i];
                if (e.entity === "MixerBusFader") continue;
                out.push({{
                    guid: e.id,
                    type: e.entity,
                    position: i,
                    bypass: !!e.bypass
                }});
            }}
            return out;
        """
        return await client.eval(js)
  • MCP tool registration using @mcp.tool() decorator, delegates to effects.list_effects() with the lazy singleton StudioClient.
    @mcp.tool()
    async def list_effects(target_path: str) -> list[dict[str, Any]]:
        """List effects on a bus or event-track chain (excludes the built-in fader)."""
        return await effects.list_effects(_studio(), target_path)
  • The function signature defines the input schema: target_path (str) -> list[dict[str, Any]]. The output dicts contain guid, type, position, bypass.
    async def list_effects(client: StudioClient, target_path: str) -> list[dict[str, Any]]:
        """List every effect on the target's chain (skips the built-in bus fader)."""
        chain_expr = _chain_expr(target_path)
        js = f"""
            var chain = {chain_expr};
            var out = [];
            for (var i = 0; i < chain.effects.length; i++) {{
                var e = chain.effects[i];
                if (e.entity === "MixerBusFader") continue;
                out.push({{
                    guid: e.id,
                    type: e.entity,
                    position: i,
                    bypass: !!e.bypass
                }});
            }}
            return out;
        """
        return await client.eval(js)
  • _split_target and _chain_expr helpers: parse target_path into canonical path + track selector, and generate a JS expression that resolves to the target's effectChain. Used by list_effects to build the JS query.
    def _split_target(target_path: str) -> tuple[str, str]:
        """Returns ``(canonical_path, track_selector)`` where track_selector is
        ``""`` for a bus, or ``master``/``<index>``/``<name>`` for an event."""
        if "#track=" in target_path:
            path_part, _, track_part = target_path.partition("#track=")
            return path_part, track_part
        return target_path, "master" if target_path.startswith("event:/") else ""
    
    
    def _chain_expr(target_path: str) -> str:
        """Returns a JS expression that evaluates to the target's effect chain."""
        canonical, track = _split_target(target_path)
        canonical_json = json.dumps(canonical)
        if canonical.startswith("bus:/"):
            return (
                "(function(){"
                f"var bus=studio.project.lookup({canonical_json});"
                f'if(!bus)throw new Error("Bus not found: "+{canonical_json});'
                'if(!bus.effectChain)throw new Error("Object has no effectChain");'
                "return bus.effectChain;"
                "})()"
            )
        if canonical.startswith("event:/"):
            track_json = json.dumps(track)
            return (
                "(function(){"
                f"var evt=studio.project.lookup({canonical_json});"
                f'if(!evt)throw new Error("Event not found: "+{canonical_json});'
                f"var sel={track_json};"
                "var track=null;"
                'if(sel==="master")track=evt.masterTrack;'
                "else{var idx=parseInt(sel,10);"
                "if(!isNaN(idx)&&String(idx)===sel){"
                'if(!evt.groupTracks||idx<0||idx>=evt.groupTracks.length)throw new Error("Group track index out of range: "+sel);'
                "track=evt.groupTracks[idx];"
                "}else{"
                "if(evt.groupTracks)for(var i=0;i<evt.groupTracks.length;i++){"
                "if(evt.groupTracks[i].name===sel){track=evt.groupTracks[i];break;}}"
                'if(!track)throw new Error("Group track not found by name: "+sel);}}'
                'if(!track.mixerGroup||!track.mixerGroup.effectChain)throw new Error("Track has no effectChain");'
                "return track.mixerGroup.effectChain;"
                "})()"
            )
        raise ValueError(f"target_path must start with 'bus:/' or 'event:/', got: {target_path!r}")
  • Test confirming 'list_effects' is registered as an expected tool in the MCP server.
    EXPECTED_TOOLS = {
        # discovery
        "ping",
        "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",
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states the listing action without disclosing behavioral traits such as permissions, limits, sorting, or whether it returns full effect details or just names. The output schema may cover return structure, but description lacks this context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no redundancy; it efficiently conveys the core purpose and a key exclusion. Front-loaded and concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing tool with one parameter and an output schema, the description covers the basic operation but fails to explain the required parameter or any behavioral nuances, leaving gaps that the output schema cannot fully compensate for.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description adds no meaning for the only parameter (target_path). The description does not explain what path is expected (e.g., bus vs. event-track, format), leaving the agent to guess.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies 'list' as the verb and 'effects' as the resource, adding scope ('on a bus or event-track chain') and an exclusion ('excludes the built-in fader'), clearly distinguishing it from siblings like get_effect or list_effect_types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about what is listed (effects on bus/event-track chains) and what is excluded, but does not explicitly state when to use this tool versus alternatives like add_effect or bypass_effect, nor provide when-not scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jmperez127/fmod-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server