@remcp/runtime 0.2.149 → 0.2.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/src/catalog.mjs +5 -829
- package/src/core-catalog-part1.mjs +373 -0
- package/src/core-catalog-part2.mjs +374 -0
- package/src/core-catalog-shared.mjs +92 -0
- package/src/extended/browser.mjs +24 -4
- package/src/extended/catalog-rules.mjs +253 -0
- package/src/extended/catalog-schemas.mjs +252 -0
- package/src/extended/catalog.mjs +2 -505
- package/src/extended/desktop-macos-windows.mjs +66 -0
- package/src/extended/desktop-macos.mjs +2 -64
- package/src/extended/desktop-windows-msaa.mjs +104 -0
- package/src/extended/desktop-windows.mjs +1 -103
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { fileToolHandlers, searchToolHandlers, terminalToolHandlers, systemToolHandlers, statsToolHandlers, configToolHandlers, readOnly, readOnlyNonIdempotent, additive, mutating, command, TEXT_OUTPUT_SCHEMA, NULLABLE_NUMBER_SCHEMA, NULLABLE_STRING_SCHEMA, START_PROCESS_OUTPUT_SCHEMA, READ_PROCESS_OUTPUT_SCHEMA, WAIT_PROCESS_OUTPUT_SCHEMA, INTERACT_PROCESS_OUTPUT_SCHEMA, TERMINATE_PROCESS_OUTPUT_SCHEMA, LIST_SESSIONS_OUTPUT_SCHEMA } from './core-catalog-shared.mjs';
|
|
2
|
+
|
|
3
|
+
export const coreToolDefinitionsPart1 = [
|
|
4
|
+
{
|
|
5
|
+
name: 'read_file',
|
|
6
|
+
title: 'Read file',
|
|
7
|
+
description: 'Read a plain text or line-oriented file on this computer: source, config, Markdown, scripts or logs. Use read_document for PDF, DOCX, XLSX and other structured documents. Legacy .docx/.pdf extraction remains supported for compatibility. Use offset and length to page through large text files; a negative offset reads from the end.',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
path: { type: 'string', description: 'Absolute path of the file to read. Relative paths resolve against the runtime working directory.' },
|
|
12
|
+
offset: { type: 'number', description: 'Zero-based first line to read. Negative values read the last N lines.' },
|
|
13
|
+
length: { type: 'number', description: 'Maximum number of lines to return.' },
|
|
14
|
+
},
|
|
15
|
+
required: ['path'],
|
|
16
|
+
additionalProperties: false,
|
|
17
|
+
},
|
|
18
|
+
annotations: readOnly,
|
|
19
|
+
handler: fileToolHandlers.read_file,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'read_files',
|
|
23
|
+
title: 'Read files by glob',
|
|
24
|
+
description: 'Read the contents of files discovered by one glob under a directory, each section prefixed with its path and line count. Use this when the matched file contents are the result you want. Use start_search instead to find filenames or text matches without reading every matched file. If you already know the exact paths, use read_multiple_files; for one known path use read_file.',
|
|
25
|
+
inputSchema: {
|
|
26
|
+
type: 'object',
|
|
27
|
+
properties: {
|
|
28
|
+
path: { type: 'string', description: 'Absolute directory (or single file) to start from.' },
|
|
29
|
+
pattern: { type: 'string', description: 'Glob matched against the relative path and the file name, such as "src/**/*.ts" or "*.md". Default **/* .' },
|
|
30
|
+
max_files: { type: 'number', description: 'Stop after this many files. Default 100, maximum 500.' },
|
|
31
|
+
max_lines_per_file: { type: 'number', description: 'Lines kept per file. Default 2000.' },
|
|
32
|
+
include_ignored: { type: 'boolean', description: 'Also descend into .git and node_modules. Default false.' },
|
|
33
|
+
},
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
},
|
|
36
|
+
annotations: readOnly,
|
|
37
|
+
handler: fileToolHandlers.read_files,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'read_multiple_files',
|
|
41
|
+
title: 'Read multiple files',
|
|
42
|
+
description: 'Read several explicitly named text files in one call. Use this when the exact paths are already known; each file is returned separately and one failure does not stop the others. Do not use this for glob discovery: use read_files instead. For one path use read_file.',
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {
|
|
46
|
+
paths: { type: 'array', items: { type: 'string' }, description: 'Absolute paths of the files to read, at most 50 per call.' },
|
|
47
|
+
},
|
|
48
|
+
required: ['paths'],
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
},
|
|
51
|
+
annotations: readOnly,
|
|
52
|
+
handler: fileToolHandlers.read_multiple_files,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'read_image',
|
|
56
|
+
title: 'Read image',
|
|
57
|
+
description: 'Return an image file (PNG, JPEG, GIF, WebP, BMP, AVIF, or SVG) as native MCP image content so screenshots, photos, and diagrams can be inspected or shown. Use read_binary only for byte-for-byte transfer, not merely to display an image. Fails above the inline size limit.',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
path: { type: 'string', description: 'Absolute path of the image file.' },
|
|
62
|
+
},
|
|
63
|
+
required: ['path'],
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
},
|
|
66
|
+
annotations: readOnly,
|
|
67
|
+
handler: fileToolHandlers.read_image,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'read_binary',
|
|
71
|
+
title: 'Read binary chunk',
|
|
72
|
+
description: 'Read any file as base64 chunks for byte-for-byte transfer of binaries, archives, documents, or oversized media. For a normal image that should be inspected or shown, use read_image instead. Returns size, offset, and nextOffsetBytes; call again with offset_bytes set to nextOffsetBytes until complete is true.',
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
properties: {
|
|
76
|
+
path: { type: 'string', description: 'Absolute path of the file to read.' },
|
|
77
|
+
offset_bytes: { type: 'number', description: 'Byte offset to start at. Default 0.' },
|
|
78
|
+
length_bytes: { type: 'number', description: 'Chunk size in bytes. Default and maximum 1048576 (1 MiB).' },
|
|
79
|
+
},
|
|
80
|
+
required: ['path'],
|
|
81
|
+
additionalProperties: false,
|
|
82
|
+
},
|
|
83
|
+
annotations: readOnly,
|
|
84
|
+
handler: fileToolHandlers.read_binary,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'write_binary',
|
|
88
|
+
title: 'Write binary chunk',
|
|
89
|
+
description: 'Write base64 data to a file byte for byte, creating parent directories. Use mode "append" to send a large file as consecutive chunks. Replaces the file by default.',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
path: { type: 'string', description: 'Absolute path of the file to write.' },
|
|
94
|
+
data: { type: 'string', description: 'Base64-encoded content.' },
|
|
95
|
+
mode: { type: 'string', enum: ['rewrite', 'append'], description: 'rewrite replaces the file, append adds to the end. Default rewrite.' },
|
|
96
|
+
},
|
|
97
|
+
required: ['path', 'data'],
|
|
98
|
+
additionalProperties: false,
|
|
99
|
+
},
|
|
100
|
+
annotations: mutating,
|
|
101
|
+
handler: fileToolHandlers.write_binary,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'hash_file',
|
|
105
|
+
title: 'Hash file',
|
|
106
|
+
description: 'Compute a checksum of a file without reading it into memory. Useful to verify a copy, compare two files, or confirm a download.',
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: 'object',
|
|
109
|
+
properties: {
|
|
110
|
+
path: { type: 'string', description: 'Absolute path of the file to hash.' },
|
|
111
|
+
algorithm: { type: 'string', enum: ['sha256', 'sha1', 'md5'], description: 'Hash algorithm. Default sha256.' },
|
|
112
|
+
},
|
|
113
|
+
required: ['path'],
|
|
114
|
+
additionalProperties: false,
|
|
115
|
+
},
|
|
116
|
+
annotations: readOnly,
|
|
117
|
+
handler: fileToolHandlers.hash_file,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'list_directory',
|
|
121
|
+
title: 'List directory',
|
|
122
|
+
description: 'List the files and directories at a path. Entries are prefixed with [DIR], [FILE], [LINK], or [DENIED] when a subdirectory cannot be read. depth controls how many directory levels are included and pattern filters file names by glob.',
|
|
123
|
+
inputSchema: {
|
|
124
|
+
type: 'object',
|
|
125
|
+
properties: {
|
|
126
|
+
path: { type: 'string', description: 'Absolute path of the directory to list.' },
|
|
127
|
+
depth: { type: 'number', description: 'Directory levels to list, from 1 to 5. Default 1.' },
|
|
128
|
+
pattern: { type: 'string', description: 'Optional glob that filters file names, such as "*.log". Directories are always listed.' },
|
|
129
|
+
},
|
|
130
|
+
required: ['path'],
|
|
131
|
+
additionalProperties: false,
|
|
132
|
+
},
|
|
133
|
+
annotations: readOnly,
|
|
134
|
+
handler: fileToolHandlers.list_directory,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: 'get_file_info',
|
|
138
|
+
title: 'Get file info',
|
|
139
|
+
description: 'Return metadata for a file or directory: type, size, timestamps, permissions, and for small text files the line count.',
|
|
140
|
+
inputSchema: {
|
|
141
|
+
type: 'object',
|
|
142
|
+
properties: {
|
|
143
|
+
path: { type: 'string', description: 'Absolute path to inspect.' },
|
|
144
|
+
},
|
|
145
|
+
required: ['path'],
|
|
146
|
+
additionalProperties: false,
|
|
147
|
+
},
|
|
148
|
+
annotations: readOnly,
|
|
149
|
+
handler: fileToolHandlers.get_file_info,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'write_file',
|
|
153
|
+
title: 'Write file',
|
|
154
|
+
description: 'Create or replace the complete contents of exactly one text file. Parent directories are created automatically; mode "append" adds to the end. For a small exact-block edit use edit_block, for a known line range use replace_lines, and when you already have a unified diff use apply_patch. Use write_files for two or more independent complete files, and write_binary for binary bytes.',
|
|
155
|
+
inputSchema: {
|
|
156
|
+
type: 'object',
|
|
157
|
+
properties: {
|
|
158
|
+
path: { type: 'string', description: 'Absolute path of the file to write.' },
|
|
159
|
+
content: { type: 'string', description: 'Full file content, or the text to append.' },
|
|
160
|
+
mode: { type: 'string', enum: ['rewrite', 'append'], description: 'rewrite replaces the file content, append adds to the end. Default rewrite.' },
|
|
161
|
+
},
|
|
162
|
+
required: ['path', 'content'],
|
|
163
|
+
additionalProperties: false,
|
|
164
|
+
},
|
|
165
|
+
annotations: mutating,
|
|
166
|
+
handler: fileToolHandlers.write_file,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'write_files',
|
|
170
|
+
title: 'Write multiple files',
|
|
171
|
+
description: 'Create or replace the complete contents of two or more text files in one batch, each with its own path, content, and optional mode. Use this for scaffolding or coherent multi-file writes; for one path use write_file. For partial edits use edit_block, replace_lines, replace_in_files, or apply_patch instead of rewriting whole files.',
|
|
172
|
+
inputSchema: {
|
|
173
|
+
type: 'object',
|
|
174
|
+
properties: {
|
|
175
|
+
files: {
|
|
176
|
+
type: 'array',
|
|
177
|
+
description: 'Files to write, at most 200 per call.',
|
|
178
|
+
items: {
|
|
179
|
+
type: 'object',
|
|
180
|
+
properties: {
|
|
181
|
+
path: { type: 'string', description: 'Absolute path of the file.' },
|
|
182
|
+
content: { type: 'string', description: 'Full file content.' },
|
|
183
|
+
mode: { type: 'string', enum: ['rewrite', 'append'], description: 'rewrite replaces the file (default), append adds to the end.' },
|
|
184
|
+
},
|
|
185
|
+
required: ['path', 'content'],
|
|
186
|
+
additionalProperties: false,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
required: ['files'],
|
|
191
|
+
additionalProperties: false,
|
|
192
|
+
},
|
|
193
|
+
annotations: mutating,
|
|
194
|
+
handler: fileToolHandlers.write_files,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: 'apply_patch',
|
|
198
|
+
title: 'Apply patch',
|
|
199
|
+
description: 'Apply an already-prepared unified diff to one file or several files, matching each hunk with a little fuzz so small offsets and whitespace differences still apply. Prefer this when the change is naturally patch-shaped; use edit_block for one exact text block and write_file only when replacing a complete file. Pass dry_run to see the result first.',
|
|
200
|
+
inputSchema: {
|
|
201
|
+
type: 'object',
|
|
202
|
+
properties: {
|
|
203
|
+
patch: { type: 'string', description: 'Unified diff, including ---/+++ headers and @@ hunks.' },
|
|
204
|
+
path: { type: 'string', description: 'Apply every hunk to this file, ignoring the patch headers.' },
|
|
205
|
+
dry_run: { type: 'boolean', description: 'Report the diff without writing. Default false.' },
|
|
206
|
+
},
|
|
207
|
+
required: ['patch'],
|
|
208
|
+
additionalProperties: false,
|
|
209
|
+
},
|
|
210
|
+
annotations: mutating,
|
|
211
|
+
handler: fileToolHandlers.apply_patch,
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'set_permissions',
|
|
215
|
+
title: 'Set permissions',
|
|
216
|
+
description: 'Change the permission mode of a file or directory, optionally recursively and optionally with a numeric owner. Use this to make a script executable after writing it.',
|
|
217
|
+
inputSchema: {
|
|
218
|
+
type: 'object',
|
|
219
|
+
properties: {
|
|
220
|
+
path: { type: 'string', description: 'Absolute path whose permissions should change.' },
|
|
221
|
+
mode: { type: 'string', description: 'Octal mode such as "755" or "0644".' },
|
|
222
|
+
recursive: { type: 'boolean', description: 'Apply to a directory and everything inside it. Default false.' },
|
|
223
|
+
uid: { type: 'number', description: 'Optional numeric user id to set as owner.' },
|
|
224
|
+
gid: { type: 'number', description: 'Optional numeric group id to set as owner.' },
|
|
225
|
+
},
|
|
226
|
+
required: ['path', 'mode'],
|
|
227
|
+
additionalProperties: false,
|
|
228
|
+
},
|
|
229
|
+
annotations: mutating,
|
|
230
|
+
handler: fileToolHandlers.set_permissions,
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: 'edit_block',
|
|
234
|
+
title: 'Edit file',
|
|
235
|
+
description: 'Replace one known text block in one file. Provide enough surrounding context to make old_string unique; the call fails unless the number of matches equals expected_replacements. Use write_file for a whole-file replacement and replace_lines for a known line range. When exact text is not found, a whitespace-tolerant match is attempted and reported. Pass dry_run to preview without writing.',
|
|
236
|
+
inputSchema: {
|
|
237
|
+
type: 'object',
|
|
238
|
+
properties: {
|
|
239
|
+
file_path: { type: 'string', description: 'Absolute path of the file to edit.' },
|
|
240
|
+
old_string: { type: 'string', description: 'Exact existing text to replace.' },
|
|
241
|
+
new_string: { type: 'string', description: 'Replacement text.' },
|
|
242
|
+
expected_replacements: { type: 'number', description: 'Number of matches required for the edit to apply. Default 1.' },
|
|
243
|
+
allow_fuzzy: { type: 'boolean', description: 'Allow a whitespace-tolerant fallback when the exact text is not found. Default true.' },
|
|
244
|
+
dry_run: { type: 'boolean', description: 'Return the diff without changing the file. Default false.' },
|
|
245
|
+
},
|
|
246
|
+
required: ['file_path', 'old_string', 'new_string'],
|
|
247
|
+
additionalProperties: false,
|
|
248
|
+
},
|
|
249
|
+
annotations: mutating,
|
|
250
|
+
handler: fileToolHandlers.edit_block,
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'replace_lines',
|
|
254
|
+
title: 'Replace lines',
|
|
255
|
+
description: 'Replace an inclusive 1-based line range with new text. Use this when line numbers define the target; use edit_block when matching existing text and write_file for a complete rewrite. The rest of the file, including its line endings, is preserved. Pass dry_run to preview without writing.',
|
|
256
|
+
inputSchema: {
|
|
257
|
+
type: 'object',
|
|
258
|
+
properties: {
|
|
259
|
+
path: { type: 'string', description: 'Absolute path of the file to edit.' },
|
|
260
|
+
start_line: { type: 'number', description: 'First line to replace, 1-based and inclusive.' },
|
|
261
|
+
end_line: { type: 'number', description: 'Last line to replace, 1-based and inclusive.' },
|
|
262
|
+
content: { type: 'string', description: 'Replacement text; an empty string deletes the range.' },
|
|
263
|
+
dry_run: { type: 'boolean', description: 'Return the diff without changing the file. Default false.' },
|
|
264
|
+
},
|
|
265
|
+
required: ['path', 'start_line', 'end_line', 'content'],
|
|
266
|
+
additionalProperties: false,
|
|
267
|
+
},
|
|
268
|
+
annotations: mutating,
|
|
269
|
+
handler: fileToolHandlers.replace_lines,
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: 'replace_in_files',
|
|
273
|
+
title: 'Replace in files',
|
|
274
|
+
description: 'Search and replace the same text or regular expression across multiple text files under a path and report what changed. Use edit_block for one known block in one file and write_file for one complete known file. Applies immediately; pass dry_run true to preview the affected files first.',
|
|
275
|
+
inputSchema: {
|
|
276
|
+
type: 'object',
|
|
277
|
+
properties: {
|
|
278
|
+
path: { type: 'string', description: 'Absolute path of a file or directory to search.' },
|
|
279
|
+
pattern: { type: 'string', description: 'Text or regular expression to find.' },
|
|
280
|
+
replacement: { type: 'string', description: 'Replacement text. In regex mode, $1 and friends refer to capture groups.' },
|
|
281
|
+
filePattern: { type: 'string', description: 'Optional glob limiting which file names are changed, such as "*.ts".' },
|
|
282
|
+
regex: { type: 'boolean', description: 'Treat pattern as a regular expression. Default false (plain text).' },
|
|
283
|
+
dry_run: { type: 'boolean', description: 'Only report the files that would change. Default false.' },
|
|
284
|
+
maxFiles: { type: 'number', description: 'Stop after this many changed files. Default 100, maximum 500.' },
|
|
285
|
+
},
|
|
286
|
+
required: ['path', 'pattern', 'replacement'],
|
|
287
|
+
additionalProperties: false,
|
|
288
|
+
},
|
|
289
|
+
annotations: mutating,
|
|
290
|
+
handler: fileToolHandlers.replace_in_files,
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: 'diff_files',
|
|
294
|
+
title: 'Diff files',
|
|
295
|
+
description: 'Show a unified diff between two local text files, with line counts. Useful to check what changed before reporting or reverting it.',
|
|
296
|
+
inputSchema: {
|
|
297
|
+
type: 'object',
|
|
298
|
+
properties: {
|
|
299
|
+
left: { type: 'string', description: 'Absolute path of the original file.' },
|
|
300
|
+
right: { type: 'string', description: 'Absolute path of the file to compare against it.' },
|
|
301
|
+
context_lines: { type: 'number', description: 'Lines of context around each change. Default 3, maximum 20.' },
|
|
302
|
+
},
|
|
303
|
+
required: ['left', 'right'],
|
|
304
|
+
additionalProperties: false,
|
|
305
|
+
},
|
|
306
|
+
annotations: readOnly,
|
|
307
|
+
handler: fileToolHandlers.diff_files,
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'move_to_trash',
|
|
311
|
+
title: 'Move to trash',
|
|
312
|
+
description: 'Move a file or directory to the system trash instead of deleting it, so the change can be undone. When the trash is outside the device allowed roots, a .remcp-trash folder beside the file is used instead.',
|
|
313
|
+
inputSchema: {
|
|
314
|
+
type: 'object',
|
|
315
|
+
properties: {
|
|
316
|
+
source: { type: 'string', description: 'Absolute path to move to the trash.' },
|
|
317
|
+
},
|
|
318
|
+
required: ['source'],
|
|
319
|
+
additionalProperties: false,
|
|
320
|
+
},
|
|
321
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
322
|
+
handler: fileToolHandlers.move_to_trash,
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
name: 'create_directory',
|
|
326
|
+
title: 'Create directories',
|
|
327
|
+
description: 'Create one directory or many in a single call, including any missing parent directories. Succeeds when a directory already exists.',
|
|
328
|
+
inputSchema: {
|
|
329
|
+
type: 'object',
|
|
330
|
+
properties: {
|
|
331
|
+
path: { type: 'string', description: 'Absolute path of the directory to create.' },
|
|
332
|
+
paths: { type: 'array', items: { type: 'string' }, description: 'Several directories to create at once, at most 200.' },
|
|
333
|
+
},
|
|
334
|
+
additionalProperties: false,
|
|
335
|
+
},
|
|
336
|
+
annotations: additive,
|
|
337
|
+
handler: fileToolHandlers.create_directory,
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'move_file',
|
|
341
|
+
title: 'Move or rename',
|
|
342
|
+
description: 'Move or rename exactly one file or directory from one source to one destination. Replaces an existing destination file by default; pass overwrite false to refuse instead. Use move_paths for two or more moves.',
|
|
343
|
+
inputSchema: {
|
|
344
|
+
type: 'object',
|
|
345
|
+
properties: {
|
|
346
|
+
source: { type: 'string', description: 'Absolute path to move.' },
|
|
347
|
+
destination: { type: 'string', description: 'Absolute destination path.' },
|
|
348
|
+
overwrite: { type: 'boolean', description: 'Replace an existing destination file. Default true.' },
|
|
349
|
+
},
|
|
350
|
+
required: ['source', 'destination'],
|
|
351
|
+
additionalProperties: false,
|
|
352
|
+
},
|
|
353
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
354
|
+
handler: fileToolHandlers.move_file,
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
name: 'copy_file',
|
|
358
|
+
title: 'Copy file',
|
|
359
|
+
description: 'Copy exactly one regular file to a new path. Directories are not copied recursively. Use copy_paths for directories or two or more copy operations; pass overwrite false to refuse an existing destination.',
|
|
360
|
+
inputSchema: {
|
|
361
|
+
type: 'object',
|
|
362
|
+
properties: {
|
|
363
|
+
source: { type: 'string', description: 'Absolute path of the file to copy.' },
|
|
364
|
+
destination: { type: 'string', description: 'Absolute destination path.' },
|
|
365
|
+
overwrite: { type: 'boolean', description: 'Replace the destination when it already exists. Default true.' },
|
|
366
|
+
},
|
|
367
|
+
required: ['source', 'destination'],
|
|
368
|
+
additionalProperties: false,
|
|
369
|
+
},
|
|
370
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
371
|
+
handler: fileToolHandlers.copy_file,
|
|
372
|
+
},
|
|
373
|
+
];
|