Skip to main content
Glama

app_create_document

Creates and saves a new blank PCB, schematic, library, or output job document to a specified path, attaching it to the focused project so subsequent design tools can edit the new file.

Instructions

Create a new blank document of a given kind and save it to disk.

Wraps IClient.OpenNewDocument + DoFileSave. The new document is written to file_path and, by default, attached to the currently focused project. Use this to create a .PcbDoc before running update_pcb, to spin up a fresh .SchDoc, library, OutJob, etc.

Args: kind: Document kind, 'PCB', 'SCH', 'PCBLIB', 'SCHLIB', 'OUTPUTJOB', or any other kind Altium's server module registers under. file_path: Absolute path where the new document should live. Use Windows backslashes. name: Optional display name. Defaults to the filename. add_to_project: Attach the new file to the focused project. Default True. Set False to leave it as a free document.

The new document is focused before this returns, and focused says whether that took: the library and board tools act on the focused document, and a new one left behind the old meant the next call wrote into the old one. A document that could not be saved is an error (a missing folder is named), not a success with saved: false.

Returns: Dictionary with kind, file_path, saved, focused, added_to_project.

Input Schema

NameRequiredDescriptionDefault
kindYes
nameNo
file_pathYes
add_to_projectNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the new document is focused on return, why the `focused` flag matters for subsequent library/board calls, and that a failed save is raised as an error naming the missing folder rather than a silent `saved: false`. It does not address what happens if a file already exists at `file_path` or permission/overwrite behavior, which is the remaining gap for a disk-writing mutation.

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

Conciseness4/5

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

Purpose sentence is front-loaded and the Args block is justified by the 0% schema coverage. The paragraph on focus/error semantics is slightly repetitive ('a new one left behind the old meant the next call wrote into the old one'), but each sentence informs a real calling decision.

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 4-param creation tool with no annotations, the description covers purpose, all parameters, focus side effects, project attachment, and error semantics, and even restates the return keys despite an output schema existing. An agent has everything needed 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 coverage is 0%, so the description must compensate and does: it enumerates valid `kind` values, requires absolute paths with Windows backslashes for `file_path`, explains `name` defaults to the filename, and explains the `add_to_project` default and what False means. Every parameter gains meaning beyond the bare schema titles.

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?

Opens with a specific verb+resource+effect: 'Create a new blank document of a given kind and save it to disk,' and names the underlying operation. It distinguishes itself from near-siblings like app_save_document, app_close_document, and the lib_create_* tools by emphasizing a new blank document written to an explicit path.

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?

Explicitly says when to reach for it ('Use this to create a .PcbDoc before running update_pcb, to spin up a fresh .SchDoc, library, OutJob'), giving concrete precursor contexts. It does not contrast with proj_add_document (which attaches an existing file to a project), so the alternative routing is left implicit rather than stated.

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