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

Function shouldValidateFile

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

Source from the content-addressed store, hash-verified

145}
146
147function shouldValidateFile(
148 option: FileVerificationOption | undefined,
149 isLocal: boolean,
150): option is FileVerificationOption {
151 if (option === true) {
152 return true;
153 }
154 if (typeof option === 'object' && option !== null) {
155 if (isLocal) {
156 return Boolean(option.local);
157 }
158 return Boolean(option.remote);
159 }
160 return false;
161}
162
163/**
164 * `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