Skip to main content
Glama

open_notebook_file

Open an existing Mathematica notebook file (.nb) in the Mathematica frontend. Supports absolute, home-relative, and relative paths.

Instructions

Open an existing Mathematica notebook file (.nb) in the Mathematica frontend.

Supports:

  • Absolute paths: /Users/foo/notebook.nb

  • Home-relative paths: ~/Documents/notebook.nb

  • Relative paths (resolved from current directory)

Args: path: Path to the .nb file

Returns: Notebook ID and metadata for use with other notebook commands

Example: open_notebook_file("~/Documents/analysis.nb") -> {id: "NotebookObject[...]", cell_count: 15}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the return value (Notebook ID and metadata) and path formats, but does not disclose potential side effects (e.g., no modification), error conditions, or dependencies (e.g., kernel state). Adequate but could be more comprehensive.

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 concise and well-structured with bullet points and an example. Every sentence adds value, and the layout improves readability.

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

Completeness4/5

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

Given the tool has 2 parameters, no annotations, and an output schema (not shown but hinted), the description covers the core functionality well. However, it misses the optional session_id and does not specify error handling. Still, for a simple file open, it is reasonably complete.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It thoroughly explains the 'path' parameter with examples and formats, but completely omits the optional 'session_id' parameter. This partial coverage earns a 3.

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 tool opens a Mathematica notebook file (.nb) in the frontend, and specifies supported path formats (absolute, home-relative, relative). This distinguishes it from siblings like create_notebook or read_notebook.

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

Usage Guidelines4/5

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

The description implies usage when wanting to open an existing .nb file, but does not explicitly compare to alternatives or state when not to use it. However, the context and example are clear enough for an agent to infer appropriate use.

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/AbhiRawat4841/mathematica-mcp'

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