mc8yp 2.2.1 → 2.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/dist/cli.mjs +14 -7
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -41,7 +41,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region package.json
|
|
43
43
|
var name = "mc8yp";
|
|
44
|
-
var version = "2.2.
|
|
44
|
+
var version = "2.2.2";
|
|
45
45
|
var description = "Cumulocity IoT MCP Server - Model Context Protocol integration for IoT device management";
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region \0virtual:core-openapi
|
|
@@ -93139,8 +93139,9 @@ You have exactly two MCP tools available.
|
|
|
93139
93139
|
## query
|
|
93140
93140
|
Use \`query\` when you need to inspect the bundled OpenAPI specs.
|
|
93141
93141
|
|
|
93142
|
-
- Input: a JavaScript function expression
|
|
93143
|
-
-
|
|
93142
|
+
- Input: a **zero-parameter** JavaScript function expression
|
|
93143
|
+
- Do NOT declare \`coreSpec\`, \`dtmSpec\`, or \`specsEnabled\` as function parameters — they are already declared as top-level constants in the surrounding scope. Writing \`(dtmSpec) => ...\` would shadow the global with an undefined parameter and produce incorrect results
|
|
93144
|
+
- The top-level bindings \`coreSpec\`, \`dtmSpec\`, and \`specsEnabled\` are available automatically inside the function body
|
|
93144
93145
|
- \`coreSpec\` is for the main Cumulocity REST surface such as inventory, alarms, events, measurements, identity, device control, users, tenants, audit, and the broader platform APIs
|
|
93145
93146
|
- \`dtmSpec\` is for Digital Twin Manager work such as schema definitions, asset models, linked series, and DTM asset or definition APIs
|
|
93146
93147
|
- Return the exact value you want back from that function
|
|
@@ -93150,6 +93151,9 @@ Use \`query\` when you need to inspect the bundled OpenAPI specs.
|
|
|
93150
93151
|
- The current MCP connection may still block \`execute\` requests through deny rules and/or an allow list even when an operation exists in a visible spec
|
|
93151
93152
|
|
|
93152
93153
|
### Available Shape
|
|
93154
|
+
|
|
93155
|
+
The function must accept **no parameters**. The bindings below are scope-level constants, not function arguments.
|
|
93156
|
+
|
|
93153
93157
|
\`\`\`ts
|
|
93154
93158
|
type OperationInfo = {
|
|
93155
93159
|
summary?: string
|
|
@@ -93186,7 +93190,7 @@ declare const dtmSpec: DtmSpec
|
|
|
93186
93190
|
declare const specsEnabled: SpecsEnabled
|
|
93187
93191
|
\`\`\`
|
|
93188
93192
|
|
|
93189
|
-
Examples:
|
|
93193
|
+
Examples (all zero-parameter — note no arguments in the arrow function signatures):
|
|
93190
93194
|
\`\`\`js
|
|
93191
93195
|
() => specsEnabled
|
|
93192
93196
|
\`\`\`
|
|
@@ -93197,6 +93201,7 @@ Examples:
|
|
|
93197
93201
|
|
|
93198
93202
|
\`\`\`js
|
|
93199
93203
|
() => {
|
|
93204
|
+
// dtmSpec is already in scope — do NOT write (dtmSpec) => { ... }
|
|
93200
93205
|
const op = dtmSpec.paths['/assets']?.get
|
|
93201
93206
|
return op?.parameters
|
|
93202
93207
|
}
|
|
@@ -150867,7 +150872,9 @@ declare const coreSpec: CoreSpec
|
|
|
150867
150872
|
declare const dtmSpec: DtmSpec
|
|
150868
150873
|
declare const specsEnabled: SpecsEnabled
|
|
150869
150874
|
|
|
150870
|
-
Your code must evaluate to a function.
|
|
150875
|
+
Your code must evaluate to a **zero-parameter** function — do NOT declare \`coreSpec\`, \`dtmSpec\`, or \`specsEnabled\` as function parameters. These are already declared as constants in the surrounding scope and are available inside the function body without any argument passing. Writing \`(dtmSpec) => ...\` would shadow the global binding with an undefined parameter and produce incorrect results.
|
|
150876
|
+
|
|
150877
|
+
The top-level bindings \
|
|
150871
150878
|
|
|
150872
150879
|
a) \`coreSpec\` — use this for the main Cumulocity REST APIs such as inventory, alarms, events, measurements, identity, device control, users, tenants, audit, and the broader platform REST surface
|
|
150873
150880
|
\nb) \`dtmSpec\` — use this for Digital Twin Manager work such as schema definitions, asset models, linked series, and DTM asset or definition APIs
|
|
@@ -150875,7 +150882,7 @@ a) \`coreSpec\` — use this for the main Cumulocity REST APIs such as inventory
|
|
|
150875
150882
|
|
|
150876
150883
|
are available automatically. The sandbox assigns your function to a local variable, invokes it, and returns its result.
|
|
150877
150884
|
|
|
150878
|
-
Recommended shapes:
|
|
150885
|
+
Recommended shapes (zero parameters — bindings come from scope, not arguments):
|
|
150879
150886
|
\`(() => { ... })\`
|
|
150880
150887
|
\`async () => { ... }\`
|
|
150881
150888
|
|
|
@@ -150910,7 +150917,7 @@ Examples:
|
|
|
150910
150917
|
return { summary: op?.summary, parameters: op?.parameters, responses: op?.responses }
|
|
150911
150918
|
}
|
|
150912
150919
|
`,
|
|
150913
|
-
schema: v.object({ code: createCodeSchema("A JavaScript function expression.
|
|
150920
|
+
schema: v.object({ code: createCodeSchema("A zero-parameter JavaScript function expression. Do NOT declare `coreSpec`, `dtmSpec`, or `specsEnabled` as function parameters — they are already declared as top-level constants in the surrounding scope and are available in the function body automatically. Writing `(dtmSpec) => ...` would shadow the global binding with an undefined parameter and produce incorrect results. Return the final result from that function. Async functions are supported.") })
|
|
150914
150921
|
}, async (input) => {
|
|
150915
150922
|
try {
|
|
150916
150923
|
return tool.text(await query(input.code, server.ctx.custom?.restrictions ?? [], server.ctx.custom?.allowRules ?? [], server.ctx.custom?.disabledApis ?? []));
|