refactor: move tunnel and respond into core

This commit is contained in:
admin committed 2026-06-16 19:44:07 +05:00
1 parent c1c0e3383b
commit dd99f4a47b
8 files changed
+9 -6

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'
export const ok = (payload: unknown): CallToolResult => ({
content: [{ type: 'text', text: JSON.stringify(payload) }]
})
export const fail = (message: string): CallToolResult => ({
content: [{ type: 'text', text: message }],
isError: true
})
export const errorMessage = (error: unknown): string =>
error instanceof Error ? error.message : String(error)