MCPcopy
hub / github.com/codeaashu/claude-code / call

Function call

src/tools/GlobTool/GlobTool.ts:154–176  ·  view source on GitHub ↗
(input, { abortController, getAppState, globLimits })

Source from the content-addressed store, hash-verified

152 return filenames.join('\n')
153 },
154 async call(input, { abortController, getAppState, globLimits }) {
155 const start = Date.now()
156 const appState = getAppState()
157 const limit = globLimits?.maxResults ?? 100
158 const { files, truncated } = await glob(
159 input.pattern,
160 GlobTool.getPath(input),
161 { limit, offset: 0 },
162 abortController.signal,
163 appState.toolPermissionContext,
164 )
165 // Relativize paths under cwd to save tokens (same as GrepTool)
166 const filenames = files.map(toRelativePath)
167 const output: Output = {
168 filenames,
169 durationMs: Date.now() - start,
170 numFiles: filenames.length,
171 truncated,
172 }
173 return {
174 data: output,
175 }
176 },
177 mapToolResultToToolResultBlockParam(output, toolUseID) {
178 if (output.filenames.length === 0) {
179 return {

Callers

nothing calls this directly

Calls 2

globFunction · 0.85
getAppStateFunction · 0.50

Tested by

no test coverage detected