Skip to main content
Glama

Attach Default Lakehouse to Notebook

attach_lakehouse_to_notebook

Set a default lakehouse for a Microsoft Fabric notebook to automatically mount lakehouse tables and files when the notebook runs, enabling Spark data access without manual configuration.

Instructions

Attach a default lakehouse to a notebook in Microsoft Fabric.

Updates the notebook definition to set a default lakehouse. This lakehouse will be automatically mounted when the notebook runs, providing seamless access to the lakehouse tables and files without additional configuration.

Use this tool when:

  • Setting up a new notebook with a lakehouse connection

  • Changing the default lakehouse for an existing notebook

  • Ensuring notebook code can access lakehouse tables via spark.read

Parameters: workspace_name: The display name of the workspace containing the notebook. notebook_name: Name of the notebook to update. lakehouse_name: Name of the lakehouse to attach as default. lakehouse_workspace_name: Optional workspace name for the lakehouse. If not provided, uses the same workspace as the notebook.

Returns: Dictionary with status, message, notebook_id, notebook_name, lakehouse_id, lakehouse_name, and workspace_id.

Example: ```python # Attach lakehouse in same workspace result = attach_lakehouse_to_notebook( workspace_name="Analytics Workspace", notebook_name="Data_Processing", lakehouse_name="Bronze_Lakehouse" )

# Attach lakehouse from different workspace
result = attach_lakehouse_to_notebook(
    workspace_name="Analytics Workspace",
    notebook_name="Data_Processing",
    lakehouse_name="Shared_Lakehouse",
    lakehouse_workspace_name="Shared Resources"
)

if result["status"] == "success":
    print(f"Lakehouse {result['lakehouse_name']} attached successfully!")
```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_nameYes
notebook_nameYes
lakehouse_nameYes
lakehouse_workspace_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it 'Updates the notebook definition' (indicating a mutation), explains the outcome ('lakehouse will be automatically mounted when the notebook runs'), and mentions the benefit ('seamless access without additional configuration'). However, it lacks details on permissions, error handling, or side effects, which would be needed for a perfect score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: the first sentence states the purpose, followed by elaboration, usage guidelines, parameter details, return values, and examples. Each section adds value without redundancy, and the example code is directly illustrative of the tool's use. No sentences are wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 4 parameters, 0% schema coverage, no annotations, and an output schema present, the description is complete. It covers purpose, usage, parameters, return values (though the output schema handles details), and includes practical examples. The presence of an output schema means the description doesn't need to detail return structure, and it adequately addresses the complexity of the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Given 0% schema description coverage, the description fully compensates by providing clear parameter explanations. It defines all four parameters, specifies which are required, explains the optional nature of 'lakehouse_workspace_name' with its default behavior ('If not provided, uses the same workspace as the notebook'), and includes examples that illustrate usage with and without the optional parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Attach a default lakehouse to a notebook'), the resource involved ('notebook in Microsoft Fabric'), and distinguishes this from sibling tools like 'import_notebook_to_fabric' or 'get_notebook_content' by focusing on configuration rather than creation or retrieval. It goes beyond the title by explaining the functional outcome ('automatically mounted when the notebook runs, providing seamless access').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes an explicit 'Use this tool when:' section with three specific scenarios: setting up a new notebook, changing an existing notebook's default lakehouse, and ensuring code access to lakehouse tables. This provides clear guidance on when to use this tool versus alternatives like 'import_notebook_to_fabric' for creation or 'get_notebook_content' for reading, though it doesn't explicitly name exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bablulawrence/ms-fabric-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server