GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): expose structured MCP output (#32074) · ildella/opencode@be22750

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/opencode/src/mcp
    • catalog.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/opencode/src/mcp/catalog.ts‎

Copy file name to clipboardExpand all lines: packages/opencode/src/mcp/catalog.ts
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ export function convertTool(mcpTool: MCPToolDef, client: Client, timeout?: numbe
5050
return dynamicTool({
5151
description: mcpTool.description ?? "",
5252
inputSchema: jsonSchema(inputSchema),
53-
execute: (args: unknown, options) =>
54-
client.callTool(
53+
execute: async (args: unknown, options) => {
54+
const result = await client.callTool(
5555
{
5656
name: mcpTool.name,
5757
arguments: (args || {}) as Record<string, unknown>,
@@ -62,7 +62,13 @@ export function convertTool(mcpTool: MCPToolDef, client: Client, timeout?: numbe
6262
signal: options.abortSignal,
6363
timeout,
6464
},
65-
),
65+
)
66+
if (result.structuredContent === undefined || result.structuredContent === null) return result
67+
return {
68+
...result,
69+
content: [{ type: "text" as const, text: JSON.stringify(result.structuredContent) }],
70+
}
71+
},
6672
})
6773
}
6874

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.