Skip to main content
Glama

document_close

Close the active Moho document tab cleanly and auto-save when a path exists to prevent blocking Save prompts. Optionally force-close untitled files or save them to a specified path first.

Instructions

Close the currently active Moho document tab cleanly (auto-saves if it has a path to prevent blocking Save prompts).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "document_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoAllow closing an untitled document without saving (default: false)
savePathNoOptional path to FileSaveAs before closing an untitled document
saveFirstNoSave before closing to avoid blocking Save dialogs (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the auto-save side effect for documents with a path, but stays silent on what happens for untitled documents without force (blocking dialog? silent discard?), whether closing is reversible, or failure behavior.

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 names the action and scope first, then packs the key side effect into a parenthetical. Nothing is wasted or redundant.

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

Completeness3/5

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

For a 3-parameter mutation with no annotations and no output schema, the description covers the main path and the auto-save side effect but leaves the untitled-document edge cases and result behavior unexplained. Adequate but with clear gaps.

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 100%, so force, savePath, and saveFirst are already fully documented, establishing a baseline of 3. The description adds no extra meaning about how these options interact, such as saveFirst=false versus force for untitled documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Close the currently active Moho document tab cleanly.' The 'currently active' scope distinguishes it from save/saveAs/new siblings, though no sibling is named explicitly.

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?

Usage is implied by the verb and scope (close the active document), and the side-effect note hints at why you'd use it over manual save-then-close. There is no explicit when-not guidance, e.g. what to do instead if you want to keep the document or switch rather than close.

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