drupal-mcp-connector 1.3.1 → 1.3.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/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/tools/config.js +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.2] - 2026-06-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- `drupal_config_set` now forwards the configuration map under the `data` key the
|
|
14
|
+
server-side tool requires, instead of `value`. The governed tool
|
|
15
|
+
(`tool_api.mcp_sentinel_config_set`) declares its inputs as `name` plus `data` (a
|
|
16
|
+
map of top-level keys to new values, applied as a partial update). Previously the
|
|
17
|
+
connector sent `{ name, value }`, so every `config_set` was rejected with
|
|
18
|
+
`-32602 Invalid parameters … Missing required properties: \`data\``. The public
|
|
19
|
+
tool surface is unchanged — callers still pass `value` (a map); it is translated to
|
|
20
|
+
`data` at the call site. `config_get` / `config_list` were unaffected.
|
|
21
|
+
|
|
10
22
|
## [1.3.1] - 2026-06-27
|
|
11
23
|
|
|
12
24
|
### Fixed
|
package/package.json
CHANGED
package/src/tools/config.js
CHANGED
|
@@ -57,6 +57,11 @@ async function configList({ site: siteName, prefix }) {
|
|
|
57
57
|
/**
|
|
58
58
|
* Set a configuration value. Governed and audited server-side; the connector
|
|
59
59
|
* additionally enforces the config-write cap before dispatching.
|
|
60
|
+
*
|
|
61
|
+
* The public `value` is a map of top-level config keys to their new values; the
|
|
62
|
+
* server-side tool (mcp_sentinel McpConfigSetTool) takes that map under the key
|
|
63
|
+
* `data` and applies a partial `$editable->set($key, $value)` per entry, so we
|
|
64
|
+
* translate `value` → `data` at the call site.
|
|
60
65
|
* @param {object} args - { site?, name, value }.
|
|
61
66
|
* @returns {Promise<*>} The server tool's result.
|
|
62
67
|
* @throws {SecurityError} if the site is read-only or config writes are disabled.
|
|
@@ -67,7 +72,7 @@ async function configSet({ site: siteName, name, value }) {
|
|
|
67
72
|
assertConfigScope(site, `config:set ${name}`);
|
|
68
73
|
assertNotReadOnly(sec, `config:set ${name}`);
|
|
69
74
|
assertConfigWriteAllowed(sec);
|
|
70
|
-
return callServerTool(site, SERVER_TOOLS.configSet, { name, value });
|
|
75
|
+
return callServerTool(site, SERVER_TOOLS.configSet, { name, data: value });
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
// ---------------------------------------------------------------------------
|
|
@@ -163,7 +168,7 @@ export const definitions = [
|
|
|
163
168
|
properties: {
|
|
164
169
|
site: { type: "string" },
|
|
165
170
|
name: { type: "string" },
|
|
166
|
-
value: { description: "
|
|
171
|
+
value: { type: "object", description: "A map of top-level config keys to their new values (e.g. { \"slogan\": \"Information Technology\" }). Other keys in the object are preserved server-side." },
|
|
167
172
|
},
|
|
168
173
|
},
|
|
169
174
|
},
|