home / skills / bdambrosio / cognitive_workbench / mc-use

This skill enables you to perform right-click style interactions using the equipped item, returning clear success or failure feedback.

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

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

Files (2)
Skill.md
1.4 KB
---
name: mc-use
type: python
description: "Right-click style interaction using equipped item. Returns success/failure"
---

# Minecraft Use Tool

Right-click style interaction using equipped item. Activates blocks, uses tools, or interacts with world objects.

## Purpose

Block activation and tool use. Uses the currently equipped item in hand to interact with blocks or entities at specified position.

## Input

- Position: `dx`, `dy`, `dz` (world-relative offsets from agent, floats, all required)
  - See coordinate system documentation in jill-minecraft.yaml for details
- `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

- Uses equipped item in hand slot
- Fails if no item equipped or item cannot be used at target location
- Position must be within reach

## Guidelines

- Use `mc-equip` first to equip appropriate item
- Use `mc-inventory` to check available items
- All positions use world-relative coordinates `dx, dy, dz` (see coordinate system in jill-minecraft.yaml)

## Usage Examples

Use equipped item at block directly east:
```json
{"type":"mc-use","dx":1,"dy":0,"dz":0,"out":"$use"}
```

Use at block directly south:
```json
{"type":"mc-use","dx":0,"dy":0,"dz":1,"out":"$activate"}
```

Overview

This skill performs a right-click style interaction using the agent's currently equipped item. It attempts to activate blocks, use tools, or interact with world objects at a specified world-relative position. The result reports success or failure both as a human-readable value and a structured data object.

How this skill works

Provide world-relative offsets dx, dy, dz to target the block or entity within reach. The skill uses whatever is equipped in the agent's hand and returns a uniform_return containing a text summary and a data dict with a boolean success field. The action fails if nothing is equipped, the item is not usable at the target, or the position is out of reach.

When to use it

  • Activate a block (doors, buttons, levers, furnaces) that requires a right-click.
  • Use a tool action such as right-clicking with a flint-and-steel, bucket, or shears.
  • Interact with entities or item containers at a nearby position.
  • Trigger block-specific behavior (e.g., place liquids from a bucket) without changing inventory state.
  • Test whether a particular interaction is permitted at a location (reach and item validity).

Best practices

  • Equip the correct item first using mc-equip to avoid predictable failures.
  • Check inventory with mc-inventory to confirm item presence before calling this skill.
  • Compute target coordinates in world-relative dx, dy, dz using the environment's coordinate system.
  • Keep target positions within reach to prevent automatic failure.
  • Interpret both the human-readable value and the data.success boolean for robust logic.

Example use cases

  • Right-click the block directly east to open a door: dx=1, dy=0, dz=0.
  • Use a bucket on the block below to place or pick up liquid: dx=0, dy=-1, dz=0.
  • Activate a furnace or chest in front of the agent to open its UI.
  • Attempt to shear a nearby sheep or use shears on foliage within reach.
  • Test whether a button at a target position can be pressed with the equipped item.

FAQ

What inputs are required?

Provide dx, dy, dz as world-relative offsets. The value field is ignored.

What does the skill return?

A text summary in value and a data dict where data.success is true on success and false on failure.