docs: fix ts error in math examples (#18244)

This commit is contained in:
gotjoshua 2026-05-27 16:12:12 +01:00 committed by GitHub
parent 9814dc6526
commit 86dc66eae9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,7 +59,7 @@ export const add = tool({
b: tool.schema.number().describe("Second number"),
},
async execute(args) {
return args.a + args.b
return (args.a + args.b).toString()
},
})
@ -70,7 +70,7 @@ export const multiply = tool({
b: tool.schema.number().describe("Second number"),
},
async execute(args) {
return args.a * args.b
return (args.a * args.b).toString()
},
})
```