(private readonly config: Config)
| 389 | static readonly Name: string = 'write_file'; |
| 390 | |
| 391 | constructor(private readonly config: Config) { |
| 392 | super( |
| 393 | WriteFileTool.Name, |
| 394 | 'WriteFile', |
| 395 | `Writes content to a specified file in the local filesystem. |
| 396 | |
| 397 | The user has the ability to modify \`content\`. If modified, this will be stated in the response.`, |
| 398 | Kind.Edit, |
| 399 | { |
| 400 | properties: { |
| 401 | file_path: { |
| 402 | description: |
| 403 | "The absolute path to the file to write to (e.g., '/home/user/project/file.txt'). Relative paths are not supported.", |
| 404 | type: 'string', |
| 405 | }, |
| 406 | content: { |
| 407 | description: 'The content to write to the file.', |
| 408 | type: 'string', |
| 409 | }, |
| 410 | }, |
| 411 | required: ['file_path', 'content'], |
| 412 | type: 'object', |
| 413 | }, |
| 414 | ); |
| 415 | } |
| 416 | |
| 417 | protected override validateToolParams( |
| 418 | params: WriteFileToolParams, |
nothing calls this directly
no outgoing calls
no test coverage detected