MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / shouldValidateFile

Function shouldValidateFile

src/ToolHandler.ts:172–186  ·  view source on GitHub ↗
(
  option: FileVerificationOption | undefined,
  isLocal: boolean,
)

Source from the content-addressed store, hash-verified

170}
171
172function shouldValidateFile(
173 option: FileVerificationOption | undefined,
174 isLocal: boolean,
175): option is FileVerificationOption {
176 if (option === true) {
177 return true;
178 }
179 if (typeof option === 'object' && option !== null) {
180 if (isLocal) {
181 return Boolean(option.local);
182 }
183 return Boolean(option.remote);
184 }
185 return false;
186}
187
188/**
189 * `isLocal` tells whether files are accessed on the machine the server runs on,

Callers 1

validateToolFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected