> For the complete documentation index, see [llms.txt](https://carvera-community.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://carvera-community.gitbook.io/docs/dev/firmware/supported-commands/mcodes/tool-slot-management.md).

# Tool Slot Management

These are the commands relating to the [Custom Tool Slot functionality](/docs/dev/firmware/features/custom-tool-slots.md)

### M889 - View Tool Slot Configuration

### Description

Outputs the current tool slot configuration. This shows the tool slot configuration being used in memory.

### Parameters

None

### Example

```gcode
;Stock Carvera example
M889
Tool Slots Configuration:
Tool 0: X=-4.965 Y=-24.480 Z=-114.400
Tool 1: X=-4.965 Y=-84.480 Z=-114.400
Tool 2: X=-4.965 Y=-114.480 Z=-114.400
Tool 3: X=-4.965 Y=-144.480 Z=-114.400
Tool 4: X=-4.965 Y=-174.480 Z=-114.400
Tool 5: X=-4.965 Y=-204.480 Z=-114.400
Tool 6: X=-4.965 Y=-234.480 Z=-114.400
```

### M890 - Define/update Tool Slot Config

### Description

Adds or updates a tool slot configuration. This command immediately updates the running config in memory and saves the config to file.

### Parameters

* T: The tool slot number
* X: MCS X coordinate of the tool slot centre point
* Y: MCS Y coordinate of the tool slot centre point
* Z: MCS Z coordinate of the tool slot centre point. For convenience the Z parameter is optional, and if omitted the command will use the Z value from the previously numbered tool slot.

### Example

```gcode
M890 T4 X-10 Y-20 Z-110
Added tool slot 4: X=-10.000 Y=-20.000 Z=-110.000
Total custom tool slots: 4
Saved custom tool slot config to /sd/custom_tool_slots.txt
```

### M891 - Remove a Tool Slot from Config

### Description

Removes a tool slot from configuration. This command immediately updates the running config in memory and saves the config to file.

### Parameters

* T: The tool slot number

### Example

```gcode
M891 T4
Removed tool slot 4
Saved custom tool slot config to /sd/custom_tool_slots.txt
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://carvera-community.gitbook.io/docs/dev/firmware/supported-commands/mcodes/tool-slot-management.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
