ToolKind Provides Default Read-Only Semantics
Tracing read-only defaults and capability filtering boundaries from the enum and is_read_only()
THE QUESTION THIS PAGE ANSWERS
ANSWER FIRSTWhat is the key idea behind “ToolKind Provides Default Read-Only Semantics”?
Tracing read-only defaults and capability filtering boundaries from the enum and is_read_only()
Make the claim earn its place. Use this page as a decision aid, not a definition to memorize. Connect the idea to one real task, one observable result, and one failure that would change your mind.
Write one question you could answer with evidence after trying this idea.
A conclusion that sounds complete but leaves the key assumption untested.
ToolKind branches, remember that Task returns false and there is no TaskOutput kind in the source code, and explain the boundary between read-only classification and full permission decisions.
is_read_only() == true
These kinds default to read-only. Individual tools can still override this default via their own metadata.
is_read_only() == false
This branch also includes background tasks, media generation, deployment, and more. Task is explicitly in the false branch.
is_read_only describes the default side-effect semantics; it alone does not imply "auto-execute" or "must prompt." Command rules, workspace permissions, sandboxes, Hooks, and user approval all affect the final outcome. In the display layer, the label for Execute is Run Command.pub fn presentation_name(self) -> &'static str {
match self {
ToolKind::Execute => "Run Command",
/* other presentation_name branches omitted */
}
}
pub fn is_read_only(self) -> bool {
match self {
ToolKind::Read
| ToolKind::Search
| ToolKind::Lsp
| ToolKind::ListDir
| ToolKind::List
| ToolKind::MemorySearch
| ToolKind::MemoryGet
| ToolKind::WebSearch
| ToolKind::WebFetch
| ToolKind::EnterPlan
| ToolKind::ExitPlan
| ToolKind::AskUser => true,
ToolKind::Edit
| ToolKind::Delete
| ToolKind::Write
| ToolKind::Move
| ToolKind::Execute
| ToolKind::Plan
| ToolKind::BackgroundTaskAction
| ToolKind::WaitTasksAction
| ToolKind::KillTaskAction
| ToolKind::Skill
| ToolKind::Task
| ToolKind::ImageGen
| ToolKind::VideoGen
| ToolKind::ImageToVideo
| ToolKind::ReferenceToVideo
| ToolKind::DeployApp
| ToolKind::SearchTool
| ToolKind::UseTool
| ToolKind::Monitor
| ToolKind::GoalUpdate
| ToolKind::Other => false,
}
}
grok-build-main, files crates/codegen/xai-grok-tools/src/types/tool.rs and tool_taxonomy.rs, verified on 2026-07-17. Comments in the excerpt explicitly mark the omitted portions.Identify the classification, then complete the permission context
Analyze Task, Execute, and WebFetch individually. First write the kind's default read-only value and display label, then list the four control signals that must be checked before final execution.
ToolKind::is_read_only() provides a reusable kind-level default. Task is false, there is no TaskOutput kind in the source, and the unified label for Execute is Run Command. Full permission evaluation requires reading further runtime environment and user control signals.
How “Core Visual · Instructional Decision Diagram” becomes executable
“These kinds default to read-only.” is not about a magic phrase. It is about giving the model enough information to know who the work is for, what must be done, and what counts as acceptable.
Background sets direction; constraints set the boundary
“This branch also includes background tasks, media generation, deployment, and more.” shows why a useful request separates the task, audience, source material, output format, and constraints. Without background, the model guesses. Without acceptance criteria, fluent text is not evidence that the task is complete.
More words do not guarantee a better result
Turn “Analyze Task , Execute , and WebFetch individually.” into a small experiment: change only one of background, requirements, or constraints while keeping the rest fixed, then observe which layer actually changes the output.
From “Core Visual · Instructional Decision Diagram” to “is_read_only() == true”
“Core Visual · Instructional Decision Diagram” grounds the problem in “ToolKind Semantic Type is_read_only() Kind Default Tool Override ToolMetadata Env Control Rules · Sandbox · Hook User Control Interactive Approval Final Exec Decision Allow · Deny · Ask Instructional decision d…”. “is_read_only() == true” then moves it toward “These kinds default to read-only. Individual tools can still override this default via their own metadata”. Together, they show that the lesson is not just a conclusion to remember, but a claim with conditions.
Carry the judgment into the next situation
Build a request layer by layer: task and audience first, material and output rules next, constraints and acceptance checks last. Change one layer at a time so you know what actually helped.
- “Core Visual · Instructional Decision Diagram”: ToolKind Semantic Type is_read_only() Kind Default Tool Override ToolMetadata Env Control Rules · Sandbox · Hook User Control Interactive Approval Final Exec Decision Allow · Deny · Ask Instructional decision d…
- “is_read_only() == true”: These kinds default to read-only. Individual tools can still override this default via their own metadata
- “The closing point”: Analyze Task , Execute , and WebFetch individually. First write the kind's default read-only value and display label, then list the four control signals that must be checked before final execution
The final “The closing point” brings the discussion to “Analyze Task , Execute , and WebFetch individually. First write the kind's default read-only value and display label, then list the four control signals that must be checked before final execution”. The useful thing to carry forward is knowing which judgments must be revisited when input, scale, or risk changes.
I turned one judgment from this article into a small experiment I could run today. Knowing what to observe next is more useful than simply remembering the conclusion.
After reading this, I first looked for the conditions behind the idea instead of copying the method into a project. That order made the later trade-offs much clearer.
When this judgment reaches real work, which constraint should be added first? I am curious which step matters most between reading and the first practical attempt.
No discussion on this article yet.