Skip to content

Commit 9e6eb9a

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 894f793 commit 9e6eb9a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/threejs-server/server.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,13 @@ function createServer(): McpServer {
178178
},
179179
);
180180

181-
// Tool 2: learn_threejs
182-
registerAppTool(
183-
server,
181+
// Tool 2: learn_threejs (not a UI tool, just returns documentation)
182+
server.registerTool(
184183
"learn_threejs",
185184
{
186185
title: "Learn Three.js",
187186
description:
188187
"Get documentation and examples for using the Three.js widget",
189-
inputSchema: {},
190188
},
191189
async () => {
192190
return {

0 commit comments

Comments
 (0)