#7382: fix: remove config.schema from agent gateway tool
agents
The config.schema endpoint returns a 373KB JSON schema designed for Control UI form rendering, not for agent consumption. When agents called this action, it caused context explosion issues.
Changes:
- Remove config.schema from GATEWAY_ACTIONS in gateway-tool.ts
- Update system prompt to remove config.schema reference
- Add config.patch to system prompt documentation
The underlying config.schema endpoint remains available for Control UI via the internal callGatewayTool function.
[Fixes #7347](https://github.com/openclaw/openclaw/issues/7347)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR removes the `config.schema` gateway action from the agent-facing `gateway` tool (and the system prompt) to prevent large JSON schema responses from causing context bloat. The underlying gateway endpoint remains implemented and listed in the server method registry for internal/UI usage; agents are directed to use `config.get`, `config.apply`, `config.patch`, and `update.run` instead.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- Changes are a small, targeted removal of an agent-exposed action and matching system prompt text; no runtime behavior changes outside the gateway tool dispatch and schema enum. The underlying gateway handler remains intact for internal consumers.
- No files require special attention
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#4767: fix(agents): handle read alias required schema
by RomeroYang · 2026-01-30
79.7%
#4445: fix: resolve Antigravity "unsupported version" and tool_use schema ...
by harry2690 · 2026-01-30
79.7%
#5823: fix(config): exit cleanly on invalid config instead of high CPU loop
by gavinbmoore · 2026-02-01
79.0%
#7252: docs: align config examples and tool docs with current runtime
by nice-and-precise · 2026-02-02
78.2%
#17221: fix(agents): prevent agents from using exec for gateway management
by CornBrother0x · 2026-02-15
77.5%
#16362: Update session-pruning.md - updated agents.defaults config std
by elliottb · 2026-02-14
77.5%
#8546: Fix/config UI improvements
by RandomRaine · 2026-02-04
77.4%
#15852: fix: pass agentId when resolving IRC session paths
by MisterGuy420 · 2026-02-14
77.0%
#13960: fix(ui): preserve structured config validation error details
by constansino · 2026-02-11
76.8%
#11141: Fix JSON schema conversion error when using llama.cpp backend
by 9nix00 · 2026-02-07
76.7%