home / skills / bdambrosio / cognitive_workbench / mc-close

This skill closes any currently open UI in the Minecraft tool, returning a clear success or failure status to you.

npx playbooks add skill bdambrosio/cognitive_workbench --skill mc-close

Review the files below or copy the command above to add this skill to your agents.

Files (2)
Skill.md
841 B
---
name: mc-close
type: python
description: "Close currently open UI. Returns success/failure"
---

# Minecraft Close Tool

Closes currently open UI interface. Returns success/failure status.

## Purpose

UI management for closing opened interfaces like crafting tables, chests, and furnaces.

## Input

- `value`: Ignored

## Output

Returns uniform_return format with:
- `value`: Text summary (success/failure message)
- `data`: Structured data dict (machine-readable). Key fields:
  - `success`: Boolean

## Behavior & Performance

- Closes currently open UI
- Fails if no UI is open
- Returns immediately after closing

## Guidelines

- Use after completing operations in opened UI
- Fails silently if no UI is open
- Use `mc-open` to open UI interfaces

## Usage Examples

Close open UI:
```json
{"type":"mc-close","out":"$close"}
```

Overview

This skill closes the currently open Minecraft UI and returns a standardized success or failure result. It is lightweight, immediate, and designed to be called after you finish interacting with interfaces like chests, crafting tables, or furnaces. The output includes a human-readable message and a machine-readable success flag.

How this skill works

When invoked, the skill checks whether any UI is currently open in the client context. If an interface is open, it attempts to close it and returns immediately with success=true; if no UI is open or the close action cannot be performed, it returns success=false and a brief failure message. The input value is ignored and the output follows a uniform_return format with value and data fields.

When to use it

  • After finishing item transfers, crafting, or inventory management in an open UI.
  • At the end of a scripted interaction that opened an interface via mc-open.
  • When ensuring the player state returns to normal gameplay before moving or performing actions.
  • In cleanup steps of automation flows to avoid leaving UIs open between tasks.

Best practices

  • Call this immediately after the UI-based operation completes to avoid state confusion.
  • Confirm mc-open succeeded before relying on mc-close in automated sequences.
  • Handle both success and failure results; failure indicates no UI was open or close failed.
  • Keep mc-close calls idempotent—calling it when no UI is open simply returns failure.

Example use cases

  • Close a chest UI after moving items into the player inventory.
  • Exit a crafting table once the crafted item has been retrieved.
  • Close furnace UI after collecting smelted items to resume movement or actions.
  • Integrate into scripts to ensure the player returns to the game view before navigation.

FAQ

What input does the skill require?

No input is required; any provided value is ignored.

How do I know if the close succeeded?

Check the returned data.success boolean and the text summary in value.