Skip to main content
Glama

Emit a sound

sound_emit

Plays a sound once at a world position or from an entity, with controls for pitch, volume, level, DSP, and realm; returns immediately with emission details.

Instructions

Plays a sound once, from a position (global EmitSound) or from an entity (Entity:EmitSound, it follows the entity), on CHAN_AUTO. Pass pos or ent. name is a soundscript name or a path under sound/ (e.g. "ambient/alarms/klaxon1.wav"); error not_found if neither exists. Server realm by default (networked to the client); realm client plays it only locally. Returns at once: {emitted, pos or ent, level, pitch, volume, dsp}. To see what the engine and the hooks received, run sound_trace meanwhile. Example: {"name": "ambient/alarms/klaxon1.wav", "pos": [0, 0, 64], "level": 90}. Needs a loaded map (map_load): the server and client realms do not exist at the main menu.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "sound_emit"
  }
}

Input Schema

NameRequiredDescriptionDefault
dspNoDSP preset, default 0.
entNoEntity index to play it from (or pos).
posNoWhere to play it, [x, y, z] in Hammer units (or ent).
nameYesSoundscript name or path relative to sound/.
levelNoSound level in dB, default 75.
pitchNoDefault 100.
realmNoRealm (default server).
volumeNoDefault 1.
instanceNoOptional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance.

Output Schema

NameRequiredDescriptionDefault
dspNo
entNo
posNo
nextNo
noteNo
levelNo
pitchNo
volumeNo
emittedYes
warningNo
next_callNo
answered_byNo
truncated_noteNo
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only state non-open-world and non-destructive; the description goes much further by disclosing that the call returns at once (fire-and-forget), the shape of the return object, the networking semantics of each realm, and the not_found error when neither a soundscript nor a file path exists. This is behavior an agent could not infer from the annotations or schema.

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

Conciseness4/5

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

Dense and front-loaded: mode, arguments, realm, return, verification tool, example, and prerequisite in a tight sequence. It is a long single paragraph and the example plus return-shape listing push toward the verbose side, but nearly every clause carries information.

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

Completeness5/5

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

For a 9-parameter tool with both a return schema and a real environmental precondition, the description covers the missing pieces an agent needs: map must be loaded, realm networking behavior, error case, and how to verify with sound_trace. Nothing needed to invoke it correctly is absent.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3, but the description adds genuine meaning: pos and ent are alternatives ("Pass pos or ent"), name is a soundscript name or a sound/-relative path with a concrete example, and the default realm is server. It does not re-explain level/pitch/volume/dsp beyond what the schema documents.

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?

States a specific verb and resource ("Plays a sound once") and immediately distinguishes the two invocation modes: global EmitSound from a position versus Entity:EmitSound which follows an entity. It even names the channel (CHAN_AUTO), so an agent can identify exactly what this does relative to siblings like sound_trace.

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?

Gives clear operating conditions: pass pos or ent, server realm by default versus client-only local playback, and the hard prerequisite of a loaded map via map_load. It also routes the agent to sound_trace for observing what the engine received. No explicit when-not-to-use case, but the constraints are concrete and actionable.

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