@wp-playground/mcp 3.1.15 → 3.1.16

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.
@@ -0,0 +1,617 @@
1
+ const h = "https://playground.wordpress.net/";
2
+ function m(e) {
3
+ return `${h}?mcp=yes&mcp-port=${e}`;
4
+ }
5
+ const w = {
6
+ playground_execute_php: {
7
+ title: "Execute PHP Code",
8
+ errorPrefix: "Error executing PHP",
9
+ description: `Run arbitrary PHP code in WordPress Playground
10
+ and return the output.
11
+
12
+ WordPress is NOT bootstrapped automatically. To use
13
+ WordPress functions, start your code with:
14
+ require("/wordpress/wp-load.php");
15
+ Always include the opening <?php tag.
16
+
17
+ The response JSON contains three fields:
18
+ - "text": stdout output
19
+ - "errors": PHP warnings, notices, and fatal error
20
+ messages from stderr
21
+ - "exitCode": 0 on success, non-zero on fatal error
22
+ Check both "errors" and "exitCode" to determine
23
+ whether the call succeeded.
24
+
25
+ WARNING: output is returned in full with no
26
+ truncation — avoid queries that produce unbounded
27
+ output (e.g. SELECT * without LIMIT). Keep output
28
+ under 50 KB to avoid filling the context window.`,
29
+ annotations: {
30
+ readOnlyHint: !1,
31
+ destructiveHint: !0,
32
+ idempotentHint: !1,
33
+ openWorldHint: !0
34
+ },
35
+ params: [
36
+ {
37
+ name: "code",
38
+ type: "string",
39
+ description: `PHP code to execute. Example:
40
+ "<?php echo get_bloginfo('name');"`,
41
+ required: !0
42
+ }
43
+ ]
44
+ },
45
+ playground_request: {
46
+ title: "HTTP Request",
47
+ errorPrefix: "Error making request",
48
+ description: `Make an HTTP request to the WordPress site
49
+ running in Playground. REST API requests
50
+ (/wp-json/* or ?rest_route=) are automatically
51
+ authenticated with a valid nonce — no manual
52
+ auth needed.
53
+
54
+ Tool selection guide:
55
+ 1. Use this tool (playground_request) with the
56
+ REST API for standard content CRUD — posts,
57
+ pages, users, terms, comments, settings, etc.
58
+ The REST API handles serialization, pagination,
59
+ and field filtering for you.
60
+ 2. Use playground_execute_php when the data you
61
+ need is not exposed by the REST API (e.g.
62
+ raw options, direct database queries, or
63
+ custom table access).
64
+ 3. Use this tool as a plain HTTP request (non-REST)
65
+ when the HTTP layer itself matters: verifying
66
+ redirects, status codes, cookies, or response
67
+ headers.
68
+
69
+ The response JSON contains three fields:
70
+ - "text": the response body as a string
71
+ - "httpStatusCode": HTTP status code (200, 404…)
72
+ - "headers": response headers as key-value pairs
73
+ Check "httpStatusCode" to determine success.
74
+
75
+ Note: full HTML responses can be very large and may
76
+ fill the context window. To change the URL the user
77
+ sees in their tab, use playground_navigate instead.`,
78
+ annotations: {
79
+ readOnlyHint: !1,
80
+ destructiveHint: !1,
81
+ idempotentHint: !1,
82
+ openWorldHint: !0
83
+ },
84
+ params: [
85
+ {
86
+ name: "url",
87
+ type: "string",
88
+ description: `Request URL path, e.g.
89
+ "/wp-json/wp/v2/posts" or
90
+ "/wp-admin/plugins.php"`,
91
+ required: !0
92
+ },
93
+ {
94
+ name: "method",
95
+ type: "string",
96
+ description: `HTTP method (GET, POST, PUT,
97
+ DELETE, etc.). Defaults to GET.`,
98
+ required: !1,
99
+ default: "GET"
100
+ },
101
+ {
102
+ name: "headers",
103
+ type: "object",
104
+ description: `Request headers as string key-value
105
+ pairs, e.g. {"Content-Type":
106
+ "application/json"}`,
107
+ required: !1,
108
+ additionalProperties: !0
109
+ },
110
+ {
111
+ name: "body",
112
+ type: "string",
113
+ description: "Request body (for POST/PUT requests)",
114
+ required: !1
115
+ }
116
+ ]
117
+ },
118
+ playground_navigate: {
119
+ title: "Navigate to URL",
120
+ errorPrefix: "Error navigating",
121
+ description: `Navigate to a URL path in WordPress
122
+ Playground and return the final URL after any
123
+ redirects. Examples: "/wp-admin/",
124
+ "/wp-login.php", "/".
125
+
126
+ On 404 or error pages, navigation still succeeds
127
+ from the tool's perspective — check the returned
128
+ URL or use playground_request to verify the HTTP
129
+ status code if needed.`,
130
+ annotations: {
131
+ readOnlyHint: !1,
132
+ destructiveHint: !1,
133
+ idempotentHint: !1,
134
+ openWorldHint: !0
135
+ },
136
+ params: [
137
+ {
138
+ name: "path",
139
+ type: "string",
140
+ description: `The URL path to navigate to,
141
+ e.g. "/wp-admin/" or
142
+ "/wp-login.php"`,
143
+ required: !0
144
+ }
145
+ ]
146
+ },
147
+ playground_get_current_url: {
148
+ title: "Get Current URL",
149
+ errorPrefix: "Error getting current URL",
150
+ description: `Get the current URL path of the WordPress
151
+ site displayed in Playground. For additional
152
+ metadata (WordPress version, PHP version, document
153
+ root), use playground_get_site_info instead.`,
154
+ annotations: {
155
+ readOnlyHint: !0,
156
+ destructiveHint: !1,
157
+ openWorldHint: !0
158
+ },
159
+ params: []
160
+ },
161
+ playground_get_site_info: {
162
+ title: "Get Site Info",
163
+ errorPrefix: "Error getting site info",
164
+ description: `Get metadata about the running WordPress
165
+ instance: current URL, document root, site URL,
166
+ WordPress version, and PHP version. Use this when
167
+ you need version information or the document root
168
+ path. For just the current URL, prefer
169
+ playground_get_current_url.`,
170
+ annotations: {
171
+ readOnlyHint: !0,
172
+ destructiveHint: !1,
173
+ openWorldHint: !0
174
+ },
175
+ params: []
176
+ },
177
+ playground_read_file: {
178
+ title: "Read File",
179
+ errorPrefix: "Error reading file",
180
+ description: `Read a file from the WordPress virtual
181
+ filesystem. Returns the file contents as text.`,
182
+ annotations: {
183
+ readOnlyHint: !0,
184
+ destructiveHint: !1,
185
+ openWorldHint: !0
186
+ },
187
+ params: [
188
+ {
189
+ name: "path",
190
+ type: "string",
191
+ description: `Absolute path to the file, e.g.
192
+ "/wordpress/wp-config.php"`,
193
+ required: !0
194
+ }
195
+ ]
196
+ },
197
+ playground_write_file: {
198
+ title: "Write File",
199
+ errorPrefix: "Error writing file",
200
+ description: `Write content to a file in the WordPress
201
+ virtual filesystem.
202
+
203
+ WARNING: Overwrites the entire file — existing
204
+ content is permanently lost. Read the file first
205
+ with playground_read_file if you need to preserve
206
+ any content.
207
+
208
+ Creates the file if it does not exist. Parent
209
+ directories are NOT created automatically — call
210
+ playground_mkdir first if needed, otherwise the
211
+ write will fail with a "no such file or directory"
212
+ error.`,
213
+ annotations: {
214
+ readOnlyHint: !1,
215
+ destructiveHint: !0,
216
+ idempotentHint: !1,
217
+ openWorldHint: !0
218
+ },
219
+ params: [
220
+ {
221
+ name: "path",
222
+ type: "string",
223
+ description: `Absolute path to write to, e.g.
224
+ "/wordpress/wp-content/test.txt"`,
225
+ required: !0
226
+ },
227
+ {
228
+ name: "contents",
229
+ type: "string",
230
+ description: "File contents to write",
231
+ required: !0
232
+ }
233
+ ]
234
+ },
235
+ playground_list_files: {
236
+ title: "List Files",
237
+ errorPrefix: "Error listing files",
238
+ description: `List files and directories at a given path
239
+ in the WordPress virtual filesystem. Returns a
240
+ flat, non-recursive listing of the immediate
241
+ contents. To explore subdirectories, call this tool
242
+ again with the subdirectory path.`,
243
+ annotations: {
244
+ readOnlyHint: !0,
245
+ destructiveHint: !1,
246
+ openWorldHint: !0
247
+ },
248
+ params: [
249
+ {
250
+ name: "path",
251
+ type: "string",
252
+ description: `Absolute path to list, e.g.
253
+ "/wordpress/wp-content/plugins"`,
254
+ required: !0
255
+ }
256
+ ]
257
+ },
258
+ playground_mkdir: {
259
+ title: "Create Directory",
260
+ errorPrefix: "Error creating directory",
261
+ description: `Create a directory (and all required parent
262
+ directories) in the WordPress virtual filesystem.
263
+ Call this before playground_write_file when writing
264
+ to a path whose parent directories do not yet
265
+ exist.`,
266
+ annotations: {
267
+ readOnlyHint: !1,
268
+ destructiveHint: !1,
269
+ idempotentHint: !0,
270
+ openWorldHint: !0
271
+ },
272
+ params: [
273
+ {
274
+ name: "path",
275
+ type: "string",
276
+ description: `Absolute path of directory to
277
+ create, e.g.
278
+ "/wordpress/wp-content/my-plugin"`,
279
+ required: !0
280
+ }
281
+ ]
282
+ },
283
+ playground_delete_file: {
284
+ title: "Delete File",
285
+ errorPrefix: "Error deleting file",
286
+ description: `Delete a file from the WordPress virtual
287
+ filesystem.
288
+
289
+ WARNING: Deletion is permanent and cannot be
290
+ undone. Returns an error if the file does not
291
+ exist — use playground_file_exists first if
292
+ deletion is conditional.`,
293
+ annotations: {
294
+ readOnlyHint: !1,
295
+ destructiveHint: !0,
296
+ idempotentHint: !1,
297
+ openWorldHint: !0
298
+ },
299
+ params: [
300
+ {
301
+ name: "path",
302
+ type: "string",
303
+ description: "Absolute path of file to delete",
304
+ required: !0
305
+ }
306
+ ]
307
+ },
308
+ playground_delete_directory: {
309
+ title: "Delete Directory",
310
+ errorPrefix: "Error deleting directory",
311
+ description: `Delete a directory from the WordPress
312
+ virtual filesystem.
313
+
314
+ WARNING: Deletion is permanent and cannot be
315
+ undone. By default (recursive=false), the directory
316
+ must be empty or the call will fail. Set
317
+ recursive=true to delete a directory and all its
318
+ contents — use with care.`,
319
+ annotations: {
320
+ readOnlyHint: !1,
321
+ destructiveHint: !0,
322
+ idempotentHint: !1,
323
+ openWorldHint: !0
324
+ },
325
+ params: [
326
+ {
327
+ name: "path",
328
+ type: "string",
329
+ description: "Absolute path of directory to delete",
330
+ required: !0
331
+ },
332
+ {
333
+ name: "recursive",
334
+ type: "boolean",
335
+ description: `If true, delete directory and
336
+ all contents. If false (default), fails
337
+ on non-empty directories.`,
338
+ required: !1,
339
+ default: !1
340
+ }
341
+ ]
342
+ },
343
+ playground_file_exists: {
344
+ title: "File Exists",
345
+ errorPrefix: "Error checking file existence",
346
+ description: `Check whether a file or directory exists
347
+ in the WordPress virtual filesystem.`,
348
+ annotations: {
349
+ readOnlyHint: !0,
350
+ destructiveHint: !1,
351
+ openWorldHint: !0
352
+ },
353
+ params: [
354
+ {
355
+ name: "path",
356
+ type: "string",
357
+ description: "Absolute path to check",
358
+ required: !0
359
+ }
360
+ ]
361
+ }
362
+ };
363
+ function _() {
364
+ return {
365
+ playground_list_sites: {
366
+ title: "List Available Sites",
367
+ errorPrefix: "Error listing sites",
368
+ description: `List all WordPress Playground sites
369
+ available. Call this before any other playground
370
+ tool — it returns the siteId required by every
371
+ other operation.
372
+
373
+ If this returns no sites, the user may need to
374
+ open Playground in their browser. Use
375
+ playground_get_website_url to get the exact URL
376
+ to send to the user.
377
+
378
+ Returns site names and storage type. "temporary"
379
+ sites are lost on page reload, "opfs" sites persist
380
+ across reloads. Call playground_save_in_browser to persist
381
+ a temporary site.`,
382
+ annotations: {
383
+ readOnlyHint: !0,
384
+ destructiveHint: !1
385
+ },
386
+ params: []
387
+ },
388
+ playground_open_site_in_new_tab: {
389
+ title: "Open Site in New Tab",
390
+ errorPrefix: "Error opening site in new tab",
391
+ description: `Open a WordPress Playground site in a new
392
+ browser tab. The site must appear in
393
+ playground_list_sites.
394
+
395
+ Check playground_get_current_url first — if the
396
+ site is already open in a tab, calling this tool
397
+ will open a second tab rather than switching to
398
+ the existing one.`,
399
+ annotations: {
400
+ readOnlyHint: !1,
401
+ destructiveHint: !1
402
+ },
403
+ params: []
404
+ },
405
+ playground_rename_site: {
406
+ title: "Rename Site",
407
+ errorPrefix: "Error renaming site",
408
+ description: `Rename a WordPress Playground site. Updates
409
+ the display name shown in the browser UI.`,
410
+ annotations: {
411
+ readOnlyHint: !1,
412
+ destructiveHint: !1
413
+ },
414
+ params: [
415
+ {
416
+ name: "newName",
417
+ type: "string",
418
+ description: "The new display name for the site",
419
+ required: !0
420
+ }
421
+ ]
422
+ },
423
+ playground_save_in_browser: {
424
+ title: "Save in Browser",
425
+ errorPrefix: "Error saving site",
426
+ description: `Save a temporary WordPress Playground site
427
+ to browser storage so it survives page reloads.
428
+ Safe to call even if the site is already saved
429
+ (no-op).
430
+
431
+ Sites start as temporary by default and are lost
432
+ when the browser tab is closed or the page is
433
+ reloaded. Call this early in any multi-step
434
+ workflow where losing progress would be costly.`,
435
+ annotations: {
436
+ readOnlyHint: !1,
437
+ destructiveHint: !1
438
+ },
439
+ params: []
440
+ },
441
+ playground_get_website_url: {
442
+ title: "Get Playground Website URL",
443
+ errorPrefix: "Error getting website URL",
444
+ description: `Return the URL the user must open in their
445
+ browser to use WordPress Playground with this MCP
446
+ server. Use this tool whenever you need to send
447
+ the user to Playground or open it autonomously —
448
+ always obtain the URL from this tool rather than
449
+ constructing it manually.`,
450
+ annotations: {
451
+ readOnlyHint: !0,
452
+ destructiveHint: !1,
453
+ idempotentHint: !0,
454
+ openWorldHint: !1
455
+ },
456
+ params: []
457
+ }
458
+ };
459
+ }
460
+ function P(e) {
461
+ if (e instanceof Error)
462
+ return e.message;
463
+ if (typeof e == "string")
464
+ return e;
465
+ try {
466
+ return JSON.stringify(e);
467
+ } catch {
468
+ return String(e);
469
+ }
470
+ }
471
+ function v(e) {
472
+ return e === "none" ? "temporary" : e;
473
+ }
474
+ function H(e) {
475
+ const t = {}, i = [];
476
+ for (const r of e) {
477
+ const o = {
478
+ type: r.type,
479
+ description: r.description
480
+ };
481
+ r.additionalProperties !== void 0 && (o.additionalProperties = r.additionalProperties), r.default !== void 0 && (o.default = r.default), t[r.name] = o, r.required && i.push(r.name);
482
+ }
483
+ const n = {
484
+ type: "object",
485
+ properties: t
486
+ };
487
+ return i.length > 0 && (n.required = i), n;
488
+ }
489
+ async function y(e) {
490
+ const [t, i] = await Promise.all([
491
+ e.getCurrentURL(),
492
+ e.run({
493
+ code: `<?php
494
+ require_once "/wordpress/wp-load.php";
495
+ echo json_encode([
496
+ "documentRoot" => ABSPATH,
497
+ "wpVersion" => get_bloginfo("version"),
498
+ "siteUrl" => get_site_url(),
499
+ "phpVersion" => phpversion(),
500
+ ]);`
501
+ }).then((r) => r.text)
502
+ ]);
503
+ let n;
504
+ try {
505
+ n = JSON.parse(i);
506
+ } catch {
507
+ n = {};
508
+ }
509
+ return {
510
+ url: String(t),
511
+ documentRoot: n.documentRoot ?? "/wordpress",
512
+ siteUrl: n.siteUrl ?? String(t),
513
+ wpVersion: n.wpVersion ?? "unknown",
514
+ phpVersion: n.phpVersion ?? "unknown"
515
+ };
516
+ }
517
+ const b = {
518
+ playground_execute_php: (e, t) => e.run({ code: t.code }),
519
+ playground_request: async (e, t) => {
520
+ const i = t.url, n = t.method ?? "GET", r = {
521
+ ...t.headers ?? {}
522
+ }, o = t.body;
523
+ try {
524
+ const a = new URL(i, "http://localhost"), l = i.includes("/wp-json/") || a.searchParams.has("rest_route");
525
+ l && o && !Object.keys(r).some(
526
+ (s) => s.toLowerCase() === "content-type"
527
+ ) && (r["Content-Type"] = "application/json");
528
+ const p = Object.keys(r).some(
529
+ (s) => s.toLowerCase() === "x-wp-nonce"
530
+ );
531
+ if (l && !p) {
532
+ const s = Math.random().toString(36).slice(2, 10), u = `/wordpress/wp-content/mcp-nonce-${s}.php`, c = `/wp-content/mcp-nonce-${s}.php`;
533
+ await e.writeFile(u, "<?php require_once '/wordpress/wp-load.php'; echo wp_create_nonce('wp_rest');");
534
+ let d = "";
535
+ try {
536
+ d = (await e.request({
537
+ url: c,
538
+ method: "GET"
539
+ })).text.trim();
540
+ } finally {
541
+ await e.unlink(u);
542
+ }
543
+ d && d !== "0" && (r["X-WP-Nonce"] = d);
544
+ }
545
+ } catch {
546
+ }
547
+ return await e.request({ url: i, method: n, headers: r, body: o });
548
+ },
549
+ playground_navigate: async (e, t) => (await e.goTo(t.path), { url: await e.getCurrentURL() }),
550
+ playground_get_current_url: async (e) => ({
551
+ url: await e.getCurrentURL()
552
+ }),
553
+ playground_get_site_info: (e) => y(e),
554
+ playground_read_file: async (e, t) => ({
555
+ contents: await e.readFileAsText(t.path)
556
+ }),
557
+ playground_write_file: async (e, t) => (await e.writeFile(
558
+ t.path,
559
+ t.contents
560
+ ), { success: !0 }),
561
+ playground_list_files: async (e, t) => ({
562
+ files: await e.listFiles(t.path)
563
+ }),
564
+ playground_mkdir: async (e, t) => (await e.mkdirTree(t.path), { success: !0 }),
565
+ playground_delete_file: async (e, t) => (await e.unlink(t.path), { success: !0 }),
566
+ playground_delete_directory: async (e, t) => (await e.rmdir(t.path, {
567
+ recursive: t.recursive ?? !1
568
+ }), { success: !0 }),
569
+ playground_file_exists: async (e, t) => ({
570
+ exists: await e.fileExists(t.path)
571
+ })
572
+ };
573
+ function x(e) {
574
+ const t = new TextDecoder(), i = {
575
+ async run(n) {
576
+ const r = await e.run(n);
577
+ return {
578
+ text: t.decode(r.bytes),
579
+ errors: r.errors,
580
+ exitCode: r.exitCode
581
+ };
582
+ },
583
+ async request(n) {
584
+ const r = await e.request({
585
+ url: n.url,
586
+ method: n.method,
587
+ headers: n.headers,
588
+ body: n.body
589
+ });
590
+ return {
591
+ text: t.decode(r.bytes),
592
+ httpStatusCode: r.httpStatusCode,
593
+ headers: r.headers
594
+ };
595
+ }
596
+ };
597
+ return new Proxy(e, {
598
+ get: (n, r) => {
599
+ const o = i[r];
600
+ if (o !== void 0)
601
+ return o;
602
+ const a = n[r];
603
+ return typeof a == "function" ? a.bind(n) : a;
604
+ }
605
+ });
606
+ }
607
+ export {
608
+ b as a,
609
+ H as b,
610
+ x as c,
611
+ v as f,
612
+ _ as g,
613
+ m as p,
614
+ P as s,
615
+ w as t
616
+ };
617
+ //# sourceMappingURL=tool-executors-SsQekZdW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-executors-SsQekZdW.js","sources":["../../../../packages/playground/mcp/src/tools/tool-definitions.ts","../../../../packages/playground/mcp/src/tools/tool-executors.ts"],"sourcesContent":["/**\n * Tool metadata and schema helpers for WordPress Playground.\n *\n * Pure data — no execution logic. Both the MCP server and\n * WebMCP import these for consistent descriptions, annotations,\n * and schema conversion.\n */\n\nexport interface ToolAnnotations {\n\treadOnlyHint?: boolean;\n\tdestructiveHint?: boolean;\n\tidempotentHint?: boolean;\n\topenWorldHint?: boolean;\n}\n\nexport type ToolParamType = 'string' | 'boolean' | 'object';\n\nexport interface ToolParam {\n\tname: string;\n\ttype: ToolParamType;\n\tdescription: string;\n\trequired: boolean;\n\tadditionalProperties?: boolean;\n\tdefault?: unknown;\n}\n\nexport interface ToolDefinition {\n\ttitle: string;\n\tdescription: string;\n\terrorPrefix: string;\n\tannotations: ToolAnnotations;\n\tparams: ToolParam[];\n}\n\nconst PLAYGROUND_BASE_URL = 'https://playground.wordpress.net/';\n\nexport function playgroundUrl(port: number): string {\n\treturn `${PLAYGROUND_BASE_URL}?mcp=yes&mcp-port=${port}`;\n}\n\n// -- Per-site tool definitions --\n\nexport const toolDefinitions: Record<string, ToolDefinition> = {\n\tplayground_execute_php: {\n\t\ttitle: 'Execute PHP Code',\n\t\terrorPrefix: 'Error executing PHP',\n\t\tdescription: `Run arbitrary PHP code in WordPress Playground\n\t\t\tand return the output.\n\n\t\t\tWordPress is NOT bootstrapped automatically. To use\n\t\t\tWordPress functions, start your code with:\n\t\t\trequire(\"/wordpress/wp-load.php\");\n\t\t\tAlways include the opening <?php tag.\n\n\t\t\tThe response JSON contains three fields:\n\t\t\t- \"text\": stdout output\n\t\t\t- \"errors\": PHP warnings, notices, and fatal error\n\t\t\t messages from stderr\n\t\t\t- \"exitCode\": 0 on success, non-zero on fatal error\n\t\t\tCheck both \"errors\" and \"exitCode\" to determine\n\t\t\twhether the call succeeded.\n\n\t\t\tWARNING: output is returned in full with no\n\t\t\ttruncation — avoid queries that produce unbounded\n\t\t\toutput (e.g. SELECT * without LIMIT). Keep output\n\t\t\tunder 50 KB to avoid filling the context window.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: false,\n\t\t\tdestructiveHint: true,\n\t\t\tidempotentHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'code',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: `PHP code to execute. Example:\n\t\t\t\t\t\"<?php echo get_bloginfo('name');\"`,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_request: {\n\t\ttitle: 'HTTP Request',\n\t\terrorPrefix: 'Error making request',\n\t\tdescription: `Make an HTTP request to the WordPress site\n\t\t\trunning in Playground. REST API requests\n\t\t\t(/wp-json/* or ?rest_route=) are automatically\n\t\t\tauthenticated with a valid nonce — no manual\n\t\t\tauth needed.\n\n\t\t\tTool selection guide:\n\t\t\t1. Use this tool (playground_request) with the\n\t\t\t REST API for standard content CRUD — posts,\n\t\t\t pages, users, terms, comments, settings, etc.\n\t\t\t The REST API handles serialization, pagination,\n\t\t\t and field filtering for you.\n\t\t\t2. Use playground_execute_php when the data you\n\t\t\t need is not exposed by the REST API (e.g.\n\t\t\t raw options, direct database queries, or\n\t\t\t custom table access).\n\t\t\t3. Use this tool as a plain HTTP request (non-REST)\n\t\t\t when the HTTP layer itself matters: verifying\n\t\t\t redirects, status codes, cookies, or response\n\t\t\t headers.\n\n\t\t\tThe response JSON contains three fields:\n\t\t\t- \"text\": the response body as a string\n\t\t\t- \"httpStatusCode\": HTTP status code (200, 404…)\n\t\t\t- \"headers\": response headers as key-value pairs\n\t\t\tCheck \"httpStatusCode\" to determine success.\n\n\t\t\tNote: full HTML responses can be very large and may\n\t\t\tfill the context window. To change the URL the user\n\t\t\tsees in their tab, use playground_navigate instead.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: false,\n\t\t\tdestructiveHint: false,\n\t\t\tidempotentHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'url',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: `Request URL path, e.g.\n\t\t\t\t\t\"/wp-json/wp/v2/posts\" or\n\t\t\t\t\t\"/wp-admin/plugins.php\"`,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'method',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: `HTTP method (GET, POST, PUT,\n\t\t\t\t\tDELETE, etc.). Defaults to GET.`,\n\t\t\t\trequired: false,\n\t\t\t\tdefault: 'GET',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'headers',\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: `Request headers as string key-value\n\t\t\t\t\tpairs, e.g. {\"Content-Type\":\n\t\t\t\t\t\"application/json\"}`,\n\t\t\t\trequired: false,\n\t\t\t\tadditionalProperties: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'body',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Request body (for POST/PUT requests)',\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_navigate: {\n\t\ttitle: 'Navigate to URL',\n\t\terrorPrefix: 'Error navigating',\n\t\tdescription: `Navigate to a URL path in WordPress\n\t\t\tPlayground and return the final URL after any\n\t\t\tredirects. Examples: \"/wp-admin/\",\n\t\t\t\"/wp-login.php\", \"/\".\n\n\t\t\tOn 404 or error pages, navigation still succeeds\n\t\t\tfrom the tool's perspective — check the returned\n\t\t\tURL or use playground_request to verify the HTTP\n\t\t\tstatus code if needed.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: false,\n\t\t\tdestructiveHint: false,\n\t\t\tidempotentHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: `The URL path to navigate to,\n\t\t\t\t\te.g. \"/wp-admin/\" or\n\t\t\t\t\t\"/wp-login.php\"`,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_get_current_url: {\n\t\ttitle: 'Get Current URL',\n\t\terrorPrefix: 'Error getting current URL',\n\t\tdescription: `Get the current URL path of the WordPress\n\t\t\tsite displayed in Playground. For additional\n\t\t\tmetadata (WordPress version, PHP version, document\n\t\t\troot), use playground_get_site_info instead.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: true,\n\t\t\tdestructiveHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [],\n\t},\n\tplayground_get_site_info: {\n\t\ttitle: 'Get Site Info',\n\t\terrorPrefix: 'Error getting site info',\n\t\tdescription: `Get metadata about the running WordPress\n\t\t\tinstance: current URL, document root, site URL,\n\t\t\tWordPress version, and PHP version. Use this when\n\t\t\tyou need version information or the document root\n\t\t\tpath. For just the current URL, prefer\n\t\t\tplayground_get_current_url.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: true,\n\t\t\tdestructiveHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [],\n\t},\n\tplayground_read_file: {\n\t\ttitle: 'Read File',\n\t\terrorPrefix: 'Error reading file',\n\t\tdescription: `Read a file from the WordPress virtual\n\t\t\tfilesystem. Returns the file contents as text.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: true,\n\t\t\tdestructiveHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: `Absolute path to the file, e.g.\n\t\t\t\t\t\"/wordpress/wp-config.php\"`,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_write_file: {\n\t\ttitle: 'Write File',\n\t\terrorPrefix: 'Error writing file',\n\t\tdescription: `Write content to a file in the WordPress\n\t\t\tvirtual filesystem.\n\n\t\t\tWARNING: Overwrites the entire file — existing\n\t\t\tcontent is permanently lost. Read the file first\n\t\t\twith playground_read_file if you need to preserve\n\t\t\tany content.\n\n\t\t\tCreates the file if it does not exist. Parent\n\t\t\tdirectories are NOT created automatically — call\n\t\t\tplayground_mkdir first if needed, otherwise the\n\t\t\twrite will fail with a \"no such file or directory\"\n\t\t\terror.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: false,\n\t\t\tdestructiveHint: true,\n\t\t\tidempotentHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: `Absolute path to write to, e.g.\n\t\t\t\t\t\"/wordpress/wp-content/test.txt\"`,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'contents',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'File contents to write',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_list_files: {\n\t\ttitle: 'List Files',\n\t\terrorPrefix: 'Error listing files',\n\t\tdescription: `List files and directories at a given path\n\t\t\tin the WordPress virtual filesystem. Returns a\n\t\t\tflat, non-recursive listing of the immediate\n\t\t\tcontents. To explore subdirectories, call this tool\n\t\t\tagain with the subdirectory path.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: true,\n\t\t\tdestructiveHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: `Absolute path to list, e.g.\n\t\t\t\t\t\"/wordpress/wp-content/plugins\"`,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_mkdir: {\n\t\ttitle: 'Create Directory',\n\t\terrorPrefix: 'Error creating directory',\n\t\tdescription: `Create a directory (and all required parent\n\t\t\tdirectories) in the WordPress virtual filesystem.\n\t\t\tCall this before playground_write_file when writing\n\t\t\tto a path whose parent directories do not yet\n\t\t\texist.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: false,\n\t\t\tdestructiveHint: false,\n\t\t\tidempotentHint: true,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: `Absolute path of directory to\n\t\t\t\t\tcreate, e.g.\n\t\t\t\t\t\"/wordpress/wp-content/my-plugin\"`,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_delete_file: {\n\t\ttitle: 'Delete File',\n\t\terrorPrefix: 'Error deleting file',\n\t\tdescription: `Delete a file from the WordPress virtual\n\t\t\tfilesystem.\n\n\t\t\tWARNING: Deletion is permanent and cannot be\n\t\t\tundone. Returns an error if the file does not\n\t\t\texist — use playground_file_exists first if\n\t\t\tdeletion is conditional.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: false,\n\t\t\tdestructiveHint: true,\n\t\t\tidempotentHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Absolute path of file to delete',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_delete_directory: {\n\t\ttitle: 'Delete Directory',\n\t\terrorPrefix: 'Error deleting directory',\n\t\tdescription: `Delete a directory from the WordPress\n\t\t\tvirtual filesystem.\n\n\t\t\tWARNING: Deletion is permanent and cannot be\n\t\t\tundone. By default (recursive=false), the directory\n\t\t\tmust be empty or the call will fail. Set\n\t\t\trecursive=true to delete a directory and all its\n\t\t\tcontents — use with care.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: false,\n\t\t\tdestructiveHint: true,\n\t\t\tidempotentHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Absolute path of directory to delete',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'recursive',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: `If true, delete directory and\n\t\t\t\t\tall contents. If false (default), fails\n\t\t\t\t\ton non-empty directories.`,\n\t\t\t\trequired: false,\n\t\t\t\tdefault: false,\n\t\t\t},\n\t\t],\n\t},\n\tplayground_file_exists: {\n\t\ttitle: 'File Exists',\n\t\terrorPrefix: 'Error checking file existence',\n\t\tdescription: `Check whether a file or directory exists\n\t\t\tin the WordPress virtual filesystem.`,\n\t\tannotations: {\n\t\t\treadOnlyHint: true,\n\t\t\tdestructiveHint: false,\n\t\t\topenWorldHint: true,\n\t\t},\n\t\tparams: [\n\t\t\t{\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Absolute path to check',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n};\n\n// -- Site management tool definitions --\n\nexport function getSiteToolDefinitions(): Record<string, ToolDefinition> {\n\treturn {\n\t\tplayground_list_sites: {\n\t\t\ttitle: 'List Available Sites',\n\t\t\terrorPrefix: 'Error listing sites',\n\t\t\tdescription: `List all WordPress Playground sites\n\t\t\tavailable. Call this before any other playground\n\t\t\ttool — it returns the siteId required by every\n\t\t\tother operation.\n\n\t\t\tIf this returns no sites, the user may need to\n\t\t\topen Playground in their browser. Use\n\t\t\tplayground_get_website_url to get the exact URL\n\t\t\tto send to the user.\n\n\t\t\tReturns site names and storage type. \"temporary\"\n\t\t\tsites are lost on page reload, \"opfs\" sites persist\n\t\t\tacross reloads. Call playground_save_in_browser to persist\n\t\t\ta temporary site.`,\n\t\t\tannotations: {\n\t\t\t\treadOnlyHint: true,\n\t\t\t\tdestructiveHint: false,\n\t\t\t},\n\t\t\tparams: [],\n\t\t},\n\t\tplayground_open_site_in_new_tab: {\n\t\t\ttitle: 'Open Site in New Tab',\n\t\t\terrorPrefix: 'Error opening site in new tab',\n\t\t\tdescription: `Open a WordPress Playground site in a new\n\t\t\tbrowser tab. The site must appear in\n\t\t\tplayground_list_sites.\n\n\t\t\tCheck playground_get_current_url first — if the\n\t\t\tsite is already open in a tab, calling this tool\n\t\t\twill open a second tab rather than switching to\n\t\t\tthe existing one.`,\n\t\t\tannotations: {\n\t\t\t\treadOnlyHint: false,\n\t\t\t\tdestructiveHint: false,\n\t\t\t},\n\t\t\tparams: [],\n\t\t},\n\t\tplayground_rename_site: {\n\t\t\ttitle: 'Rename Site',\n\t\t\terrorPrefix: 'Error renaming site',\n\t\t\tdescription: `Rename a WordPress Playground site. Updates\n\t\t\tthe display name shown in the browser UI.`,\n\t\t\tannotations: {\n\t\t\t\treadOnlyHint: false,\n\t\t\t\tdestructiveHint: false,\n\t\t\t},\n\t\t\tparams: [\n\t\t\t\t{\n\t\t\t\t\tname: 'newName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdescription: 'The new display name for the site',\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\tplayground_save_in_browser: {\n\t\t\ttitle: 'Save in Browser',\n\t\t\terrorPrefix: 'Error saving site',\n\t\t\tdescription: `Save a temporary WordPress Playground site\n\t\t\tto browser storage so it survives page reloads.\n\t\t\tSafe to call even if the site is already saved\n\t\t\t(no-op).\n\n\t\t\tSites start as temporary by default and are lost\n\t\t\twhen the browser tab is closed or the page is\n\t\t\treloaded. Call this early in any multi-step\n\t\t\tworkflow where losing progress would be costly.`,\n\t\t\tannotations: {\n\t\t\t\treadOnlyHint: false,\n\t\t\t\tdestructiveHint: false,\n\t\t\t},\n\t\t\tparams: [],\n\t\t},\n\t\tplayground_get_website_url: {\n\t\t\ttitle: 'Get Playground Website URL',\n\t\t\terrorPrefix: 'Error getting website URL',\n\t\t\tdescription: `Return the URL the user must open in their\n\t\t\tbrowser to use WordPress Playground with this MCP\n\t\t\tserver. Use this tool whenever you need to send\n\t\t\tthe user to Playground or open it autonomously —\n\t\t\talways obtain the URL from this tool rather than\n\t\t\tconstructing it manually.`,\n\t\t\tannotations: {\n\t\t\t\treadOnlyHint: true,\n\t\t\t\tdestructiveHint: false,\n\t\t\t\tidempotentHint: true,\n\t\t\t\topenWorldHint: false,\n\t\t\t},\n\t\t\tparams: [],\n\t\t},\n\t};\n}\n\nexport function stringifyError(error: unknown): string {\n\tif (error instanceof Error) {\n\t\treturn error.message;\n\t}\n\tif (typeof error === 'string') {\n\t\treturn error;\n\t}\n\ttry {\n\t\treturn JSON.stringify(error);\n\t} catch {\n\t\treturn String(error);\n\t}\n}\n\n/**\n * Translate internal Playground storage types to user-facing names.\n */\nexport function formatStorageLabel(raw: string): string {\n\treturn raw === 'none' ? 'temporary' : raw;\n}\n\n/**\n * Convert ToolParam[] to a plain JSON Schema object.\n * Used by WebMCP which expects raw JSON Schema (not Zod).\n */\nexport function paramsToJsonSchema(\n\tparams: ToolParam[]\n): Record<string, unknown> {\n\tconst properties: Record<string, Record<string, unknown>> = {};\n\tconst required: string[] = [];\n\n\tfor (const param of params) {\n\t\tconst prop: Record<string, unknown> = {\n\t\t\ttype: param.type,\n\t\t\tdescription: param.description,\n\t\t};\n\t\tif (param.additionalProperties !== undefined) {\n\t\t\tprop['additionalProperties'] = param.additionalProperties;\n\t\t}\n\t\tif (param.default !== undefined) {\n\t\t\tprop['default'] = param.default;\n\t\t}\n\t\tproperties[param.name] = prop;\n\t\tif (param.required) {\n\t\t\trequired.push(param.name);\n\t\t}\n\t}\n\n\tconst schema: Record<string, unknown> = {\n\t\ttype: 'object',\n\t\tproperties,\n\t};\n\tif (required.length > 0) {\n\t\tschema['required'] = required;\n\t}\n\treturn schema;\n}\n","/**\n * Shared tool executor functions.\n *\n * Both the MCP server and WebMCP call these executors so that tool\n * output shapes are defined in exactly one place. Each transport\n * provides its own ToolClient implementation that normalises I/O\n * differences (e.g. byte decoding).\n */\n\nimport type { PlaygroundClient } from '@wp-playground/remote';\nimport type { PHPRequest } from '@php-wasm/universal';\n\n/**\n * Minimal client interface consumed by tool executors.\n *\n * - WebMCP implements this by wrapping PlaygroundClient (decoding\n * response bytes via TextDecoder).\n * - The MCP server implements this by wrapping bridge.sendCommand\n * (bytes are already decoded at the bridge-client boundary).\n */\nexport interface ToolClient {\n\trun(options: {\n\t\tcode: string;\n\t}): Promise<{ text: string; errors: string; exitCode: number }>;\n\trequest(options: {\n\t\turl: string;\n\t\tmethod: string;\n\t\theaders?: Record<string, string>;\n\t\tbody?: string;\n\t}): Promise<{\n\t\ttext: string;\n\t\thttpStatusCode: number;\n\t\theaders: Record<string, string[]>;\n\t}>;\n\tgoTo(path: string): Promise<void>;\n\tgetCurrentURL(): Promise<string>;\n\treadFileAsText(path: string): Promise<string>;\n\twriteFile(path: string, contents: string): Promise<void>;\n\tlistFiles(path: string): Promise<string[]>;\n\tmkdirTree(path: string): Promise<void>;\n\tunlink(path: string): Promise<void>;\n\trmdir(path: string, options: { recursive: boolean }): Promise<void>;\n\tfileExists(path: string): Promise<boolean>;\n}\n\nexport interface SiteInfo {\n\turl: string;\n\tdocumentRoot: string;\n\tsiteUrl: string;\n\twpVersion: string;\n\tphpVersion: string;\n}\n\nasync function executeSiteInfo(client: ToolClient): Promise<SiteInfo> {\n\tconst [url, infoText] = await Promise.all([\n\t\tclient.getCurrentURL(),\n\t\tclient\n\t\t\t.run({\n\t\t\t\tcode: `<?php\n\t\t\trequire_once \"/wordpress/wp-load.php\";\n\t\t\techo json_encode([\n\t\t\t\t\"documentRoot\" => ABSPATH,\n\t\t\t\t\"wpVersion\" => get_bloginfo(\"version\"),\n\t\t\t\t\"siteUrl\" => get_site_url(),\n\t\t\t\t\"phpVersion\" => phpversion(),\n\t\t\t]);`,\n\t\t\t})\n\t\t\t.then((resp) => resp.text),\n\t]);\n\n\tlet info: Partial<Omit<SiteInfo, 'url'>>;\n\ttry {\n\t\tinfo = JSON.parse(infoText);\n\t} catch {\n\t\tinfo = {};\n\t}\n\n\treturn {\n\t\turl: String(url),\n\t\tdocumentRoot: info.documentRoot ?? '/wordpress',\n\t\tsiteUrl: info.siteUrl ?? String(url),\n\t\twpVersion: info.wpVersion ?? 'unknown',\n\t\tphpVersion: info.phpVersion ?? 'unknown',\n\t};\n}\n\nexport const toolExecutors: Record<\n\tstring,\n\t(client: ToolClient, input: Record<string, unknown>) => Promise<unknown>\n> = {\n\tplayground_execute_php: (client, input) =>\n\t\tclient.run({ code: input['code'] as string }),\n\n\tplayground_request: async (client, input) => {\n\t\tconst url = input['url'] as string;\n\t\tconst method = (input['method'] as string) ?? 'GET';\n\t\tconst headers = {\n\t\t\t...((input['headers'] as Record<string, string>) ?? {}),\n\t\t};\n\t\tconst body = input['body'] as string | undefined;\n\n\t\ttry {\n\t\t\tconst parsedUrl = new URL(url, 'http://localhost');\n\t\t\tconst isRestApi =\n\t\t\t\turl.includes('/wp-json/') ||\n\t\t\t\tparsedUrl.searchParams.has('rest_route');\n\n\t\t\t// Auto-set Content-Type for REST API JSON bodies.\n\t\t\tif (\n\t\t\t\tisRestApi &&\n\t\t\t\tbody &&\n\t\t\t\t!Object.keys(headers).some(\n\t\t\t\t\t(k) => k.toLowerCase() === 'content-type'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\theaders['Content-Type'] = 'application/json';\n\t\t\t}\n\n\t\t\tconst hasNonce = Object.keys(headers).some(\n\t\t\t\t(k) => k.toLowerCase() === 'x-wp-nonce'\n\t\t\t);\n\n\t\t\tif (isRestApi && !hasNonce) {\n\t\t\t\t// Generate the nonce via a temporary PHP file requested\n\t\t\t\t// through request() — not run() — so that the cookie\n\t\t\t\t// store is included and WordPress ties the nonce to\n\t\t\t\t// the logged-in user.\n\t\t\t\tconst nonceId = Math.random().toString(36).slice(2, 10);\n\t\t\t\tconst noncePath = `/wordpress/wp-content/mcp-nonce-${nonceId}.php`;\n\t\t\t\tconst nonceUrl = `/wp-content/mcp-nonce-${nonceId}.php`;\n\t\t\t\tconst nonceCode =\n\t\t\t\t\t\"<?php require_once '/wordpress/wp-load.php'; echo wp_create_nonce('wp_rest');\";\n\t\t\t\tawait client.writeFile(noncePath, nonceCode);\n\t\t\t\tlet nonce = '';\n\t\t\t\ttry {\n\t\t\t\t\tconst nonceResp = await client.request({\n\t\t\t\t\t\turl: nonceUrl,\n\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t});\n\t\t\t\t\tnonce = nonceResp.text.trim();\n\t\t\t\t} finally {\n\t\t\t\t\tawait client.unlink(noncePath);\n\t\t\t\t}\n\t\t\t\tif (nonce && nonce !== '0') {\n\t\t\t\t\theaders['X-WP-Nonce'] = nonce;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// Nonce generation failed — proceed without it.\n\t\t}\n\n\t\treturn await client.request({ url, method, headers, body });\n\t},\n\n\tplayground_navigate: async (client, input) => {\n\t\tawait client.goTo(input['path'] as string);\n\t\treturn { url: await client.getCurrentURL() };\n\t},\n\n\tplayground_get_current_url: async (client) => ({\n\t\turl: await client.getCurrentURL(),\n\t}),\n\n\tplayground_get_site_info: (client): Promise<SiteInfo> =>\n\t\texecuteSiteInfo(client),\n\n\tplayground_read_file: async (client, input) => ({\n\t\tcontents: await client.readFileAsText(input['path'] as string),\n\t}),\n\n\tplayground_write_file: async (client, input) => {\n\t\tawait client.writeFile(\n\t\t\tinput['path'] as string,\n\t\t\tinput['contents'] as string\n\t\t);\n\t\treturn { success: true };\n\t},\n\n\tplayground_list_files: async (client, input) => ({\n\t\tfiles: await client.listFiles(input['path'] as string),\n\t}),\n\n\tplayground_mkdir: async (client, input) => {\n\t\tawait client.mkdirTree(input['path'] as string);\n\t\treturn { success: true };\n\t},\n\n\tplayground_delete_file: async (client, input) => {\n\t\tawait client.unlink(input['path'] as string);\n\t\treturn { success: true };\n\t},\n\n\tplayground_delete_directory: async (client, input) => {\n\t\tawait client.rmdir(input['path'] as string, {\n\t\t\trecursive: (input['recursive'] as boolean) ?? false,\n\t\t});\n\t\treturn { success: true };\n\t},\n\n\tplayground_file_exists: async (client, input) => ({\n\t\texists: await client.fileExists(input['path'] as string),\n\t}),\n};\n\n/**\n * Wrap a PlaygroundClient as a ToolClient.\n *\n * Most methods pass through directly. Only `run` and `request`\n * are intercepted to decode PHP/HTTP response bytes into plain\n * strings via TextDecoder.\n */\nexport function createToolClient(client: PlaygroundClient): ToolClient {\n\tconst decoder = new TextDecoder();\n\tconst overrides: Partial<ToolClient> = {\n\t\tasync run(options) {\n\t\t\tconst resp = await client.run(options);\n\t\t\treturn {\n\t\t\t\ttext: decoder.decode(resp.bytes),\n\t\t\t\terrors: resp.errors,\n\t\t\t\texitCode: resp.exitCode,\n\t\t\t};\n\t\t},\n\t\tasync request(options) {\n\t\t\tconst resp = await client.request({\n\t\t\t\turl: options.url,\n\t\t\t\tmethod: options.method as PHPRequest['method'],\n\t\t\t\theaders: options.headers,\n\t\t\t\tbody: options.body,\n\t\t\t});\n\t\t\treturn {\n\t\t\t\ttext: decoder.decode(resp.bytes),\n\t\t\t\thttpStatusCode: resp.httpStatusCode,\n\t\t\t\theaders: resp.headers,\n\t\t\t};\n\t\t},\n\t};\n\treturn new Proxy(client as unknown as ToolClient, {\n\t\tget: (target, prop: string) => {\n\t\t\tconst override = (overrides as Record<string, unknown>)[prop];\n\t\t\tif (override !== undefined) {\n\t\t\t\treturn override;\n\t\t\t}\n\t\t\tconst val = (target as unknown as Record<string, unknown>)[prop];\n\t\t\treturn typeof val === 'function' ? val.bind(target) : val;\n\t\t},\n\t});\n}\n"],"names":["PLAYGROUND_BASE_URL","playgroundUrl","port","toolDefinitions","getSiteToolDefinitions","stringifyError","error","formatStorageLabel","raw","paramsToJsonSchema","params","properties","required","param","prop","schema","executeSiteInfo","client","url","infoText","resp","info","toolExecutors","input","method","headers","body","parsedUrl","isRestApi","k","hasNonce","nonceId","noncePath","nonceUrl","nonce","createToolClient","decoder","overrides","options","target","override","val"],"mappings":"AAkCA,MAAMA,IAAsB;AAErB,SAASC,EAAcC,GAAsB;AACnD,SAAO,GAAGF,CAAmB,qBAAqBE,CAAI;AACvD;AAIO,MAAMC,IAAkD;AAAA,EAC9D,wBAAwB;AAAA,IACvB,OAAO;AAAA,IACP,aAAa;AAAA,IACb,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAoBb,aAAa;AAAA,MACZ,cAAc;AAAA,MACd,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,eAAe;AAAA,IAAA;AAAA,IAEhB,QAAQ;AAAA,MACP;AAAA,QACC,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA;AAAA,QAEb,UAAU;AAAA,MAAA;AAAA,IACX;AAAA,EACD;AAAA,EAED,oBAAoB;AAAA,IACnB,OAAO;AAAA,IACP,aAAa;AAAA,IACb,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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