-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmcp_tools_scene.py
More file actions
80 lines (76 loc) · 3.51 KB
/
Copy pathmcp_tools_scene.py
File metadata and controls
80 lines (76 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
"""MCP Tool Group: Scene / Node / Parameters
Knowledge preamble and tool manifest for scene manipulation tools.
Imported by mcp_server.py for knowledge-enriched tool grouping.
"""
# Domain knowledge for agents consuming these tools
GROUP_KNOWLEDGE = (
"SCENE TOOLS: Manipulate the Houdini node graph. "
"Always inspect before mutating -- use synapse_inspect_node or "
"synapse_inspect_scene first. One mutation per tool call. "
"Parameter names on USD/Solaris nodes use encoded format "
"(e.g. xn__inputsintensity_i0a not 'intensity'). "
"Use houdini_get_parm to read, houdini_set_parm to write. "
"Use houdini_layout_network for orientation, focus sections or explicit asset groups; "
"it adds readable labels without renaming or rewiring existing nodes. "
"execute_python wraps in undo group -- automatic rollback on failure. "
"CONTEXT AWARENESS: When creating Solaris/LOP node types (lights, cameras, "
"materials, render settings), parent MUST be /stage."
)
# Tools in this group
TOOL_NAMES = [
"synapse_ping",
"synapse_health",
"synapse_doctor",
"houdini_scene_info",
"houdini_get_selection",
"houdini_create_node",
"houdini_delete_node",
"houdini_connect_nodes",
"houdini_get_parm",
"houdini_set_parm",
"houdini_execute_python",
"houdini_execute_vex",
"synapse_write_report",
"synapse_inspect_selection",
"synapse_inspect_scene",
"synapse_inspect_node",
"houdini_network_explain",
"houdini_layout_network",
"houdini_undo",
"houdini_redo",
"synapse_batch",
"synapse_propose_graph",
"synapse_instantiate_graph",
"synapse_assess_cache",
"synapse_insert_cache",
]
# Dispatch entries for this group
# Map: tool_name -> (synapse_command_type, payload_builder_name)
# Resolved to callables by mcp_server.py at import time.
DISPATCH_KEYS = {
"synapse_ping": ("ping", "passthrough"),
"synapse_health": ("get_health", "passthrough"),
"synapse_doctor": ("doctor", "filter_keys:bundle"),
"houdini_scene_info": ("get_scene_info", "passthrough"),
"houdini_get_selection": ("get_selection", "passthrough"),
"houdini_create_node": ("create_node", "identity"),
"houdini_delete_node": ("delete_node", "filter_keys:node"),
"houdini_connect_nodes": ("connect_nodes", "identity"),
"houdini_get_parm": ("get_parm", "filter_keys:node,parm"),
"houdini_set_parm": ("set_parm", "filter_keys:node,parm,value"),
"houdini_execute_python":("execute_python", "execute_python_payload"),
"houdini_execute_vex": ("execute_vex", "identity"),
"synapse_write_report": ("write_report", "identity"),
"synapse_inspect_selection": ("inspect_selection", "identity"),
"synapse_inspect_scene": ("inspect_scene", "identity"),
"synapse_inspect_node": ("inspect_node", "identity"),
"houdini_network_explain": ("network_explain", "network_explain"),
"houdini_layout_network": ("layout_network", "identity"),
"houdini_undo": ("undo", "passthrough"),
"houdini_redo": ("redo", "passthrough"),
"synapse_batch": ("batch_commands", "identity"),
"synapse_propose_graph": ("propose_graph", "identity"),
"synapse_instantiate_graph": ("instantiate_graph", "identity"),
"synapse_assess_cache": ("assess_cache", "identity"),
"synapse_insert_cache": ("insert_cache", "identity"),
}