editor.metasound

Ten methods covering UE's MetaSound procedural audio pipeline -- asset discovery, source and patch builder lifecycle, I/O pin introspection, and interface registry queries. AI agents reach through this namespace to create and wire MetaSound graphs without opening the MetaSound editor.

← API Reference

Requires: the MetaSound plugin (enabled by default on stock UE). If not enabled, all methods return -32001 NotFound with guidance to enable MetaSound in Edit > Plugins.

Method summary

Method Mutating Tier Purpose
listAssetsnoFreeFind all MetaSound source assets in the project.
getInfonoFreePer-asset introspection: input/output counts, interfaces, preset flag.
createSourceyesFreeCreate and register a MetaSound source builder.
createPatchyesFreeCreate and register a MetaSound patch builder.
findBuildernoFreeLook up a registered builder by name.
unregisterBuilderyesFreeUnregister a named builder.
getRegisteredBuildersnoFreeList all registered builders via the asset registry.
getInputsnoFreeGraph input pins of a registered builder.
getOutputsnoFreeGraph output pins of a registered builder.
isInterfaceRegisterednoFreeCheck whether a MetaSound interface is registered in the system.

editor.metasound.listAssets

Find all MetaSound source assets in the project, optionally filtered to a package path.

Parameters:

NameTypeRequiredDescription
path_filterstringNoPackage path filter (e.g. /Game/Audio).

Returns:

FieldTypeDescription
assetsarrayEach: {name, path, class, packagePath}.
countnumberNumber of MetaSound assets found.

Example Request:

{ "jsonrpc": "2.0", "id": 1, "method": "editor.metasound.listAssets", "params": {} }

Example Response:

{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "assets": [
      { "name": "MSS_PlayRandom_Loop", "path": "/Metasound/DefaultAssets/Sources/MSS_PlayRandom_Loop.MSS_PlayRandom_Loop", "class": "MetaSoundSource", "packagePath": "/Metasound/DefaultAssets/Sources/MSS_PlayRandom_Loop" }
    ],
    "count": 1
  }
}

editor.metasound.getInfo

Return per-asset metadata and introspection: whether the asset implements the MetaSound document interface, builder attachability, preset flag, input/output counts, and declared interfaces.

Parameters:

NameTypeRequiredDescription
asset_pathstringYesFull asset path to a MetaSound source.

Returns:

FieldTypeDescription
asset_namestringAsset name.
classstringUE class name.
pathstringAsset path.
is_metasoundboolWhether the asset implements the MetaSound document interface.
has_builderboolWhether a builder could be attached.
is_presetboolWhether the asset is a preset (if a builder is attached).
input_countnumberNumber of graph inputs.
output_countnumberNumber of graph outputs.
interfacesarrayDeclared MetaSound interface names.

Example Request:

{
  "jsonrpc": "2.0", "id": 2,
  "method": "editor.metasound.getInfo",
  "params": { "asset_path": "/Metasound/DefaultAssets/Sources/MSS_PlayRandom_Loop.MSS_PlayRandom_Loop" }
}

Example Response:

{
  "jsonrpc": "2.0", "id": 2,
  "result": {
    "asset_name":   "MSS_PlayRandom_Loop",
    "class":        "MetaSoundSource",
    "path":         "/Metasound/DefaultAssets/Sources/MSS_PlayRandom_Loop.MSS_PlayRandom_Loop",
    "is_metasound": true,
    "has_builder":  true,
    "is_preset":    false,
    "input_count":  3,
    "output_count": 2,
    "interfaces":   ["MetaSound", "MetaSoundSource"]
  }
}

editor.metasound.createSource

Create and register a new MetaSound source builder. The returned builder_name is the handle used by every other builder method in this namespace.

Parameters:

NameTypeRequiredDescription
namestringYesBuilder name.
formatstringNoAudio format: mono (default) or stereo.
one_shotboolNoWhether the source is one-shot. Default false.

Returns:

FieldTypeDescription
builder_namestringRegistered builder name.
successboolWhether creation succeeded.
formatstringAudio output format.
one_shotboolOne-shot flag.
audio_output_countnumberNumber of audio output pins.

Example Request:

{
  "jsonrpc": "2.0", "id": 3,
  "method": "editor.metasound.createSource",
  "params": { "name": "MySource", "format": "stereo" }
}

Example Response:

{
  "jsonrpc": "2.0", "id": 3,
  "result": { "builder_name": "MySource", "success": true, "format": "stereo", "one_shot": false, "audio_output_count": 2 }
}

editor.metasound.createPatch

Create and register a new MetaSound patch builder.

Parameters:

NameTypeRequiredDescription
namestringYesBuilder name.

Returns: { builder_name, success }.

Example Request:

{ "jsonrpc": "2.0", "id": 4, "method": "editor.metasound.createPatch", "params": { "name": "MyPatch" } }

Example Response:

{ "jsonrpc": "2.0", "id": 4, "result": { "builder_name": "MyPatch", "success": true } }

editor.metasound.findBuilder

Look up a registered builder by name. Safely probes for existence before calling other builder methods.

Parameters:

NameTypeRequiredDescription
namestringYesBuilder name to find.

Returns:

FieldTypeDescription
foundboolWhether the builder was found.
namestringBuilder name echo.
builder_classstringUE class name if found.
is_sourceboolWhether it is a source builder.
is_patchboolWhether it is a patch builder.
is_presetboolWhether it is a preset builder.

Example Request:

{ "jsonrpc": "2.0", "id": 5, "method": "editor.metasound.findBuilder", "params": { "name": "MySource" } }

Example Response:

{
  "jsonrpc": "2.0", "id": 5,
  "result": { "found": true, "name": "MySource", "builder_class": "MetaSoundSourceBuilder", "is_source": true, "is_patch": false, "is_preset": false }
}

editor.metasound.unregisterBuilder

Unregister a named builder from the subsystem.

Parameters:

NameTypeRequiredDescription
namestringYesBuilder name to unregister.

Returns: { success, name }.

Example Request:

{ "jsonrpc": "2.0", "id": 6, "method": "editor.metasound.unregisterBuilder", "params": { "name": "MySource" } }

Example Response:

{ "jsonrpc": "2.0", "id": 6, "result": { "success": true, "name": "MySource" } }

editor.metasound.getRegisteredBuilders

List every registered named builder discoverable through the asset registry.

No parameters.

Returns:

FieldTypeDescription
buildersarrayEach: {name, class, is_source, is_patch}.
countnumberNumber of builders found.

Example Request:

{ "jsonrpc": "2.0", "id": 7, "method": "editor.metasound.getRegisteredBuilders", "params": {} }

Example Response:

{
  "jsonrpc": "2.0", "id": 7,
  "result": {
    "builders": [
      { "name": "MySource", "class": "MetaSoundSourceBuilder", "is_source": true,  "is_patch": false },
      { "name": "MyPatch",  "class": "MetaSoundPatchBuilder",  "is_source": false, "is_patch": true  }
    ],
    "count": 2
  }
}

editor.metasound.getInputs

Return graph input pins of a registered builder.

Parameters:

NameTypeRequiredDescription
namestringYesBuilder name.

Returns:

FieldTypeDescription
inputsarrayEach: {name, data_type}.
countnumberNumber of inputs.
builder_namestringEcho of the input name.

Example Request:

{ "jsonrpc": "2.0", "id": 8, "method": "editor.metasound.getInputs", "params": { "name": "MySource" } }

Example Response:

{
  "jsonrpc": "2.0", "id": 8,
  "result": {
    "inputs": [
      { "name": "Frequency", "data_type": "Float" },
      { "name": "Trigger",   "data_type": "Trigger" }
    ],
    "count": 2,
    "builder_name": "MySource"
  }
}

editor.metasound.getOutputs

Return graph output pins of a registered builder.

Parameters:

NameTypeRequiredDescription
namestringYesBuilder name.

Returns: { outputs: [{name, data_type}], count, builder_name }.

Example Request:

{ "jsonrpc": "2.0", "id": 9, "method": "editor.metasound.getOutputs", "params": { "name": "MySource" } }

Example Response:

{
  "jsonrpc": "2.0", "id": 9,
  "result": {
    "outputs": [
      { "name": "OutAudioLeft",  "data_type": "Audio" },
      { "name": "OutAudioRight", "data_type": "Audio" }
    ],
    "count": 2,
    "builder_name": "MySource"
  }
}

editor.metasound.isInterfaceRegistered

Check whether a MetaSound interface is registered in the system.

Parameters:

NameTypeRequiredDescription
interface_namestringYesInterface name (e.g. MetaSound).

Returns: { registered, interface_name }.

Example Request:

{ "jsonrpc": "2.0", "id": 10, "method": "editor.metasound.isInterfaceRegistered", "params": { "interface_name": "MetaSound" } }

Example Response:

{ "jsonrpc": "2.0", "id": 10, "result": { "registered": true, "interface_name": "MetaSound" } }

Related