Skip to main content
Glama

set_visgroup

Assign brushes to a named visgroup, creating it if needed, or remove them — writes both the declaration and each brush's membership so Hammer keeps the grouping after reopening.

Instructions

Puts brushes in a named visgroup, creating it if it does not exist, or takes them out. This is what gives a selector a durable name: once 'north tenement' is in the file, every later call can say owner or ids without a bounding box typed from memory. Both halves are written -- the declaration in the visgroups block and the membership in each brush's editor block -- because Hammer drops a membership whose visgroup is not declared, without a word, the next time it opens the map. A brush may be in several visgroups at once, which is the normal case and not an error.

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": {
      "path": "<path>",
      "name": "<name>"
    },
    "name": "set_visgroup"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesVisgroup name, as Hammer's tree shows it.
pathYesPath to the .vmf, absolute or relative to the repo root.
colorNoEditor colour, 'r g b'. Default '255 255 255'.
ownerNo'world', or a brush entity classname.
backupNoCopy the file to <file>.bak before writing. Nothing is copied on a no-op.
dryRunNoCheck and report without writing. Every verification runs either way.
removeNoTake the brushes out instead of putting them in.
withinNo
confirmNoRequired (true) to run this tool: it writes or executes.
materialNoBrushes carrying this on at least one face.
solidIdsNo

Output Schema

NameRequiredDescriptionDefault
pathYes
createdYes
writtenYes
nextStepYes
warningsYes
unchangedYes
backupPathYes
visgroupIdYes
solidsChangedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A4.5/5.0
Behavior5/5

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

Annotations carry only a title, so the description bears the full burden and does so well: it explains that both the visgroups declaration and each brush's editor block are written, and that omitting the declaration causes Hammer to silently drop membership. It also preempts a likely misread by stating that multi-visgroup membership is normal, not an error.

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?

The core operation is front-loaded in the first clause, followed by rationale and then the failure-mode warning, which is good ordering. It is a touch discursive in the middle sentence, but every clause — including the multi-membership clarification — carries information an agent would otherwise get wrong.

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

Completeness4/5

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

For an 11-parameter write tool with a nested object and an output schema, the description covers the conceptual model and the main hazard. It leaves the confirm gate, backup default, and color/material semantics to a schema that documents them adequately, so nothing critical is missing.

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 82%, so the baseline is 3; the description adds real meaning by framing the selector parameters as interchangeable targeting options (owner-name or ids) once a visgroup exists. It does not elaborate on color, material, within, or the confirm gate, leaving those entirely to the schema.

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 first sentence gives a specific verb and resource ("Puts brushes in a named visgroup ... or takes them out") and discloses the create-if-missing behavior. It is immediately distinguishable from siblings like set_solid_class or group_solids because it names the exact artifact (visgroup) and its two directions.

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?

It supplies a clear reason to reach for this tool — turning an ephemeral selector into a durable named handle so later calls can pass owner or ids instead of a hand-typed bounding box — which is genuine when-to-use context. It stops short of naming when not to use it or pointing at an alternative sibling, so it does not reach the top band.

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