Unified · Split
| @@ -176,7 +176,10 @@ export async function resolveToolForCall( · 175 unmodified lines | ||
| 176 | 176 | return Result.err(new Error(unknownToolErrorMessage(toolPath, suggestions))); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | − const serializedResult = Result.try(() => JSON.parse(entry.serializedToolJson) as SerializedTool); | |
| 179 | + const serializedResult = Result.try(() => { | |
| 180 | + const serialized: SerializedTool = JSON.parse(entry.serializedToolJson); | |
| 181 | + return serialized; | |
| 182 | + }); | |
| 180 | 183 | if (serializedResult.isErr()) { |
| 181 | 184 | return Result.err( |
| 182 | 185 | new Error(`Failed to parse tool registry entry '${resolvedToolPath}': ${serializedResult.error.message}`), |