feat: improve error handling for empty or malformed tool files - #528
Conversation
|
PR author is not in the allowed authors list. |
|
@FiammaMuscari is attempting to deploy a commit to the xmcp Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Thanks for the PR @FiammaMuscari!
Looks promising overall. Before a thorough review, could you please add:
- A concrete usage example
- Screenshots
- Documentation updates
Also it seems that some code has been dragged from the #527 , please remove.
bac36ca to
717c6ef
Compare
|
Updated the PR to remove the unrelated code that had been dragged from #527. Also added:
Example output: Real syntax/import errors are still preserved and surface with full stack traces; only empty files and missing default exports are handled gracefully.
|
0xKoller
left a comment
There was a problem hiding this comment.
Good path! There are some changes that need to be done but besides that everything seems good.
|
Moved this to a Troubleshooting section in the Tools docs in eb3d9cc. |
|
Hey @FiammaMuscari ! I personally really like this implementation and it'd be great to see the same for resources & prompts. Can we do the same for the other components? And maybe put all loaders (tool-loader, resource-, prompt-) in the same folder? I'm gonna approve this PR, please continue with the remaining changes in a separate one. Thanks! |
|
Great, I’ll address this in a follow-up PR |

Closes #464
This PR improves error handling when loading tool files.
Tests: