(input: ReadToolInput, context: ToolContext)
| 67 | } |
| 68 | |
| 69 | export async function readFileTool(input: ReadToolInput, context: ToolContext): Promise<ToolResponse> { |
| 70 | const path = resolveAllowedPath(input.path, context.cwd, context.readRoots ?? [context.root]); |
| 71 | const tool = createReadTool(context.cwd); |
| 72 | |
| 73 | return runTool((params) => tool.execute("read_file", params), { |
| 74 | path, |
| 75 | offset: input.offset, |
| 76 | limit: input.limit, |
| 77 | }, context); |
| 78 | } |
| 79 | |
| 80 | export async function writeFileTool(input: WriteToolInput, context: ToolContext): Promise<ToolResponse> { |
| 81 | const path = resolveAllowedPath(input.path, context.cwd, [context.root]); |
no test coverage detected