MCPcopy Create free account
hub / github.com/freecodexyz/free-code / isSearchOrReadCommand

Function isSearchOrReadCommand

src/tools/PowerShellTool/PowerShellTool.tsx:288–299  ·  view source on GitHub ↗
(input: Partial<PowerShellToolInput>)

Source from the content-addressed store, hash-verified

286 return this.isReadOnly?.(input) ?? false;
287 },
288 isSearchOrReadCommand(input: Partial<PowerShellToolInput>): {
289 isSearch: boolean;
290 isRead: boolean;
291 } {
292 if (!input.command) {
293 return {
294 isSearch: false,
295 isRead: false
296 };
297 }
298 return isSearchOrReadPowerShellCommand(input.command);
299 },
300 isReadOnly(input: PowerShellToolInput): boolean {
301 // Check sync security heuristics before declaring read-only.
302 // The full AST parse is async and unavailable here, so we use

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected