MCPcopy Create free account
hub / github.com/buct2012dbl/Dorchestrator / execute

Function execute

coding-agent/src/tools/context-tools.ts:22–49  ·  view source on GitHub ↗
(
    args: { query: string; limit?: number },
    context: ToolContext
  )

Source from the content-addressed store, hash-verified

20 required: ['query']
21 },
22 async execute(
23 args: { query: string; limit?: number },
24 context: ToolContext
25 ): Promise<ToolResult> {
26 try {
27 const dbPath = resolve(context.workingDirectory, '.coding-agent/index.db');
28 const indexer = new CodebaseIndexer(dbPath, context.workingDirectory);
29
30 const results = await indexer.search(args.query, {
31 limit: args.limit || 20
32 });
33
34 indexer.close();
35
36 return {
37 success: true,
38 data: {
39 results,
40 count: results.length
41 }
42 };
43 } catch (error) {
44 return {
45 success: false,
46 error: error instanceof Error ? error.message : String(error)
47 };
48 }
49 }
50};
51
52export const getDependenciesTool: Tool = {

Callers

nothing calls this directly

Calls 5

searchMethod · 0.95
closeMethod · 0.95
getDependenciesMethod · 0.95
findSymbolMethod · 0.95
buildIndexMethod · 0.95

Tested by

no test coverage detected