MCPToolOutput | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Type Alias MCPToolOutput<Handler>

    MCPToolOutput: Awaited<ReturnType<Handler>> extends infer Result
        ? Result extends {
            structuredContent: infer Structured extends Record<string, unknown>;
        }
            ? Structured
            : never
        : never

    Type of the structuredContent returned by a tool handler, eg client.callTool<MCPToolOutput<typeof whoami>>("whoami")

    Type Parameters

    • Handler extends (...args: never[]) => unknown

      Type of the tool's onCall function