9f2fd266 by Ean Schuessler

Fix critical nested result structure in tools/call - remove incorrect result.result nesting

- tools/call was incorrectly nesting ScreenAsMcpTool result: result.result = [content: ...]
- ScreenAsMcpTool already returns correct structure: result = [content: ...]
- Creates nested result.result.result which breaks MCP spec and client parsing
- Fix: Extract content directly from serviceResult.result instead of nesting
- Resolves opencode client error: 'Typeundefined is not an object (evaluating result.content)'
- Now result.content correctly accesses content array as expected by MCP clients
1 parent 739531c9
......@@ -265,9 +265,10 @@
}
}
result.result = [
// Extract content from ScreenAsMcpTool result, don't nest it
result = serviceResult?.result ?: [
content: content,
isError: serviceResult?.result?.isError ?: false
isError: false
]
return
}
......