mcp-wordpress 2.10.0 → 2.10.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 +17 -19
- package/bin/mcp-wordpress.js +3 -3
- package/bin/setup.js +140 -141
- package/bin/status.js +112 -114
- package/dist/client/MockWordPressClient.d.ts.map +1 -1
- package/dist/client/MockWordPressClient.js.map +1 -1
- package/dist/client/SEOWordPressClient.d.ts.map +1 -1
- package/dist/client/SEOWordPressClient.js +16 -14
- package/dist/client/SEOWordPressClient.js.map +1 -1
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +6 -6
- package/dist/client/managers/AuthManager.d.ts.map +1 -1
- package/dist/client/managers/AuthManager.js +2 -2
- package/dist/client/managers/AuthManager.js.map +1 -1
- package/dist/client/managers/AuthenticationManager.js +1 -1
- package/dist/client/managers/JWTAuthImplementation.d.ts.map +1 -1
- package/dist/client/managers/JWTAuthImplementation.js +7 -7
- package/dist/client/managers/JWTAuthImplementation.js.map +1 -1
- package/dist/client/managers/composed/MigrationAdapter.js +1 -1
- package/dist/client/managers/composed/index.d.ts +2 -2
- package/dist/client/managers/composed/index.d.ts.map +1 -1
- package/dist/client/managers/composed/index.js +1 -1
- package/dist/client/managers/composed/index.js.map +1 -1
- package/dist/client/managers/implementations/ErrorHandlerImpl.d.ts.map +1 -1
- package/dist/client/managers/implementations/ErrorHandlerImpl.js +2 -4
- package/dist/client/managers/implementations/ErrorHandlerImpl.js.map +1 -1
- package/dist/client/managers/implementations/ParameterValidatorImpl.d.ts.map +1 -1
- package/dist/client/managers/implementations/ParameterValidatorImpl.js +1 -1
- package/dist/client/managers/implementations/ParameterValidatorImpl.js.map +1 -1
- package/dist/client/managers/interfaces/ManagerInterfaces.d.ts.map +1 -1
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +3 -3
- package/dist/docs/MarkdownFormatter.d.ts.map +1 -1
- package/dist/docs/MarkdownFormatter.js +7 -7
- package/dist/docs/MarkdownFormatter.js.map +1 -1
- package/dist/performance/PerformanceAnalytics.d.ts.map +1 -1
- package/dist/performance/PerformanceAnalytics.js +3 -1
- package/dist/performance/PerformanceAnalytics.js.map +1 -1
- package/dist/security/InputValidator.js +1 -1
- package/dist/security/SecurityCIPipeline.js +1 -1
- package/dist/security/SecurityCIPipeline.js.map +1 -1
- package/dist/security/SecurityConfig.d.ts.map +1 -1
- package/dist/security/SecurityConfig.js +6 -2
- package/dist/security/SecurityConfig.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +2 -2
- package/dist/tools/cache.d.ts.map +1 -1
- package/dist/tools/cache.js.map +1 -1
- package/dist/tools/comments.d.ts.map +1 -1
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/performance.d.ts.map +1 -1
- package/dist/tools/performance.js.map +1 -1
- package/dist/tools/posts/PostHandlers.d.ts.map +1 -1
- package/dist/tools/posts/PostHandlers.js.map +1 -1
- package/dist/tools/seo/SEOTools.d.ts.map +1 -1
- package/dist/tools/seo/SEOTools.js.map +1 -1
- package/dist/tools/seo/analyzers/ContentAnalyzer.d.ts.map +1 -1
- package/dist/tools/seo/analyzers/ContentAnalyzer.js.map +1 -1
- package/dist/types/enhanced.d.ts +17 -17
- package/dist/types/enhanced.d.ts.map +1 -1
- package/dist/types/enhanced.js +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/requests.d.ts +16 -16
- package/dist/types/tools.d.ts +46 -46
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/index.d.ts +7 -7
- package/dist/utils/index.js +7 -7
- package/docs/ARCHITECTURE.md +17 -17
- package/docs/BADGE_UPDATES.md +11 -11
- package/docs/CACHING.md +2 -0
- package/docs/CI_CD_IMPROVEMENTS.md +8 -5
- package/docs/CONFIGURATION.md +76 -46
- package/docs/DOCKER_PUBLISHING_TROUBLESHOOTING.md +11 -2
- package/docs/EVALUATION.md +16 -21
- package/docs/INCREMENTAL_COVERAGE.md +7 -3
- package/docs/INSTALLATION.md +33 -19
- package/docs/PUBLISHING-TROUBLESHOOTING.md +3 -2
- package/docs/SECURITY.md +17 -15
- package/docs/SECURITY_TESTING.md +3 -0
- package/docs/TROUBLESHOOTING.md +85 -36
- package/docs/api/README.md +118 -125
- package/docs/api/categories/auth.md +3 -1
- package/docs/api/categories/cache.md +3 -1
- package/docs/api/categories/comment.md +3 -1
- package/docs/api/categories/media.md +3 -1
- package/docs/api/categories/page.md +3 -1
- package/docs/api/categories/performance.md +3 -1
- package/docs/api/categories/post.md +3 -1
- package/docs/api/categories/site.md +3 -1
- package/docs/api/categories/taxonomy.md +3 -1
- package/docs/api/categories/user.md +3 -1
- package/docs/api/openapi.json +114 -410
- package/docs/api/summary.json +1 -1
- package/docs/api/tools/wp_approve_comment.md +13 -25
- package/docs/api/tools/wp_cache_clear.md +17 -30
- package/docs/api/tools/wp_cache_info.md +16 -29
- package/docs/api/tools/wp_cache_stats.md +16 -29
- package/docs/api/tools/wp_cache_warm.md +16 -29
- package/docs/api/tools/wp_create_application_password.md +14 -26
- package/docs/api/tools/wp_create_category.md +14 -26
- package/docs/api/tools/wp_create_comment.md +18 -31
- package/docs/api/tools/wp_create_page.md +17 -29
- package/docs/api/tools/wp_create_post.md +25 -30
- package/docs/api/tools/wp_create_tag.md +13 -25
- package/docs/api/tools/wp_create_user.md +18 -30
- package/docs/api/tools/wp_delete_application_password.md +14 -26
- package/docs/api/tools/wp_delete_category.md +13 -25
- package/docs/api/tools/wp_delete_comment.md +14 -26
- package/docs/api/tools/wp_delete_media.md +14 -25
- package/docs/api/tools/wp_delete_page.md +14 -25
- package/docs/api/tools/wp_delete_post.md +17 -25
- package/docs/api/tools/wp_delete_tag.md +13 -25
- package/docs/api/tools/wp_delete_user.md +14 -25
- package/docs/api/tools/wp_get_application_passwords.md +13 -25
- package/docs/api/tools/wp_get_auth_status.md +12 -24
- package/docs/api/tools/wp_get_category.md +13 -25
- package/docs/api/tools/wp_get_comment.md +13 -25
- package/docs/api/tools/wp_get_current_user.md +17 -30
- package/docs/api/tools/wp_get_media.md +13 -25
- package/docs/api/tools/wp_get_page.md +13 -25
- package/docs/api/tools/wp_get_page_revisions.md +13 -25
- package/docs/api/tools/wp_get_post.md +16 -25
- package/docs/api/tools/wp_get_post_revisions.md +13 -25
- package/docs/api/tools/wp_get_site_settings.md +12 -23
- package/docs/api/tools/wp_get_tag.md +13 -25
- package/docs/api/tools/wp_get_user.md +13 -25
- package/docs/api/tools/wp_list_categories.md +15 -27
- package/docs/api/tools/wp_list_comments.md +15 -27
- package/docs/api/tools/wp_list_media.md +18 -31
- package/docs/api/tools/wp_list_pages.md +18 -31
- package/docs/api/tools/wp_list_posts.md +29 -41
- package/docs/api/tools/wp_list_tags.md +14 -26
- package/docs/api/tools/wp_list_users.md +20 -34
- package/docs/api/tools/wp_performance_alerts.md +22 -36
- package/docs/api/tools/wp_performance_benchmark.md +20 -34
- package/docs/api/tools/wp_performance_export.md +22 -36
- package/docs/api/tools/wp_performance_history.md +21 -35
- package/docs/api/tools/wp_performance_optimize.md +22 -36
- package/docs/api/tools/wp_performance_stats.md +20 -34
- package/docs/api/tools/wp_search_site.md +18 -32
- package/docs/api/tools/wp_spam_comment.md +13 -25
- package/docs/api/tools/wp_switch_auth_method.md +18 -31
- package/docs/api/tools/wp_test_auth.md +15 -30
- package/docs/api/tools/wp_update_category.md +14 -26
- package/docs/api/tools/wp_update_comment.md +17 -30
- package/docs/api/tools/wp_update_media.md +19 -32
- package/docs/api/tools/wp_update_page.md +18 -30
- package/docs/api/tools/wp_update_post.md +21 -30
- package/docs/api/tools/wp_update_site_settings.md +18 -31
- package/docs/api/tools/wp_update_tag.md +14 -26
- package/docs/api/tools/wp_update_user.md +17 -29
- package/docs/api/tools/wp_upload_media.md +20 -32
- package/docs/api/types/WordPressPost.md +8 -15
- package/docs/code-improvements.md +1 -0
- package/docs/developer/GITHUB_ACTIONS_SETUP.md +2 -2
- package/docs/developer/MAINTENANCE.md +4 -0
- package/docs/developer/NPM_AUTH_SETUP.md +3 -0
- package/docs/developer/RELEASE_PROCESS.md +1 -0
- package/docs/examples/multi-site-setup.md +2 -0
- package/docs/integrations/claude-desktop.md +14 -5
- package/docs/integrations/cline.md +1 -0
- package/docs/user-guides/DTX_SETUP.md +9 -8
- package/docs/user-guides/NPX_SETUP.md +5 -9
- package/docs/user-guides/SMITHERY_SETUP.md +5 -0
- package/docs/v2.2.0-resolution-demo.md +17 -2
- package/package.json +2 -1
- package/src/cache/__tests__/CacheManager.test.ts +4 -8
- package/src/client/MockWordPressClient.ts +5 -1
- package/src/client/SEOWordPressClient.ts +30 -26
- package/src/client/index.ts +6 -6
- package/src/client/managers/AuthManager.ts +16 -8
- package/src/client/managers/AuthenticationManager.ts +2 -2
- package/src/client/managers/JWTAuthImplementation.ts +24 -27
- package/src/client/managers/ManagersIndex.ts +1 -1
- package/src/client/managers/composed/MigrationAdapter.ts +1 -1
- package/src/client/managers/composed/index.ts +7 -7
- package/src/client/managers/implementations/ErrorHandlerImpl.ts +12 -26
- package/src/client/managers/implementations/ParameterValidatorImpl.ts +49 -49
- package/src/client/managers/interfaces/ManagerInterfaces.ts +13 -9
- package/src/config/index.ts +3 -3
- package/src/docs/MarkdownFormatter.ts +13 -9
- package/src/performance/PerformanceAnalytics.ts +9 -3
- package/src/security/InputValidator.ts +1 -1
- package/src/security/SecurityCIPipeline.ts +1 -1
- package/src/security/SecurityConfig.ts +9 -3
- package/src/server/index.ts +2 -2
- package/src/tools/cache.ts +3 -1
- package/src/tools/comments.ts +3 -1
- package/src/tools/performance.ts +7 -3
- package/src/tools/posts/PostHandlers.ts +3 -1
- package/src/tools/seo/SEOTools.ts +6 -2
- package/src/tools/seo/analyzers/ContentAnalyzer.ts +9 -3
- package/src/types/enhanced.ts +34 -34
- package/src/types/index.ts +13 -11
- package/src/types/requests.ts +19 -19
- package/src/types/tools.ts +137 -84
- package/src/utils/index.ts +7 -7
|
@@ -6,11 +6,11 @@ Updates one or more general settings for a WordPress site.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
| Parameter
|
|
10
|
-
|
|
11
|
-
| `title`
|
|
12
|
-
| `description` | `string` | ❌
|
|
13
|
-
| `timezone`
|
|
9
|
+
| Parameter | Type | Required | Description | Default | Examples |
|
|
10
|
+
| ------------- | -------- | -------- | ------------------------------------------------------ | ------- | ----------------------------- |
|
|
11
|
+
| `title` | `string` | ❌ | The title of the site. | - | `My Blog Post`, `Hello World` |
|
|
12
|
+
| `description` | `string` | ❌ | The tagline or description of the site. | - | `example` |
|
|
13
|
+
| `timezone` | `string` | ❌ | A city in the same timezone, e.g., 'America/New_York'. | - | `example` |
|
|
14
14
|
|
|
15
15
|
## Examples
|
|
16
16
|
|
|
@@ -19,11 +19,13 @@ Updates one or more general settings for a WordPress site.
|
|
|
19
19
|
Simple example of using wp_update_site_settings
|
|
20
20
|
|
|
21
21
|
**Command:**
|
|
22
|
+
|
|
22
23
|
```bash
|
|
23
|
-
wp_update_site_settings
|
|
24
|
+
wp_update_site_settings
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
**Response:**
|
|
28
|
+
|
|
27
29
|
```json
|
|
28
30
|
{
|
|
29
31
|
"success": true,
|
|
@@ -36,6 +38,7 @@ wp_update_site_settings
|
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
**Error Example (Authentication failure):**
|
|
41
|
+
|
|
39
42
|
```json
|
|
40
43
|
{
|
|
41
44
|
"error": "Authentication failed",
|
|
@@ -43,17 +46,18 @@ wp_update_site_settings
|
|
|
43
46
|
}
|
|
44
47
|
```
|
|
45
48
|
|
|
46
|
-
|
|
47
49
|
### Advanced site Configuration
|
|
48
50
|
|
|
49
51
|
Comprehensive example using all available parameters
|
|
50
52
|
|
|
51
53
|
**Command:**
|
|
54
|
+
|
|
52
55
|
```bash
|
|
53
56
|
wp_update_site_settings --title="Example Post Title" --description="example_value" --timezone="example_value"
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
**Response:**
|
|
60
|
+
|
|
57
61
|
```json
|
|
58
62
|
{
|
|
59
63
|
"success": true,
|
|
@@ -65,13 +69,6 @@ wp_update_site_settings --title="Example Post Title" --description="example_valu
|
|
|
65
69
|
}
|
|
66
70
|
```
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
72
|
## Response Format
|
|
76
73
|
|
|
77
74
|
**Return Type:** `site`
|
|
@@ -94,34 +91,24 @@ wp_update_site_settings --title="Example Post Title" --description="example_valu
|
|
|
94
91
|
|
|
95
92
|
### AUTHENTICATION_FAILED
|
|
96
93
|
|
|
97
|
-
**Message:** Authentication failed
|
|
98
|
-
|
|
99
|
-
**Resolution:** Check your authentication credentials and user permissions
|
|
100
|
-
|
|
94
|
+
**Message:** Authentication failed **Description:** Invalid credentials or insufficient permissions **Resolution:**
|
|
95
|
+
Check your authentication credentials and user permissions
|
|
101
96
|
|
|
102
97
|
### VALIDATION_ERROR
|
|
103
98
|
|
|
104
|
-
**Message:** Parameter validation failed
|
|
105
|
-
**Description:** One or more required parameters are missing or invalid
|
|
99
|
+
**Message:** Parameter validation failed **Description:** One or more required parameters are missing or invalid
|
|
106
100
|
**Resolution:** Review the required parameters and their formats
|
|
107
101
|
|
|
108
|
-
|
|
109
102
|
### NOT_FOUND
|
|
110
103
|
|
|
111
|
-
**Message:** Resource not found
|
|
112
|
-
|
|
113
|
-
**Resolution:** Verify the resource ID and ensure it exists
|
|
114
|
-
|
|
104
|
+
**Message:** Resource not found **Description:** The requested resource does not exist **Resolution:** Verify the
|
|
105
|
+
resource ID and ensure it exists
|
|
115
106
|
|
|
116
107
|
### PERMISSION_DENIED
|
|
117
108
|
|
|
118
|
-
**Message:** Insufficient permissions
|
|
119
|
-
**Description:** The user does not have permission to perform this action
|
|
109
|
+
**Message:** Insufficient permissions **Description:** The user does not have permission to perform this action
|
|
120
110
|
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
121
111
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
112
|
---
|
|
126
113
|
|
|
127
|
-
|
|
114
|
+
_Generated automatically from tool definitions - Do not edit manually_
|
|
@@ -6,10 +6,10 @@ Updates an existing tag.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
| Parameter | Type
|
|
10
|
-
|
|
11
|
-
| `id`
|
|
12
|
-
| `name`
|
|
9
|
+
| Parameter | Type | Required | Description | Default | Examples |
|
|
10
|
+
| --------- | -------- | -------- | ---------------------------- | ------- | ------------ |
|
|
11
|
+
| `id` | `number` | ✅ | The ID of the tag to update. | - | `123`, `456` |
|
|
12
|
+
| `name` | `string` | ❌ | The new name for the tag. | - | `example` |
|
|
13
13
|
|
|
14
14
|
## Examples
|
|
15
15
|
|
|
@@ -18,11 +18,13 @@ Updates an existing tag.
|
|
|
18
18
|
Simple example of using wp_update_tag
|
|
19
19
|
|
|
20
20
|
**Command:**
|
|
21
|
+
|
|
21
22
|
```bash
|
|
22
23
|
wp_update_tag --id="123"
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
**Response:**
|
|
27
|
+
|
|
26
28
|
```json
|
|
27
29
|
{
|
|
28
30
|
"success": true,
|
|
@@ -35,6 +37,7 @@ wp_update_tag --id="123"
|
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
**Error Example (Authentication failure):**
|
|
40
|
+
|
|
38
41
|
```json
|
|
39
42
|
{
|
|
40
43
|
"error": "Authentication failed",
|
|
@@ -42,11 +45,6 @@ wp_update_tag --id="123"
|
|
|
42
45
|
}
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
48
|
## Response Format
|
|
51
49
|
|
|
52
50
|
**Return Type:** `taxonomy`
|
|
@@ -69,34 +67,24 @@ wp_update_tag --id="123"
|
|
|
69
67
|
|
|
70
68
|
### AUTHENTICATION_FAILED
|
|
71
69
|
|
|
72
|
-
**Message:** Authentication failed
|
|
73
|
-
|
|
74
|
-
**Resolution:** Check your authentication credentials and user permissions
|
|
75
|
-
|
|
70
|
+
**Message:** Authentication failed **Description:** Invalid credentials or insufficient permissions **Resolution:**
|
|
71
|
+
Check your authentication credentials and user permissions
|
|
76
72
|
|
|
77
73
|
### VALIDATION_ERROR
|
|
78
74
|
|
|
79
|
-
**Message:** Parameter validation failed
|
|
80
|
-
**Description:** One or more required parameters are missing or invalid
|
|
75
|
+
**Message:** Parameter validation failed **Description:** One or more required parameters are missing or invalid
|
|
81
76
|
**Resolution:** Review the required parameters and their formats
|
|
82
77
|
|
|
83
|
-
|
|
84
78
|
### NOT_FOUND
|
|
85
79
|
|
|
86
|
-
**Message:** Resource not found
|
|
87
|
-
|
|
88
|
-
**Resolution:** Verify the resource ID and ensure it exists
|
|
89
|
-
|
|
80
|
+
**Message:** Resource not found **Description:** The requested resource does not exist **Resolution:** Verify the
|
|
81
|
+
resource ID and ensure it exists
|
|
90
82
|
|
|
91
83
|
### PERMISSION_DENIED
|
|
92
84
|
|
|
93
|
-
**Message:** Insufficient permissions
|
|
94
|
-
**Description:** The user does not have permission to perform this action
|
|
85
|
+
**Message:** Insufficient permissions **Description:** The user does not have permission to perform this action
|
|
95
86
|
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
96
87
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
88
|
---
|
|
101
89
|
|
|
102
|
-
|
|
90
|
+
_Generated automatically from tool definitions - Do not edit manually_
|
|
@@ -6,11 +6,11 @@ Updates an existing user.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
| Parameter | Type
|
|
10
|
-
|
|
11
|
-
| `id`
|
|
12
|
-
| `email`
|
|
13
|
-
| `name`
|
|
9
|
+
| Parameter | Type | Required | Description | Default | Examples |
|
|
10
|
+
| --------- | -------- | -------- | ----------------------------------- | ------- | ------------------------------------ |
|
|
11
|
+
| `id` | `number` | ✅ | The ID of the user to update. | - | `123`, `456` |
|
|
12
|
+
| `email` | `string` | ❌ | The new email address for the user. | - | `user@example.com`, `admin@site.com` |
|
|
13
|
+
| `name` | `string` | ❌ | The new display name for the user. | - | `example` |
|
|
14
14
|
|
|
15
15
|
## Examples
|
|
16
16
|
|
|
@@ -19,11 +19,13 @@ Updates an existing user.
|
|
|
19
19
|
Simple example of using wp_update_user
|
|
20
20
|
|
|
21
21
|
**Command:**
|
|
22
|
+
|
|
22
23
|
```bash
|
|
23
24
|
wp_update_user --id="123"
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
**Response:**
|
|
28
|
+
|
|
27
29
|
```json
|
|
28
30
|
{
|
|
29
31
|
"success": true,
|
|
@@ -36,6 +38,7 @@ wp_update_user --id="123"
|
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
**Error Example (Authentication failure):**
|
|
41
|
+
|
|
39
42
|
```json
|
|
40
43
|
{
|
|
41
44
|
"error": "Authentication failed",
|
|
@@ -43,17 +46,18 @@ wp_update_user --id="123"
|
|
|
43
46
|
}
|
|
44
47
|
```
|
|
45
48
|
|
|
46
|
-
|
|
47
49
|
### Advanced user Configuration
|
|
48
50
|
|
|
49
51
|
Comprehensive example using all available parameters
|
|
50
52
|
|
|
51
53
|
**Command:**
|
|
54
|
+
|
|
52
55
|
```bash
|
|
53
56
|
wp_update_user --id="123" --email="user@example.com" --name="example_value"
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
**Response:**
|
|
60
|
+
|
|
57
61
|
```json
|
|
58
62
|
{
|
|
59
63
|
"success": true,
|
|
@@ -65,11 +69,6 @@ wp_update_user --id="123" --email="user@example.com" --name="example_value"
|
|
|
65
69
|
}
|
|
66
70
|
```
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
72
|
## Required Permissions
|
|
74
73
|
|
|
75
74
|
This tool requires the following WordPress user capabilities:
|
|
@@ -78,7 +77,6 @@ This tool requires the following WordPress user capabilities:
|
|
|
78
77
|
|
|
79
78
|
**Note:** The authenticated user must have these capabilities to successfully execute this tool.
|
|
80
79
|
|
|
81
|
-
|
|
82
80
|
## Response Format
|
|
83
81
|
|
|
84
82
|
**Return Type:** `user`
|
|
@@ -101,34 +99,24 @@ This tool requires the following WordPress user capabilities:
|
|
|
101
99
|
|
|
102
100
|
### AUTHENTICATION_FAILED
|
|
103
101
|
|
|
104
|
-
**Message:** Authentication failed
|
|
105
|
-
|
|
106
|
-
**Resolution:** Check your authentication credentials and user permissions
|
|
107
|
-
|
|
102
|
+
**Message:** Authentication failed **Description:** Invalid credentials or insufficient permissions **Resolution:**
|
|
103
|
+
Check your authentication credentials and user permissions
|
|
108
104
|
|
|
109
105
|
### VALIDATION_ERROR
|
|
110
106
|
|
|
111
|
-
**Message:** Parameter validation failed
|
|
112
|
-
**Description:** One or more required parameters are missing or invalid
|
|
107
|
+
**Message:** Parameter validation failed **Description:** One or more required parameters are missing or invalid
|
|
113
108
|
**Resolution:** Review the required parameters and their formats
|
|
114
109
|
|
|
115
|
-
|
|
116
110
|
### NOT_FOUND
|
|
117
111
|
|
|
118
|
-
**Message:** Resource not found
|
|
119
|
-
|
|
120
|
-
**Resolution:** Verify the resource ID and ensure it exists
|
|
121
|
-
|
|
112
|
+
**Message:** Resource not found **Description:** The requested resource does not exist **Resolution:** Verify the
|
|
113
|
+
resource ID and ensure it exists
|
|
122
114
|
|
|
123
115
|
### PERMISSION_DENIED
|
|
124
116
|
|
|
125
|
-
**Message:** Insufficient permissions
|
|
126
|
-
**Description:** The user does not have permission to perform this action
|
|
117
|
+
**Message:** Insufficient permissions **Description:** The user does not have permission to perform this action
|
|
127
118
|
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
128
119
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
120
|
---
|
|
133
121
|
|
|
134
|
-
|
|
122
|
+
_Generated automatically from tool definitions - Do not edit manually_
|
|
@@ -6,14 +6,14 @@ Uploads a file to the WordPress media library.
|
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
9
|
-
| Parameter
|
|
10
|
-
|
|
11
|
-
| `file_path`
|
|
12
|
-
| `title`
|
|
13
|
-
| `alt_text`
|
|
14
|
-
| `caption`
|
|
15
|
-
| `description` | `string` | ❌
|
|
16
|
-
| `post`
|
|
9
|
+
| Parameter | Type | Required | Description | Default | Examples |
|
|
10
|
+
| ------------- | -------- | -------- | -------------------------------------------------------- | ------- | ----------------------------- |
|
|
11
|
+
| `file_path` | `string` | ✅ | The local, absolute path to the file to upload. | - | `example` |
|
|
12
|
+
| `title` | `string` | ❌ | The title for the media item. | - | `My Blog Post`, `Hello World` |
|
|
13
|
+
| `alt_text` | `string` | ❌ | Alternative text for the media item (for accessibility). | - | `example` |
|
|
14
|
+
| `caption` | `string` | ❌ | The caption for the media item. | - | `example` |
|
|
15
|
+
| `description` | `string` | ❌ | The description for the media item. | - | `example` |
|
|
16
|
+
| `post` | `number` | ❌ | The ID of a post to attach this media to. | - | `example` |
|
|
17
17
|
|
|
18
18
|
## Examples
|
|
19
19
|
|
|
@@ -22,11 +22,13 @@ Uploads a file to the WordPress media library.
|
|
|
22
22
|
Simple example of using wp_upload_media
|
|
23
23
|
|
|
24
24
|
**Command:**
|
|
25
|
+
|
|
25
26
|
```bash
|
|
26
27
|
wp_upload_media --file_path="example_value"
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
**Response:**
|
|
31
|
+
|
|
30
32
|
```json
|
|
31
33
|
{
|
|
32
34
|
"success": true,
|
|
@@ -36,6 +38,7 @@ wp_upload_media --file_path="example_value"
|
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
**Error Example (Authentication failure):**
|
|
41
|
+
|
|
39
42
|
```json
|
|
40
43
|
{
|
|
41
44
|
"error": "Authentication failed",
|
|
@@ -43,17 +46,18 @@ wp_upload_media --file_path="example_value"
|
|
|
43
46
|
}
|
|
44
47
|
```
|
|
45
48
|
|
|
46
|
-
|
|
47
49
|
### Advanced media Configuration
|
|
48
50
|
|
|
49
51
|
Comprehensive example using all available parameters
|
|
50
52
|
|
|
51
53
|
**Command:**
|
|
54
|
+
|
|
52
55
|
```bash
|
|
53
56
|
wp_upload_media --file_path="example_value" --title="Example Post Title" --alt_text="example_value" --caption="example_value" --description="example_value" --post="example_value"
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
**Response:**
|
|
60
|
+
|
|
57
61
|
```json
|
|
58
62
|
{
|
|
59
63
|
"success": true,
|
|
@@ -62,11 +66,6 @@ wp_upload_media --file_path="example_value" --title="Example Post Title" --alt_t
|
|
|
62
66
|
}
|
|
63
67
|
```
|
|
64
68
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
69
|
## Required Permissions
|
|
71
70
|
|
|
72
71
|
This tool requires the following WordPress user capabilities:
|
|
@@ -75,7 +74,6 @@ This tool requires the following WordPress user capabilities:
|
|
|
75
74
|
|
|
76
75
|
**Note:** The authenticated user must have these capabilities to successfully execute this tool.
|
|
77
76
|
|
|
78
|
-
|
|
79
77
|
## Response Format
|
|
80
78
|
|
|
81
79
|
**Return Type:** `object`
|
|
@@ -98,34 +96,24 @@ This tool requires the following WordPress user capabilities:
|
|
|
98
96
|
|
|
99
97
|
### AUTHENTICATION_FAILED
|
|
100
98
|
|
|
101
|
-
**Message:** Authentication failed
|
|
102
|
-
|
|
103
|
-
**Resolution:** Check your authentication credentials and user permissions
|
|
104
|
-
|
|
99
|
+
**Message:** Authentication failed **Description:** Invalid credentials or insufficient permissions **Resolution:**
|
|
100
|
+
Check your authentication credentials and user permissions
|
|
105
101
|
|
|
106
102
|
### VALIDATION_ERROR
|
|
107
103
|
|
|
108
|
-
**Message:** Parameter validation failed
|
|
109
|
-
**Description:** One or more required parameters are missing or invalid
|
|
104
|
+
**Message:** Parameter validation failed **Description:** One or more required parameters are missing or invalid
|
|
110
105
|
**Resolution:** Review the required parameters and their formats
|
|
111
106
|
|
|
112
|
-
|
|
113
107
|
### NOT_FOUND
|
|
114
108
|
|
|
115
|
-
**Message:** Resource not found
|
|
116
|
-
|
|
117
|
-
**Resolution:** Verify the resource ID and ensure it exists
|
|
118
|
-
|
|
109
|
+
**Message:** Resource not found **Description:** The requested resource does not exist **Resolution:** Verify the
|
|
110
|
+
resource ID and ensure it exists
|
|
119
111
|
|
|
120
112
|
### PERMISSION_DENIED
|
|
121
113
|
|
|
122
|
-
**Message:** Insufficient permissions
|
|
123
|
-
**Description:** The user does not have permission to perform this action
|
|
114
|
+
**Message:** Insufficient permissions **Description:** The user does not have permission to perform this action
|
|
124
115
|
**Resolution:** Contact an administrator to grant the necessary permissions
|
|
125
116
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
117
|
---
|
|
130
118
|
|
|
131
|
-
|
|
119
|
+
_Generated automatically from tool definitions - Do not edit manually_
|
|
@@ -6,12 +6,12 @@ WordPress blog post object
|
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
9
|
-
| Property
|
|
10
|
-
|
|
11
|
-
| `id`
|
|
12
|
-
| `title`
|
|
13
|
-
| `content` | `string` | ✅
|
|
14
|
-
| `status`
|
|
9
|
+
| Property | Type | Required | Description |
|
|
10
|
+
| --------- | -------- | -------- | ------------------ |
|
|
11
|
+
| `id` | `number` | ✅ | Unique identifier |
|
|
12
|
+
| `title` | `string` | ✅ | Post title |
|
|
13
|
+
| `content` | `string` | ✅ | Post content |
|
|
14
|
+
| `status` | `string` | ✅ | Publication status |
|
|
15
15
|
|
|
16
16
|
## Example
|
|
17
17
|
|
|
@@ -23,17 +23,10 @@ WordPress blog post object
|
|
|
23
23
|
"status": "publish",
|
|
24
24
|
"date": "2024-01-01T00:00:00Z",
|
|
25
25
|
"author": 1,
|
|
26
|
-
"categories": [
|
|
27
|
-
|
|
28
|
-
],
|
|
29
|
-
"tags": [
|
|
30
|
-
1,
|
|
31
|
-
2
|
|
32
|
-
],
|
|
26
|
+
"categories": [1],
|
|
27
|
+
"tags": [1, 2],
|
|
33
28
|
"featured_media": 0,
|
|
34
29
|
"excerpt": "A sample WordPress post",
|
|
35
30
|
"slug": "welcome-to-wordpress"
|
|
36
31
|
}
|
|
37
32
|
```
|
|
38
|
-
|
|
39
|
-
|
|
@@ -9,8 +9,7 @@ NPM publishing.
|
|
|
9
9
|
|
|
10
10
|
### 1. NPM Publish Workflow (`.github/workflows/npm-publish.yml`)
|
|
11
11
|
|
|
12
|
-
**Trigger**: When a GitHub release is created
|
|
13
|
-
**Purpose**: Automatically publish the package to NPM
|
|
12
|
+
**Trigger**: When a GitHub release is created **Purpose**: Automatically publish the package to NPM
|
|
14
13
|
|
|
15
14
|
**Features**:
|
|
16
15
|
|
|
@@ -58,6 +57,7 @@ gh release create v1.1.3 --title "Release v1.1.3" --notes "Release notes here"
|
|
|
58
57
|
### 1. Configure NPM Token
|
|
59
58
|
|
|
60
59
|
1. **Generate NPM Token**:
|
|
60
|
+
|
|
61
61
|
- Log in to [npmjs.com](https://npmjs.com)
|
|
62
62
|
- Go to Account Settings → Access Tokens
|
|
63
63
|
- Create an "Automation" token
|
|
@@ -150,11 +150,13 @@ The following scripts help maintain file integrity:
|
|
|
150
150
|
### Monthly Tasks
|
|
151
151
|
|
|
152
152
|
1. **Comprehensive Security Review**
|
|
153
|
+
|
|
153
154
|
- Check `.gitignore` and `.npmignore` for new patterns
|
|
154
155
|
- Review npm audit results
|
|
155
156
|
- Verify no credentials in commit history
|
|
156
157
|
|
|
157
158
|
2. **Documentation Updates**
|
|
159
|
+
|
|
158
160
|
- Update README.md with new features
|
|
159
161
|
- Review and update CLAUDE.md
|
|
160
162
|
- Check all markdown files for accuracy
|
|
@@ -224,6 +226,7 @@ node_modules/
|
|
|
224
226
|
### Credential Management
|
|
225
227
|
|
|
226
228
|
1. **Local Development:**
|
|
229
|
+
|
|
227
230
|
- Store tokens in `~/.npmrc` or environment variables
|
|
228
231
|
- Never commit `.npmrc` to version control
|
|
229
232
|
- Use separate tokens for development vs. CI/CD
|
|
@@ -246,6 +249,7 @@ node_modules/
|
|
|
246
249
|
```
|
|
247
250
|
|
|
248
251
|
2. **Credential Rotation:**
|
|
252
|
+
|
|
249
253
|
- Revoke compromised NPM tokens
|
|
250
254
|
- Rotate any exposed API keys
|
|
251
255
|
- Update GitHub secrets
|
|
@@ -35,6 +35,7 @@ The project includes a pre-configured `.npmrc` file that uses environment variab
|
|
|
35
35
|
### Method 1: Using NPM Token (Recommended for Automation)
|
|
36
36
|
|
|
37
37
|
1. **Create an NPM automation token**:
|
|
38
|
+
|
|
38
39
|
- Log in to npmjs.com
|
|
39
40
|
- Go to Account Settings → Access Tokens
|
|
40
41
|
- Click "Generate New Token" → Choose "Automation" type
|
|
@@ -86,10 +87,12 @@ npm config set //registry.npmjs.org/:_authToken YOUR_NPM_TOKEN
|
|
|
86
87
|
## Security Best Practices
|
|
87
88
|
|
|
88
89
|
1. **Never commit `.npmrc` with tokens** to version control
|
|
90
|
+
|
|
89
91
|
- Add `.npmrc` to `.gitignore` if storing tokens there
|
|
90
92
|
- Use environment variables for tokens
|
|
91
93
|
|
|
92
94
|
2. **Use different tokens for different purposes**:
|
|
95
|
+
|
|
93
96
|
- Personal development: Read-only or Publish token
|
|
94
97
|
- CI/CD: Automation token (like your NPM_TOKEN in GitHub secrets)
|
|
95
98
|
- Team projects: Shared organization tokens
|
|
@@ -515,10 +515,12 @@ Each site in the configuration maintains complete isolation:
|
|
|
515
515
|
### Common Problems
|
|
516
516
|
|
|
517
517
|
1. **Site ID not found**
|
|
518
|
+
|
|
518
519
|
- Verify the `id` field matches exactly
|
|
519
520
|
- Check for typos in site parameter
|
|
520
521
|
|
|
521
522
|
2. **Authentication fails for specific site**
|
|
523
|
+
|
|
522
524
|
- Test each site's credentials individually
|
|
523
525
|
- Regenerate application passwords if needed
|
|
524
526
|
|