Skip to main content
Glama

ai_closeDocument

Destructive

Closes an Illustrator document, optionally saving changes first; omit the document name to target the active document or set save to false to discard edits.

Instructions

Illustrator: close a document (save:true saves first, else discards changes).

Input Schema

NameRequiredDescriptionDefault
saveNo
documentNoDocument name; omit for the active document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is known; the description goes further by naming exactly what is destroyed (unsaved changes) and how save:true changes that. It stops short of covering what happens on a missing/dirty document or whether the call errors.

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?

A single front-loaded sentence with app, action, and the one behavioral fork that matters. Zero filler.

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?

For a two-parameter, no-output-schema mutation tool with destructive annotations, this covers purpose, targeting, and the save/discard branch. Minor omissions: behavior when the named document does not exist or has no unsaved changes, and whether the tool returns anything.

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

Parameters4/5

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

Schema coverage is 50%: `document` is documented in-schema but `save` is bare, and the description supplies the missing semantics (true = save first; otherwise changes are discarded, which also implies the omitted-flag default). It does not state the boolean's default value explicitly.

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?

Specific verb (close) + resource (document) + host app prefix (Illustrator), which cleanly separates it from the sibling ps_closeDocument. The parenthetical even states the document lifecycle outcome, so an agent knows exactly what the call does.

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

Usage Guidelines3/5

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

The save flag's two modes are spelled out, and 'omit for the active document' in the schema implies the targeting rule. However, there is no explicit when-to-use guidance vs ps_closeDocument or vs ai_saveDocument + close, and no stated preconditions.

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