[PR #13216] docs: Manually coerce execute result #14560

Open
opened 2026-02-16 18:19:20 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13216

State: open
Merged: No


What does this PR do?

I was having some trouble with the example tools provided in the docs ...

Screenshot 2026-02-11 at 2 07 34 PM

... until I noticed my type hints and discovered that the example functions were returning values of the wrong type.

Screenshot 2026-02-11 at 2 04 26 PM

How did you verify your code works?

Manual verification
Screenshot 2026-02-11 at 2 08 50 PM

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13216 **State:** open **Merged:** No --- ### What does this PR do? I was having some trouble with the example tools provided in [the docs](https://opencode.ai/docs/custom-tools/#multiple-tools-per-file) ... <img width="553" height="177" alt="Screenshot 2026-02-11 at 2 07 34 PM" src="https://github.com/user-attachments/assets/97da7d81-af47-4b2b-94fb-8b53fd57a12e" /> ... until I noticed my type hints and discovered that the example functions were returning values of the wrong type. <img width="763" height="388" alt="Screenshot 2026-02-11 at 2 04 26 PM" src="https://github.com/user-attachments/assets/09a5df39-28ee-41f3-897e-f176bf6eac98" /> ### How did you verify your code works? Manual verification <img width="550" height="173" alt="Screenshot 2026-02-11 at 2 08 50 PM" src="https://github.com/user-attachments/assets/f026d784-26fc-4b0d-bdea-91b7c9cbab59" />
yindo added the pull-request label 2026-02-16 18:19:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14560