Add workspace object tools (list, read, create notebooks and directories)#418
Open
jralfonsog wants to merge 4 commits intodatabricks-solutions:mainfrom
Open
Add workspace object tools (list, read, create notebooks and directories)#418jralfonsog wants to merge 4 commits intodatabricks-solutions:mainfrom
jralfonsog wants to merge 4 commits intodatabricks-solutions:mainfrom
Conversation
Add 5 new functions to browse and manage workspace objects: - list_workspace_directory: list files/folders in a workspace path - get_workspace_object_status: get metadata for a single object - read_notebook: export/read notebook content in various formats - create_notebook: create notebooks from inline content - create_workspace_directory: create directories (with parents) Co-authored-by: Isaac
Wrap the 5 core workspace object functions as MCP tools: - list_workspace_directory (timeout=30) - get_workspace_object_status (timeout=30) - read_notebook (timeout=30) - create_notebook (timeout=60) - create_workspace_directory (timeout=30) Co-authored-by: Isaac
Cover all 5 functions: list_workspace_directory, get_workspace_object_status, read_notebook, create_notebook, create_workspace_directory. Tests include happy paths, error handling, format validation, and case insensitivity. Co-authored-by: Isaac
- Docstrings: opening """ on its own line - MCP module header: add tool listing - Serialization: use getattr() for defensive SDK object access - Returns sections: bullet list format for dict keys Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Architecture
databricks_tools_core/file/workspace_objects.pydatabricks_mcp_server/tools/workspace_objects.py@mcp.tooldecorators and user-facing docstringstests/unit/test_workspace_objects.pyBuilds on the existing
file/module (which already has upload/delete) by adding browse and read capabilities that were previously missing.Test plan
pytest tests/unit/test_workspace_objects.py -v)list_workspace_directory("/Users")returns 5,765 objectscreate_workspace_directory+create_notebook+read_notebook+get_workspace_object_statusround-trip verifiedThis pull request was AI-assisted by Isaac.