Skip to content

Commit 375c858

Browse files
ochafikclaude
andcommitted
fix(threejs-server): use server.registerTool for non-UI tool
The learn_threejs tool doesn't have a UI component - it only returns documentation text. Using registerAppTool without _meta causes a runtime error when the function tries to access config._meta.ui. Fixes crash: "Cannot read property 'ui' of undefined" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ba9ac98 commit 375c858

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/threejs-server/server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ function createServer(): McpServer {
173173
},
174174
);
175175

176-
// Tool 2: learn_threejs
177-
registerAppTool(
178-
server,
176+
// Tool 2: learn_threejs (not a UI tool, just returns documentation)
177+
server.registerTool(
179178
"learn_threejs",
180179
{
181180
title: "Learn Three.js",

0 commit comments

Comments
 (0)