mcp-use TypeScript API
    Preparing search index...

    Type Alias CallToolSuccess<Result>

    CallToolSuccess: CallToolResult & { isError?: false } & (
        [Result] extends [never] ? unknown : { structuredContent: Result }
    )

    Successful non-error tool result returned by useCallTool.

    structuredContent is guaranteed and typed exactly when the tool declares an outputSchema (Result is not never) — the server rejects non-error results from schema-backed tools that lack it, so a resolved result always carries it. Tools without an outputSchema (Result = never) legitimately return content-only results, so no structuredContent guarantee is added beyond the base CallToolResult (optional, unknown).

    Tool errors and transport failures reject instead — they never appear here.

    Type Parameters

    • Result

      Inferred structuredContent type from the tool's outputSchema; never when the tool declares none.