mcp-wordpress 1.1.7 → 1.2.2
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/README.md +388 -66
- package/dist/cache/CacheInvalidation.d.ts +118 -0
- package/dist/cache/CacheInvalidation.d.ts.map +1 -0
- package/dist/cache/CacheInvalidation.js +349 -0
- package/dist/cache/CacheInvalidation.js.map +1 -0
- package/dist/cache/CacheManager.d.ts +143 -0
- package/dist/cache/CacheManager.d.ts.map +1 -0
- package/dist/cache/CacheManager.js +308 -0
- package/dist/cache/CacheManager.js.map +1 -0
- package/dist/cache/HttpCacheWrapper.d.ts +121 -0
- package/dist/cache/HttpCacheWrapper.d.ts.map +1 -0
- package/dist/cache/HttpCacheWrapper.js +280 -0
- package/dist/cache/HttpCacheWrapper.js.map +1 -0
- package/dist/cache/__tests__/CacheInvalidation.test.d.ts +5 -0
- package/dist/cache/__tests__/CacheInvalidation.test.d.ts.map +1 -0
- package/dist/cache/__tests__/CacheInvalidation.test.js +236 -0
- package/dist/cache/__tests__/CacheInvalidation.test.js.map +1 -0
- package/dist/cache/__tests__/CacheManager.test.d.ts +5 -0
- package/dist/cache/__tests__/CacheManager.test.d.ts.map +1 -0
- package/dist/cache/__tests__/CacheManager.test.js +233 -0
- package/dist/cache/__tests__/CacheManager.test.js.map +1 -0
- package/dist/cache/__tests__/CachedWordPressClient.test.d.ts +5 -0
- package/dist/cache/__tests__/CachedWordPressClient.test.d.ts.map +1 -0
- package/dist/cache/__tests__/CachedWordPressClient.test.js +228 -0
- package/dist/cache/__tests__/CachedWordPressClient.test.js.map +1 -0
- package/dist/cache/__tests__/HttpCacheWrapper.test.d.ts +5 -0
- package/dist/cache/__tests__/HttpCacheWrapper.test.d.ts.map +1 -0
- package/dist/cache/__tests__/HttpCacheWrapper.test.js +296 -0
- package/dist/cache/__tests__/HttpCacheWrapper.test.js.map +1 -0
- package/dist/cache/index.d.ts +12 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +9 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/client/CachedWordPressClient.d.ts +160 -0
- package/dist/client/CachedWordPressClient.d.ts.map +1 -0
- package/dist/client/CachedWordPressClient.js +338 -0
- package/dist/client/CachedWordPressClient.js.map +1 -0
- package/dist/client/WordPressClient.d.ts +81 -0
- package/dist/client/WordPressClient.d.ts.map +1 -0
- package/dist/client/WordPressClient.js +354 -0
- package/dist/client/WordPressClient.js.map +1 -0
- package/dist/config/ConfigurationSchema.d.ts +281 -0
- package/dist/config/ConfigurationSchema.d.ts.map +1 -0
- package/dist/config/ConfigurationSchema.js +205 -0
- package/dist/config/ConfigurationSchema.js.map +1 -0
- package/dist/config/ServerConfiguration.d.ts +38 -0
- package/dist/config/ServerConfiguration.d.ts.map +1 -0
- package/dist/config/ServerConfiguration.js +158 -0
- package/dist/config/ServerConfiguration.js.map +1 -0
- package/dist/docs/DocumentationGenerator.d.ts +184 -0
- package/dist/docs/DocumentationGenerator.d.ts.map +1 -0
- package/dist/docs/DocumentationGenerator.js +735 -0
- package/dist/docs/DocumentationGenerator.js.map +1 -0
- package/dist/docs/MarkdownFormatter.d.ts +84 -0
- package/dist/docs/MarkdownFormatter.d.ts.map +1 -0
- package/dist/docs/MarkdownFormatter.js +448 -0
- package/dist/docs/MarkdownFormatter.js.map +1 -0
- package/dist/docs/index.d.ts +8 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +7 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -212
- package/dist/index.js.map +1 -1
- package/dist/performance/AnomalyDetector.d.ts +63 -0
- package/dist/performance/AnomalyDetector.d.ts.map +1 -0
- package/dist/performance/AnomalyDetector.js +222 -0
- package/dist/performance/AnomalyDetector.js.map +1 -0
- package/dist/performance/BenchmarkAnalyzer.d.ts +67 -0
- package/dist/performance/BenchmarkAnalyzer.d.ts.map +1 -0
- package/dist/performance/BenchmarkAnalyzer.js +301 -0
- package/dist/performance/BenchmarkAnalyzer.js.map +1 -0
- package/dist/performance/MetricsCollector.d.ts +139 -0
- package/dist/performance/MetricsCollector.d.ts.map +1 -0
- package/dist/performance/MetricsCollector.js +320 -0
- package/dist/performance/MetricsCollector.js.map +1 -0
- package/dist/performance/PerformanceAnalytics.d.ts +162 -0
- package/dist/performance/PerformanceAnalytics.d.ts.map +1 -0
- package/dist/performance/PerformanceAnalytics.js +554 -0
- package/dist/performance/PerformanceAnalytics.js.map +1 -0
- package/dist/performance/PerformanceMonitor.d.ts +202 -0
- package/dist/performance/PerformanceMonitor.d.ts.map +1 -0
- package/dist/performance/PerformanceMonitor.js +478 -0
- package/dist/performance/PerformanceMonitor.js.map +1 -0
- package/dist/performance/TrendAnalyzer.d.ts +69 -0
- package/dist/performance/TrendAnalyzer.d.ts.map +1 -0
- package/dist/performance/TrendAnalyzer.js +203 -0
- package/dist/performance/TrendAnalyzer.js.map +1 -0
- package/dist/performance/index.d.ts +11 -0
- package/dist/performance/index.d.ts.map +1 -0
- package/dist/performance/index.js +8 -0
- package/dist/performance/index.js.map +1 -0
- package/dist/security/InputValidator.d.ts +215 -0
- package/dist/security/InputValidator.d.ts.map +1 -0
- package/dist/security/InputValidator.js +278 -0
- package/dist/security/InputValidator.js.map +1 -0
- package/dist/security/SecurityConfig.d.ts +129 -0
- package/dist/security/SecurityConfig.d.ts.map +1 -0
- package/dist/security/SecurityConfig.js +262 -0
- package/dist/security/SecurityConfig.js.map +1 -0
- package/dist/server/ConnectionTester.d.ts +24 -0
- package/dist/server/ConnectionTester.d.ts.map +1 -0
- package/dist/server/ConnectionTester.js +61 -0
- package/dist/server/ConnectionTester.js.map +1 -0
- package/dist/server/ToolRegistry.d.ts +46 -0
- package/dist/server/ToolRegistry.d.ts.map +1 -0
- package/dist/server/ToolRegistry.js +148 -0
- package/dist/server/ToolRegistry.js.map +1 -0
- package/dist/tools/BaseToolClass.d.ts +76 -0
- package/dist/tools/BaseToolClass.d.ts.map +1 -0
- package/dist/tools/BaseToolClass.js +104 -0
- package/dist/tools/BaseToolClass.js.map +1 -0
- package/dist/tools/BaseToolManager.d.ts +26 -0
- package/dist/tools/BaseToolManager.d.ts.map +1 -0
- package/dist/tools/BaseToolManager.js +56 -0
- package/dist/tools/BaseToolManager.js.map +1 -0
- package/dist/tools/base.d.ts +37 -0
- package/dist/tools/base.d.ts.map +1 -0
- package/dist/tools/base.js +60 -0
- package/dist/tools/base.js.map +1 -0
- package/dist/tools/cache.d.ts +260 -0
- package/dist/tools/cache.d.ts.map +1 -0
- package/dist/tools/cache.js +237 -0
- package/dist/tools/cache.js.map +1 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/performance.d.ts +63 -0
- package/dist/tools/performance.d.ts.map +1 -0
- package/dist/tools/performance.js +865 -0
- package/dist/tools/performance.js.map +1 -0
- package/dist/types/client.d.ts +1 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client.js.map +1 -1
- package/dist/utils/toolWrapper.d.ts +4 -0
- package/dist/utils/toolWrapper.d.ts.map +1 -1
- package/dist/utils/toolWrapper.js +11 -0
- package/dist/utils/toolWrapper.js.map +1 -1
- package/dist/utils/validation.d.ts +68 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +185 -0
- package/dist/utils/validation.js.map +1 -0
- package/docs/CACHING.md +340 -0
- package/docs/DOCKER.md +451 -0
- package/docs/PERFORMANCE_MONITORING.md +471 -0
- package/docs/SECURITY_TESTING.md +393 -0
- package/docs/api/README.md +200 -0
- package/docs/api/categories/auth.md +40 -0
- package/docs/api/categories/cache.md +41 -0
- package/docs/api/categories/comment.md +44 -0
- package/docs/api/categories/media.md +43 -0
- package/docs/api/categories/page.md +43 -0
- package/docs/api/categories/performance.md +44 -0
- package/docs/api/categories/post.md +43 -0
- package/docs/api/categories/site.md +43 -0
- package/docs/api/categories/taxonomy.md +47 -0
- package/docs/api/categories/user.md +43 -0
- package/docs/api/openapi.json +3305 -0
- package/docs/api/summary.json +12 -0
- package/docs/api/tools/wp_approve_comment.md +98 -0
- package/docs/api/tools/wp_cache_clear.md +120 -0
- package/docs/api/tools/wp_cache_info.md +119 -0
- package/docs/api/tools/wp_cache_stats.md +119 -0
- package/docs/api/tools/wp_cache_warm.md +119 -0
- package/docs/api/tools/wp_create_application_password.md +102 -0
- package/docs/api/tools/wp_create_category.md +102 -0
- package/docs/api/tools/wp_create_comment.md +128 -0
- package/docs/api/tools/wp_create_page.md +135 -0
- package/docs/api/tools/wp_create_post.md +147 -0
- package/docs/api/tools/wp_create_tag.md +101 -0
- package/docs/api/tools/wp_create_user.md +135 -0
- package/docs/api/tools/wp_delete_application_password.md +101 -0
- package/docs/api/tools/wp_delete_category.md +100 -0
- package/docs/api/tools/wp_delete_comment.md +101 -0
- package/docs/api/tools/wp_delete_media.md +108 -0
- package/docs/api/tools/wp_delete_page.md +108 -0
- package/docs/api/tools/wp_delete_post.md +117 -0
- package/docs/api/tools/wp_delete_tag.md +100 -0
- package/docs/api/tools/wp_delete_user.md +108 -0
- package/docs/api/tools/wp_get_application_passwords.md +103 -0
- package/docs/api/tools/wp_get_auth_status.md +101 -0
- package/docs/api/tools/wp_get_category.md +103 -0
- package/docs/api/tools/wp_get_comment.md +103 -0
- package/docs/api/tools/wp_get_current_user.md +101 -0
- package/docs/api/tools/wp_get_media.md +103 -0
- package/docs/api/tools/wp_get_page.md +103 -0
- package/docs/api/tools/wp_get_page_revisions.md +103 -0
- package/docs/api/tools/wp_get_post.md +112 -0
- package/docs/api/tools/wp_get_post_revisions.md +103 -0
- package/docs/api/tools/wp_get_site_settings.md +108 -0
- package/docs/api/tools/wp_get_tag.md +103 -0
- package/docs/api/tools/wp_get_user.md +103 -0
- package/docs/api/tools/wp_list_categories.md +111 -0
- package/docs/api/tools/wp_list_comments.md +111 -0
- package/docs/api/tools/wp_list_media.md +145 -0
- package/docs/api/tools/wp_list_pages.md +145 -0
- package/docs/api/tools/wp_list_posts.md +156 -0
- package/docs/api/tools/wp_list_tags.md +110 -0
- package/docs/api/tools/wp_list_users.md +111 -0
- package/docs/api/tools/wp_performance_alerts.md +162 -0
- package/docs/api/tools/wp_performance_benchmark.md +160 -0
- package/docs/api/tools/wp_performance_export.md +162 -0
- package/docs/api/tools/wp_performance_history.md +161 -0
- package/docs/api/tools/wp_performance_optimize.md +162 -0
- package/docs/api/tools/wp_performance_stats.md +160 -0
- package/docs/api/tools/wp_search_site.md +99 -0
- package/docs/api/tools/wp_spam_comment.md +98 -0
- package/docs/api/tools/wp_switch_auth_method.md +122 -0
- package/docs/api/tools/wp_test_auth.md +96 -0
- package/docs/api/tools/wp_update_category.md +102 -0
- package/docs/api/tools/wp_update_comment.md +127 -0
- package/docs/api/tools/wp_update_media.md +129 -0
- package/docs/api/tools/wp_update_page.md +135 -0
- package/docs/api/tools/wp_update_post.md +144 -0
- package/docs/api/tools/wp_update_site_settings.md +127 -0
- package/docs/api/tools/wp_update_tag.md +102 -0
- package/docs/api/tools/wp_update_user.md +134 -0
- package/docs/api/tools/wp_upload_media.md +131 -0
- package/docs/api/types/WordPressPost.md +39 -0
- package/docs/contract-testing.md +183 -0
- package/docs/developer/NPM_AUTH_SETUP.md +3 -3
- package/docs/wordpress-rest-api-authentication-troubleshooting.md +218 -0
- package/package.json +84 -64
- package/src/cache/CacheInvalidation.ts +421 -0
- package/src/cache/CacheManager.ts +391 -0
- package/src/cache/HttpCacheWrapper.ts +372 -0
- package/src/cache/__tests__/CacheInvalidation.test.ts +299 -0
- package/src/cache/__tests__/CacheManager.test.ts +300 -0
- package/src/cache/__tests__/CachedWordPressClient.test.ts +304 -0
- package/src/cache/__tests__/HttpCacheWrapper.test.ts +359 -0
- package/src/cache/index.ts +26 -0
- package/src/client/CachedWordPressClient.ts +442 -0
- package/src/config/ConfigurationSchema.ts +246 -0
- package/src/config/ServerConfiguration.ts +215 -0
- package/src/docs/DocumentationGenerator.ts +952 -0
- package/src/docs/MarkdownFormatter.ts +494 -0
- package/src/docs/index.ts +21 -0
- package/src/index.ts +14 -274
- package/src/performance/MetricsCollector.ts +447 -0
- package/src/performance/PerformanceAnalytics.ts +762 -0
- package/src/performance/PerformanceMonitor.ts +649 -0
- package/src/performance/index.ts +28 -0
- package/src/security/InputValidator.ts +319 -0
- package/src/security/SecurityConfig.ts +301 -0
- package/src/server/ConnectionTester.ts +74 -0
- package/src/server/ToolRegistry.ts +194 -0
- package/src/tools/BaseToolManager.ts +66 -0
- package/src/tools/cache.ts +259 -0
- package/src/tools/index.ts +2 -0
- package/src/tools/performance.ts +948 -0
- package/src/types/client.ts +1 -0
- package/src/utils/toolWrapper.ts +11 -0
- package/src/utils/validation.ts +259 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# wp_test_auth
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Tests the authentication and connectivity for a configured WordPress site.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
*No parameters required.*
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic auth Usage
|
|
14
|
+
|
|
15
|
+
Simple example of using wp_test_auth
|
|
16
|
+
|
|
17
|
+
**Command:**
|
|
18
|
+
```bash
|
|
19
|
+
wp_test_auth
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Response:**
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"success": true,
|
|
26
|
+
"data": {},
|
|
27
|
+
"message": "wp_test_auth executed successfully"
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Error Example (Authentication failure):**
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"error": "Authentication failed",
|
|
35
|
+
"message": "Invalid credentials or insufficient permissions"
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## Response Format
|
|
45
|
+
|
|
46
|
+
**Return Type:** `object`
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"success": true,
|
|
51
|
+
"data": {
|
|
52
|
+
// object response data
|
|
53
|
+
},
|
|
54
|
+
"metadata": {
|
|
55
|
+
"timestamp": "2024-01-01T00:00:00.000Z",
|
|
56
|
+
"tool": "wp_test_auth",
|
|
57
|
+
"site": "site1"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Error Handling
|
|
63
|
+
|
|
64
|
+
### AUTHENTICATION_FAILED
|
|
65
|
+
|
|
66
|
+
**Message:** Authentication failed
|
|
67
|
+
**Description:** Invalid credentials or insufficient permissions
|
|
68
|
+
**Resolution:** Check your authentication credentials and user permissions
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### VALIDATION_ERROR
|
|
72
|
+
|
|
73
|
+
**Message:** Parameter validation failed
|
|
74
|
+
**Description:** One or more required parameters are missing or invalid
|
|
75
|
+
**Resolution:** Review the required parameters and their formats
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### NOT_FOUND
|
|
79
|
+
|
|
80
|
+
**Message:** Resource not found
|
|
81
|
+
**Description:** The requested resource does not exist
|
|
82
|
+
**Resolution:** Verify the resource ID and ensure it exists
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### PERMISSION_DENIED
|
|
86
|
+
|
|
87
|
+
**Message:** Insufficient permissions
|
|
88
|
+
**Description:** The user does not have permission to perform this action
|
|
89
|
+
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
*Generated automatically from tool definitions - Do not edit manually*
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# wp_update_category
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Updates an existing category.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
| Parameter | Type | Required | Description | Default | Examples |
|
|
10
|
+
|-----------|------|----------|-------------|---------|----------|
|
|
11
|
+
| `id` | `number` | ✅ | The ID of the category to update. | - | `123`, `456` |
|
|
12
|
+
| `name` | `string` | ❌ | The new name for the category. | - | `example` |
|
|
13
|
+
|
|
14
|
+
## Examples
|
|
15
|
+
|
|
16
|
+
### Basic taxonomy Usage
|
|
17
|
+
|
|
18
|
+
Simple example of using wp_update_category
|
|
19
|
+
|
|
20
|
+
**Command:**
|
|
21
|
+
```bash
|
|
22
|
+
wp_update_category --id="123"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Response:**
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"success": true,
|
|
29
|
+
"data": {
|
|
30
|
+
"id": 123,
|
|
31
|
+
"title": "Created/Updated successfully",
|
|
32
|
+
"status": "publish"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Error Example (Authentication failure):**
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"error": "Authentication failed",
|
|
41
|
+
"message": "Invalid credentials or insufficient permissions"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Response Format
|
|
51
|
+
|
|
52
|
+
**Return Type:** `taxonomy`
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"success": true,
|
|
57
|
+
"data": {
|
|
58
|
+
// taxonomy response data
|
|
59
|
+
},
|
|
60
|
+
"metadata": {
|
|
61
|
+
"timestamp": "2024-01-01T00:00:00.000Z",
|
|
62
|
+
"tool": "wp_update_category",
|
|
63
|
+
"site": "site1"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Error Handling
|
|
69
|
+
|
|
70
|
+
### AUTHENTICATION_FAILED
|
|
71
|
+
|
|
72
|
+
**Message:** Authentication failed
|
|
73
|
+
**Description:** Invalid credentials or insufficient permissions
|
|
74
|
+
**Resolution:** Check your authentication credentials and user permissions
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### VALIDATION_ERROR
|
|
78
|
+
|
|
79
|
+
**Message:** Parameter validation failed
|
|
80
|
+
**Description:** One or more required parameters are missing or invalid
|
|
81
|
+
**Resolution:** Review the required parameters and their formats
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### NOT_FOUND
|
|
85
|
+
|
|
86
|
+
**Message:** Resource not found
|
|
87
|
+
**Description:** The requested resource does not exist
|
|
88
|
+
**Resolution:** Verify the resource ID and ensure it exists
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### PERMISSION_DENIED
|
|
92
|
+
|
|
93
|
+
**Message:** Insufficient permissions
|
|
94
|
+
**Description:** The user does not have permission to perform this action
|
|
95
|
+
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
*Generated automatically from tool definitions - Do not edit manually*
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# wp_update_comment
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Updates an existing comment.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
| Parameter | Type | Required | Description | Default | Examples |
|
|
10
|
+
|-----------|------|----------|-------------|---------|----------|
|
|
11
|
+
| `id` | `number` | ✅ | The ID of the comment to update. | - | `123`, `456` |
|
|
12
|
+
| `content` | `string` | ❌ | The updated content for the comment. | - | `<p>Post content here</p>`, `This is my post content` |
|
|
13
|
+
| `status` | `string` | ❌ | The new status for the comment. | `publish` | `example` |
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
### Basic comment Usage
|
|
18
|
+
|
|
19
|
+
Simple example of using wp_update_comment
|
|
20
|
+
|
|
21
|
+
**Command:**
|
|
22
|
+
```bash
|
|
23
|
+
wp_update_comment --id="123"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Response:**
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"success": true,
|
|
30
|
+
"data": {
|
|
31
|
+
"id": 123,
|
|
32
|
+
"title": "Created/Updated successfully",
|
|
33
|
+
"status": "publish"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Error Example (Authentication failure):**
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"error": "Authentication failed",
|
|
42
|
+
"message": "Invalid credentials or insufficient permissions"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Advanced comment Configuration
|
|
48
|
+
|
|
49
|
+
Comprehensive example using all available parameters
|
|
50
|
+
|
|
51
|
+
**Command:**
|
|
52
|
+
```bash
|
|
53
|
+
wp_update_comment --id="123" --content="This is example content for the post." --status="publish"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Response:**
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"success": true,
|
|
60
|
+
"data": {
|
|
61
|
+
"id": 123,
|
|
62
|
+
"title": "Created/Updated successfully",
|
|
63
|
+
"status": "publish"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## Response Format
|
|
76
|
+
|
|
77
|
+
**Return Type:** `comment`
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"success": true,
|
|
82
|
+
"data": {
|
|
83
|
+
// comment response data
|
|
84
|
+
},
|
|
85
|
+
"metadata": {
|
|
86
|
+
"timestamp": "2024-01-01T00:00:00.000Z",
|
|
87
|
+
"tool": "wp_update_comment",
|
|
88
|
+
"site": "site1"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Error Handling
|
|
94
|
+
|
|
95
|
+
### AUTHENTICATION_FAILED
|
|
96
|
+
|
|
97
|
+
**Message:** Authentication failed
|
|
98
|
+
**Description:** Invalid credentials or insufficient permissions
|
|
99
|
+
**Resolution:** Check your authentication credentials and user permissions
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
### VALIDATION_ERROR
|
|
103
|
+
|
|
104
|
+
**Message:** Parameter validation failed
|
|
105
|
+
**Description:** One or more required parameters are missing or invalid
|
|
106
|
+
**Resolution:** Review the required parameters and their formats
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### NOT_FOUND
|
|
110
|
+
|
|
111
|
+
**Message:** Resource not found
|
|
112
|
+
**Description:** The requested resource does not exist
|
|
113
|
+
**Resolution:** Verify the resource ID and ensure it exists
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
### PERMISSION_DENIED
|
|
117
|
+
|
|
118
|
+
**Message:** Insufficient permissions
|
|
119
|
+
**Description:** The user does not have permission to perform this action
|
|
120
|
+
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
*Generated automatically from tool definitions - Do not edit manually*
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# wp_update_media
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Updates the metadata of an existing media item.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
| Parameter | Type | Required | Description | Default | Examples |
|
|
10
|
+
|-----------|------|----------|-------------|---------|----------|
|
|
11
|
+
| `id` | `number` | ✅ | The ID of the media item to update. | - | `123`, `456` |
|
|
12
|
+
| `title` | `string` | ❌ | The new title for the media item. | - | `My Blog Post`, `Hello World` |
|
|
13
|
+
| `alt_text` | `string` | ❌ | The new alternative text. | - | `example` |
|
|
14
|
+
| `caption` | `string` | ❌ | The new caption. | - | `example` |
|
|
15
|
+
| `description` | `string` | ❌ | The new description. | - | `example` |
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
### Basic media Usage
|
|
20
|
+
|
|
21
|
+
Simple example of using wp_update_media
|
|
22
|
+
|
|
23
|
+
**Command:**
|
|
24
|
+
```bash
|
|
25
|
+
wp_update_media --id="123"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Response:**
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"success": true,
|
|
32
|
+
"data": {
|
|
33
|
+
"id": 123,
|
|
34
|
+
"title": "Created/Updated successfully",
|
|
35
|
+
"status": "publish"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Error Example (Authentication failure):**
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"error": "Authentication failed",
|
|
44
|
+
"message": "Invalid credentials or insufficient permissions"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Advanced media Configuration
|
|
50
|
+
|
|
51
|
+
Comprehensive example using all available parameters
|
|
52
|
+
|
|
53
|
+
**Command:**
|
|
54
|
+
```bash
|
|
55
|
+
wp_update_media --id="123" --title="Example Post Title" --alt_text="example_value" --caption="example_value" --description="example_value"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Response:**
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"success": true,
|
|
62
|
+
"data": {
|
|
63
|
+
"id": 123,
|
|
64
|
+
"title": "Created/Updated successfully",
|
|
65
|
+
"status": "publish"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## Response Format
|
|
78
|
+
|
|
79
|
+
**Return Type:** `media`
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"success": true,
|
|
84
|
+
"data": {
|
|
85
|
+
// media response data
|
|
86
|
+
},
|
|
87
|
+
"metadata": {
|
|
88
|
+
"timestamp": "2024-01-01T00:00:00.000Z",
|
|
89
|
+
"tool": "wp_update_media",
|
|
90
|
+
"site": "site1"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Error Handling
|
|
96
|
+
|
|
97
|
+
### AUTHENTICATION_FAILED
|
|
98
|
+
|
|
99
|
+
**Message:** Authentication failed
|
|
100
|
+
**Description:** Invalid credentials or insufficient permissions
|
|
101
|
+
**Resolution:** Check your authentication credentials and user permissions
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### VALIDATION_ERROR
|
|
105
|
+
|
|
106
|
+
**Message:** Parameter validation failed
|
|
107
|
+
**Description:** One or more required parameters are missing or invalid
|
|
108
|
+
**Resolution:** Review the required parameters and their formats
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### NOT_FOUND
|
|
112
|
+
|
|
113
|
+
**Message:** Resource not found
|
|
114
|
+
**Description:** The requested resource does not exist
|
|
115
|
+
**Resolution:** Verify the resource ID and ensure it exists
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### PERMISSION_DENIED
|
|
119
|
+
|
|
120
|
+
**Message:** Insufficient permissions
|
|
121
|
+
**Description:** The user does not have permission to perform this action
|
|
122
|
+
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
*Generated automatically from tool definitions - Do not edit manually*
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# wp_update_page
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Updates an existing page.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
| Parameter | Type | Required | Description | Default | Examples |
|
|
10
|
+
|-----------|------|----------|-------------|---------|----------|
|
|
11
|
+
| `id` | `number` | ✅ | The ID of the page to update. | - | `123`, `456` |
|
|
12
|
+
| `title` | `string` | ❌ | The new title for the page. | - | `My Blog Post`, `Hello World` |
|
|
13
|
+
| `content` | `string` | ❌ | The new content for the page, in HTML format. | - | `<p>Post content here</p>`, `This is my post content` |
|
|
14
|
+
| `status` | `string` | ❌ | The new status for the page. | `publish` | `example` |
|
|
15
|
+
|
|
16
|
+
## Examples
|
|
17
|
+
|
|
18
|
+
### Basic page Usage
|
|
19
|
+
|
|
20
|
+
Simple example of using wp_update_page
|
|
21
|
+
|
|
22
|
+
**Command:**
|
|
23
|
+
```bash
|
|
24
|
+
wp_update_page --id="123"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Response:**
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"success": true,
|
|
31
|
+
"data": {
|
|
32
|
+
"id": 123,
|
|
33
|
+
"title": "Created/Updated successfully",
|
|
34
|
+
"status": "publish"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Error Example (Authentication failure):**
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"error": "Authentication failed",
|
|
43
|
+
"message": "Invalid credentials or insufficient permissions"
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Advanced page Configuration
|
|
49
|
+
|
|
50
|
+
Comprehensive example using all available parameters
|
|
51
|
+
|
|
52
|
+
**Command:**
|
|
53
|
+
```bash
|
|
54
|
+
wp_update_page --id="123" --title="Example Post Title" --content="This is example content for the post." --status="publish"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Response:**
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"success": true,
|
|
61
|
+
"data": {
|
|
62
|
+
"id": 123,
|
|
63
|
+
"title": "Created/Updated successfully",
|
|
64
|
+
"status": "publish"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## Required Permissions
|
|
75
|
+
|
|
76
|
+
This tool requires the following WordPress user capabilities:
|
|
77
|
+
|
|
78
|
+
- `edit_pages`
|
|
79
|
+
|
|
80
|
+
**Note:** The authenticated user must have these capabilities to successfully execute this tool.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## Response Format
|
|
84
|
+
|
|
85
|
+
**Return Type:** `page`
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"success": true,
|
|
90
|
+
"data": {
|
|
91
|
+
// page response data
|
|
92
|
+
},
|
|
93
|
+
"metadata": {
|
|
94
|
+
"timestamp": "2024-01-01T00:00:00.000Z",
|
|
95
|
+
"tool": "wp_update_page",
|
|
96
|
+
"site": "site1"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Error Handling
|
|
102
|
+
|
|
103
|
+
### AUTHENTICATION_FAILED
|
|
104
|
+
|
|
105
|
+
**Message:** Authentication failed
|
|
106
|
+
**Description:** Invalid credentials or insufficient permissions
|
|
107
|
+
**Resolution:** Check your authentication credentials and user permissions
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### VALIDATION_ERROR
|
|
111
|
+
|
|
112
|
+
**Message:** Parameter validation failed
|
|
113
|
+
**Description:** One or more required parameters are missing or invalid
|
|
114
|
+
**Resolution:** Review the required parameters and their formats
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### NOT_FOUND
|
|
118
|
+
|
|
119
|
+
**Message:** Resource not found
|
|
120
|
+
**Description:** The requested resource does not exist
|
|
121
|
+
**Resolution:** Verify the resource ID and ensure it exists
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### PERMISSION_DENIED
|
|
125
|
+
|
|
126
|
+
**Message:** Insufficient permissions
|
|
127
|
+
**Description:** The user does not have permission to perform this action
|
|
128
|
+
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
*Generated automatically from tool definitions - Do not edit manually*
|