Skip to content

th-8b7d36: configure Smooth Operator's tools from th + Claude Desktop#251

Merged
brentrager merged 1 commit into
mainfrom
th-8b7d36-operator-tools
Jul 23, 2026
Merged

th-8b7d36: configure Smooth Operator's tools from th + Claude Desktop#251
brentrager merged 1 commit into
mainfrom
th-8b7d36-operator-tools

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

What

Closes the loop on epic th-093ce3: you can already talk to your org's Smooth Operator from th / Claude Desktop (#249) — now you can configure what it's allowed to do from the same place.

  • CLI: th api smooth-operator tools list | enable <id> | disable <id>
  • MCP: operator_tools (read-only) + operator_tools_set — so "what can my operator do?" and "turn off email.send" work from Claude Desktop / Cursor
  • Shared client in smooai::smooth_operator (list_operator_tools / set_operator_tool / render_tool_catalog) reused by both surfaces

The correctness detail that matters

Writes are read-modify-write by design. The PUT body is authoritative and the server treats any tool omitted from it as enabled — so sending a single-entry body would silently re-enable every other tool. set_operator_tool re-reads the full catalog, flips exactly one entry, and sends all of it.

Safety

Org-admin only (enforced server-side by smooai #3380). The server instructions tell the model to confirm with the user before calling operator_tools_set — it changes what the AI may do for the whole org — and to expect a 403 for non-admins.

Verification

  • 377 tests pass; clippy clean on all touched files.
  • Live smoke: MCP advertises 8 tools; operator_tools returns a clean, actionable 404 today because its endpoint ships with smooai #3380 (not yet merged/deployed). Client side is correct and ready.
  • New unit tests: enabled defaults to true when absent (an absent org config means everything is on — defaulting false would read as "all off"), and the renderer marks disabled/destructive correctly.

🤖 Generated with Claude Code

Closes the loop on epic th-093ce3: you can now not only TALK to the org
operator from th/Claude Desktop, but also configure what it's allowed to do
from the same place.

- `th api smooth-operator tools list|enable|disable`
- MCP `operator_tools` (read-only) + `operator_tools_set`
- shared client in smooai::smooth_operator (list_operator_tools /
  set_operator_tool / render_tool_catalog), reused by both surfaces

Writes are read-modify-write deliberately: the PUT body is authoritative and
the server treats an omitted tool as ENABLED, so a single-entry body would
silently re-enable every other tool. We re-read the catalog, flip one, send all.

Server side is smooai PR #3380 (admin-gated); until that ships these return a
clean 404. Server instructions tell the model to confirm with the user before
calling operator_tools_set — it changes what the AI may do for the whole org.

377 tests pass; clippy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZctFb4oiWoJraHN2db1nX
@brentrager
brentrager enabled auto-merge (squash) July 23, 2026 23:20
@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a44370c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager
brentrager merged commit 2c585c2 into main Jul 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant