Skip to content

Manage the tool budget

The tool budget estimates how many enabled model-facing tools the next agent run can place on model requests. Narrow the surface with the permission rules in Settings → Permissions.

Effect and coverage: The report is advisory and changes nothing automatically. MCP servers with no cached tool inventory are named but not counted.

What you can do

ActionMechanismBoundary
Check the current surfaceInspect Settings → Permissions, or ask for ContextBudgetSettings shows configured tools; ContextBudget estimates schema tokens
Remove a tool from later runsA tool:<name> rule with effect deny for the agentThe change applies to the next run; it does not interrupt a running turn

How it works

Surface estimate

The backend report uses the capability snapshot service that also supplies the Tools settings page. It combines project-level permission filtering, enabled mini app contributions, and cached MCP inventories. The report is available through GET /rpc/tools/gc?projectId=<id>; omit projectId for the no-project scope. The UI does not display a separate tool-budget pill or unused-tool suggestions. The route accepts sessionId, but the current snapshot service does not use it to resolve an agent. The report is a project-level estimate; use the agent's Tools settings or a run's ContextBudget reading to inspect that agent's surface.

With no MCP server in scope, the estimator removes the MCP resource tools that cannot be assembled. It then counts the remaining built-in and mini app entries, plus the cached MCP tool entries.

Count sourceIncludedBoundary
Built-inEnabled core tool names after policy filteringHost-dependent assembly can still remove an optional tool
Mini appTools contributed by enabled mini appsDisabling the owner removes its tools
MCPPost-filter tool names from the connection cacheA server without usable cached metadata is unprobed

Usage evidence

At run start, Localix records the surfaced tool roster. After a tool finishes, it records one call and whether the result was an error. These best-effort writes use a tool_usage row keyed by user, project scope, and tool name. Agents in the same user/project scope share those counters; the report does not measure an individual agent's disuse. Calls from tools no longer enabled still contribute to the scope's 200-call and seven-day evidence gate.

Worker and child-session calls pass through the same completion handler. A tool used only by delegated work therefore still receives usage credit in the owning project scope.

No suggestion is emitted until the scope has at least 200 recorded calls over at least seven days. A surfaced tool must also have its own roster row; missing telemetry is not treated as disuse.

VerdictRulePrecedence
Never usedAvailable for at least 7 days with zero callsEvaluated first
ColdLast used at least 30 days agoEvaluated before error history
Always failsAt least 5 calls and every call is an errorEvaluated last

Each tool receives at most one verdict. Suggestions are ordered by verdict, call count, last-use time, and name.

The report never suggests disabling AskUserQuestion, Bash, Read, Search, Write, Edit, or ToolOutput.

Configuration

ControlScope and valueEffect
Built-in or mini app toolA permission rule in Settings → PermissionsStores a tool:<name> rule in that agent's list
MCP tool switchthe Store (MCP servers); per serverUpdates the server's enabledTools or disabledTools filter
Warning thresholdBackend toolBudgetWarn; default 48Rides the report; no surface renders it today

The Tools page passes the agent whose rules it is showing, so the estimate reflects the rules that agent's runs are judged by.

Limits

  • The count is explicitly an estimate. Cached MCP state can be incomplete, and the capability snapshot cannot predict every host-dependent tool assembled for a run.
  • When MCP servers exist but none advertises resources, the estimate can retain the MCP resource-tool name McpResources. It proves that name absent only when no MCP server is present.
  • Usage recording is fire-and-forget and swallows storage errors. Missing writes can delay or suppress a suggestion.
  • The unused-tool report is served by GET /rpc/tools/gc and no surface renders it. A switch and a tool:<name> rule are the same stored permission rule.
  • The report carries warning and hot thresholds, but no surface renders them. They disable, hide, defer, group, and truncate nothing: Localix provides no automatic tool-removal mode.
  • Disabling a model-facing tool does not remove host-side permission checks, transcript storage, or other runtime boundaries that are not tools.

Source of truth