# The working set

> The authored tools promoted for one agent are exactly what its harness sees. A cap and an idle window keep the set from becoming the kitchen sink.

Source: https://docs.getgraft.ai/graft/concepts/the-working-set

An agent's **working set** is the authored tools currently promoted for it, and therefore the tools present in its MCP list beside the meta-tools. Nothing else from the toolbox is in the agent's model's context. When the set changes, Graft sends `notifications/tools/list_changed` and the harness re-fetches the list.

## How a tool gets in

- **A publish.** When `acquire` finishes, or `publish_tool` succeeds, the tool is promoted for the agent that asked.
- **The agent asks.** `promote { vendor, name }` brings a tool from the toolbox into the list. `find_tool` says what exists.

## How a tool gets out

Expansion has an author. Contraction has two.

- **The agent asks.** `demote { vendor, name }` takes a tool out when the agent no longer needs it. The skill tells it to.
- **The rule.** Each agent has a **cap** and an **idle window**, set when the agent is created and editable on its page under **Name, cap and idle window**. A scheduled sweep applies them: a tool unused for longer than the idle window is demoted, and when more tools are promoted than the cap allows, the least recently used beyond it go first.

Two guards make the rule safe. The cap never demotes a tool used inside the current window, so a set of twenty tools all in use stays put. And nothing is demoted while the agent has a run in flight; the sweep skips that agent and decides afresh next time.

Defaults are a cap of 20 tools and a window of 21 days. The cap accepts 1 to 500, the window 1 to 3650 days. Saved values take effect at the next sweep.

## Nothing is deleted

A demoted tool is still in your toolbox, every version of it. It is one `find_tool` and one `promote` from coming back, and `run_tool` runs it by name without promoting it at all. The monthly job whose tool was demoted after 21 idle days degrades to two extra calls, not to a failure.

## The turn after a publish

The harness re-reads the list on the notification, but the turn in which a tool was just published may still be running against the old list. `run_tool { vendor, name, input }` runs the new tool by name in that turn. Hermes re-fetches on the notification; OpenClaw re-lists at the start of its next turn; a client that ignores the notification altogether still works through `run_tool` and `find_tool`.

## Reading the set in the console

The Agents list shows each agent's working set as a count against its cap. The agent's page shows **Working set** with the same count, and for each tool its annotations (read-only, write or destructive), who promoted it (the agent, a publish, or the rule), when, and when it was last used. **History** below it records every promotion and demotion with its cause: the agent asked, published by the agent, unused past the idle window, over the working-set cap, or its connection was revoked.

## Try it

```text
What is in your Graft tool list right now, and when did you last use each one?
```

```text
Bring back the tool that reads my calendar.
```

```text
You are done with the invoicing tools for this quarter; take them out of your list.
```
