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

Function execute

coding-agent/src/tools/file-tools.ts:35–49  ·  view source on GitHub ↗
(args: { file_path: string }, context: ToolContext)

Source from the content-addressed store, hash-verified

33 required: ['file_path']
34 },
35 async execute(args: { file_path: string }, context: ToolContext): Promise<ToolResult> {
36 try {
37 const filePath = resolveWorkspacePath(context.workingDirectory, args.file_path);
38 const content = await readFile(filePath, 'utf-8');
39 return {
40 success: true,
41 data: { content, path: args.file_path }
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 writeTool: Tool = {

Callers

nothing calls this directly

Calls 2

resolveWorkspacePathFunction · 0.85
parseMatchesFunction · 0.85

Tested by

no test coverage detected