Skip to main content
Glama

app_save_document

Saves one open document by file path or the focused document without touching other open files, so an unwritable document cannot block an unrelated save.

Instructions

Save ONE open document: file_path, or the focused one.

app_save_all writes every open document, so one that cannot be written, a sheet in a read-only folder say, stops a save you never asked for. This touches only the named document, never changes focus and never walks the workspace.

saved is measured from the file's age on disk: Altium does not report a declined save. was_modified says whether Altium thought there was anything to write, and it misses edits made through scripts: a board changed only by this server's tools read false and was saved all the same. A save Altium declines while a command is active reads saved false; run app_exit_active_command and retry.

Args: file_path: Absolute path of an open document. Empty saves the focused document.

Returns: file_path, saved, was_modified and a reason when it was not saved. NOT_OPEN when the document is not open, since only an open document can hold unsaved edits.

Input Schema

NameRequiredDescriptionDefault
file_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and succeeds. It discloses non-obvious behavior: `saved` is inferred from file age on disk because Altium does not report declined saves, `was_modified` misses script-made edits, focus/workspace are untouched, and command-active declines return `saved` false with a retry path.

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 front-loaded with purpose and sibling differentiation, then structured into behavioral caveats, Args, and Returns. Despite its length, every sentence adds operational value without redundant restatement.

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?

An output schema exists, but the description still adds useful semantic meaning to return fields (`saved`, `was_modified`, `reason`, `NOT_OPEN`) and edge cases. For a one-parameter save tool with no annotations, this is complete enough for an agent to call it correctly.

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?

Schema description coverage is 0%, so the description must compensate, and it does: `file_path` is defined as an absolute path to an open document, and the empty-string default is explained as saving the focused document.

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?

Starts with a specific verb and resource: 'Save ONE open document: file_path, or the focused one.' It explicitly distinguishes itself from sibling `app_save_all` by contrasting single-document and all-document behavior.

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?

Gives clear selection guidance against `app_save_all`: the sibling may stop a save you never asked for when any one document cannot be written, while this tool touches only the named document. It also gives a concrete remediation workflow for declined saves during an active command.

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

Deploy Server

Other Tools