Skip to content

Conversation

@bjoaquinc
Copy link
Contributor

@bjoaquinc bjoaquinc commented Sep 19, 2025

📝 Summary

Add GetNotebookErrors tool to provide a summary of all errors in a notebook with cell_ids and next_steps guidance.

Screenshot 2025-09-19 at 8 02 33 PM

Note: The discrepancy between the LLM mentioning 22 errors vs 20 errors displayed at the bottom of the image is because there are 20 cells that showed errors, but 1 cell logged multiple separate errors.

🔍 Description of Changes

  • Created GetNotebookErrors in errors.py
  • Added it to tool_registry for mcp server and backend tool access
  • Created tests for it in test_errors.py

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

@vercel
Copy link

vercel bot commented Sep 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Sep 19, 2025 7:54pm

@dataclass
class CellErrorsSummary:
cell_id: str
cell_name: str
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thikn we have strongly typed string for CellId_t and maybe CellName (?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually maybe I should get rid of cell name since its optional and in my opinion doesn't provide a lot of value? Cell ID is necessary for next steps so I'll fix the typing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea that sounds good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

mscolnick
mscolnick previously approved these changes Sep 19, 2025
Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! going to let @dmadisetti chime in on error formatting that is best for AI

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmadisetti is going to add a util/function to propagate up other errors that may not be captured in this error list in a followup

@mscolnick mscolnick merged commit 49679b5 into marimo-team:main Sep 19, 2025
37 checks passed
@bjoaquinc bjoaquinc deleted the add-get-notebook-errors-tool branch September 19, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants