Skip to main content
Glama

apple_textedit_close

Destructive

Close one TextEdit document. Blocks closing if there are unsaved changes or no saved path unless discardChanges is true; save first to retain edits.

Instructions

Close one TextEdit document. Refuses unsaved changes or a document without a saved path unless discardChanges:true; save separately to retain changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentNameYesExact name returned by list_documents; ambiguous duplicate names are rejected.
discardChangesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A4.4/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 covered structurally. The description adds genuine context beyond that: the operation refuses unsaved changes and documents lacking a saved path, telling the agent the specific failure modes it will hit.

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?

Two tight sentences, front-loaded with the action, followed immediately by the constraints and the escape hatch. No filler or repetition of schema fields.

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 close tool with destructive annotations and no output schema, the description covers the key preconditions, the override flag, and the alternative workflow. Return-value behavior is absent but unnecessary since no output schema exists and the operation is terminal.

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?

documentName is documented in the schema, and the description supplies behavior for the undocumented discardChanges param ("unless discardChanges:true"), compensating for the 50% coverage. It could add the default behavior explicitly, but the meaning is clear.

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?

States a specific verb ("Close") and resource ("one TextEdit document"), including cardinality. It also implicitly demarcates itself from the save sibling by noting "save separately to retain changes," so an agent can route between close and save without reading schemas.

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?

Gives explicit conditional guidance: use discardChanges:true to force-close, and save separately if changes must be retained. The when-not case (unsaved changes without the flag) is stated. It stops short of naming the exact sibling tool (apple_textedit_save), which keeps it from a 5.

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