sew_displacements
Welds displacement seams in a VMF by pulling matching edge vertices to their shared average position, fixing split geometry before compile.
Instructions
Pulls displacements back together along the edges they share. Two vertices belong together when their undisplaced positions coincide -- the faces share that point whatever either grid has since done to it -- and each group is moved to its average, which is what Hammer's Sew does and what keeps a ridge from being dragged to one side of the join. The check is exact: read_displacements must report no seam afterwards, and it decides adjacency the same way, so it would find any pair this missed.
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": "sew_displacements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .vmf, absolute or relative to the repo root. | |
| backup | No | Copy the file to <file>.bak before writing. Nothing is copied on a no-op. | |
| dryRun | No | Check and report without writing. Every verification runs either way. | |
| confirm | No | Required (true) to run this tool: it writes or executes. | |
| tolerance | No | How close two flat points must be to count as the same one. Default 0.1. Must be positive: zero would group every vertex of the map into one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| written | Yes | ||
| nextStep | Yes | ||
| warnings | Yes | ||
| unchanged | Yes | ||
| backupPath | Yes | ||
| seamsAfter | Yes | ||
| verticesMoved | Yes | ||
| worstGapAfter | Yes | ||
| worstGapBefore | Yes |