Skip to main content
Glama

import_audio

Import a local .wav or .ogg file into your FMOD project's audio bin. Specify the file path to add audio assets directly from your local system.

Instructions

Import a local .wav/.ogg into the project's audio bin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler: imports an audio file into FMOD's audio bin by executing JavaScript (studio.project.importAudioFile) via the StudioClient, returning the asset's guid, name, and length.
    async def import_audio(client: StudioClient, file_path: str) -> dict[str, Any]:
        """Import a local audio file into the project's audio bin.
    
        ``studio.project.importAudioFile`` imports to the root of the bin; callers
        can move the asset afterwards if they want it organized into subfolders.
        Returns the new ``AudioFile`` asset's guid and length (seconds).
        """
        js = f"""
            var asset = studio.project.importAudioFile({json.dumps(file_path)});
            if (!asset) throw new Error("FMOD refused to import: " + {json.dumps(file_path)});
            return {{
                guid: asset.id,
                name: asset.name || null,
                length: (typeof asset.length !== 'undefined') ? asset.length : null
            }};
        """
        return await client.eval(js)
  • Registration: the @mcp.tool() decorator registers 'import_audio' on the FastMCP server, exposing it as an MCP tool.
    @mcp.tool()
    async def import_audio(file_path: str) -> dict[str, Any]:
        """Import a local .wav/.ogg into the project's audio bin."""
        return await audio.import_audio(_studio(), file_path)
  • Test confirming 'import_audio' is in the set of expected registered tool names.
    "import_audio",
  • Unit test verifying import_audio sends the absolute file path in the JavaScript call.
    async def test_import_audio_sends_absolute_path(
        client: StudioClient, mock_studio: MockStudio
    ):
        mock_studio.responder = responder_sequence([("OK", {"guid": "x", "name": "a.wav", "length": 1.5})])
        await audio.import_audio(client, "/tmp/a.wav")
        js = _last_sent_js(mock_studio)
        assert "studio.project.importAudioFile" in js
        assert '"/tmp/a.wav"' in js
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It only states that a local file is imported, but omits details such as whether the file is copied or moved, file size limits, permission requirements, or side effects on the project. This is insufficient for safe invocation.

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 that conveys the essential action without any extraneous words. It is front-loaded and efficiently communicates the core function.

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?

Given the tool has one parameter and a likely output schema (implied by context), the description does not mention return values or side effects. For a simple import tool, it provides a basic understanding but lacks details about what happens after import (e.g., whether the file is accessible, naming conflicts). It is adequate but not complete.

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

Parameters3/5

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

The description adds meaning to the 'file_path' parameter by specifying supported formats (.wav/.ogg), which the schema does not. However, it does not explain required path format, file existence checks, or error handling, limiting its value. Schema coverage is 0% so the description partially compensates.

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

Purpose4/5

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

The description clearly states the verb 'Import' and resource 'local .wav/.ogg' into the project's audio bin, specifying the action and target. However, it does not differentiate from sibling tools like 'add_single_sound' or 'create_event' that may also involve audio, reducing clarity.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, exclusions, or compare with siblings, leaving the agent without context for selection.

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