Type-safe wrapper for CallToolResult with typed structuredContent. Use in tests to get proper type inference for tool responses.
The output schema type for the tool
const response = await handler(input, extra) as TypedToolResult<Output>;const result = response.structuredContent?.result;// result is properly typed as Output | undefined Copy
const response = await handler(input, extra) as TypedToolResult<Output>;const result = response.structuredContent?.result;// result is properly typed as Output | undefined
Type-safe wrapper for CallToolResult with typed structuredContent. Use in tests to get proper type inference for tool responses.