Request tool change#
request_tool_change is an opt-in, audit-only relief valve for assistants
that need a different session tool configuration. It records a structured
request in ordinary tool-call history; it does not enable, disable, or configure
any tool. Enable it explicitly with -t +request_tool_change.
This is separate from vent: vent records operational friction, while
request_tool_change names a concrete tool-configuration request.
Opt-in tool for assistants to request session tool configuration changes.
Phase 1 (audit-only) recorded the intent in tool-call history without mutating
the active tool set. Phase 2 (this file) actually applies enable/disable
requests by mutating the session-local _loaded_tools_var ContextVar that
get_tools() reads.
configure_tool requests remain audit-only; a future phase can add actuation
for them without altering the enable/disable paths.
Instructions
Use this tool to adjust which tools are available mid-session.
- ``enable_tool``: adds a known tool to the active set so it can be called in
subsequent turns.
- ``disable_tool``: removes a tool from the active set for the remainder of the
session. You cannot disable ``request_tool_change`` itself.
- ``configure_tool``: records a configuration change request (audit-only for now).
Changes take effect immediately; the next LLM turn will see the updated tool list.
- gptme.tools.request_tool_change.execute_request_tool_change(code: str | None, args: list[str] | None, kwargs: dict[str, str] | None) Message
Validate and apply a tool-change request.
enable_toolanddisable_toolrequests are applied immediately by mutating the session-local tool list returned byget_tools().configure_toolrequests are still audit-only.