@carbonstopper/agent-mcp 0.1.7 → 0.1.9

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 CHANGED
@@ -151,9 +151,9 @@ Only product carbon modeling and report tools are exposed to the Agent in this r
151
151
  | --- | --- |
152
152
  | `modeling_execute` | Create a new product carbon AI model. Requires `idempotencyKey` and `input.content`. |
153
153
  | `modeling_re_modeling` | Re-run product carbon AI modeling for an existing account. Requires `accountId` and `idempotencyKey`. |
154
- | `modeling_update` | Supplement or update emission sources for an existing model. Requires `accountId` and `idempotencyKey`. |
154
+ | `modeling_update` | Supplement or update emission sources for an existing model. Requires `accountId`, `idempotencyKey`, and `input.content`. |
155
155
  | `modeling_detail` | Get product carbon model details. |
156
- | `report_generate` | Generate a product carbon report. Requires `idempotencyKey`. |
156
+ | `report_generate` | Generate a product carbon report. Requires `accountId` and `idempotencyKey`. |
157
157
  | `report_regenerate` | Regenerate an existing product carbon report. Requires `reportId` and `idempotencyKey`. |
158
158
  | `report_detail` | Get product carbon report detail and latest report URL. |
159
159
 
@@ -167,22 +167,103 @@ Use the product carbon modeling tools as follows:
167
167
 
168
168
  ## Tool Request Shape
169
169
 
170
- Most tools forward the unified Agent skill request:
170
+ The MCP schema only exposes fields the Agent should fill. Do not pass platform, trace, confirmation, or unrelated id fields unless they are listed for the selected tool.
171
+
172
+ ### `modeling_execute`
171
173
 
172
174
  ```json
173
175
  {
174
176
  "sessionId": "agent_xxx",
175
- "projectId": 1001,
176
- "accountId": 2001,
177
- "modelId": null,
178
- "reportId": null,
179
177
  "idempotencyKey": "agent_xxx_modeling_execute_v1",
180
- "confirmed": true,
181
- "pendingActionId": null,
182
- "input": {}
178
+ "input": {
179
+ "content": "500ml bottled mineral water",
180
+ "message": "Supplemental modeling context",
181
+ "scope": 1,
182
+ "scopeValue": "0,1,2",
183
+ "factorScope": 3
184
+ }
185
+ }
186
+ ```
187
+
188
+ ### `modeling_re_modeling`
189
+
190
+ ```json
191
+ {
192
+ "sessionId": "agent_xxx",
193
+ "accountId": 2001,
194
+ "idempotencyKey": "agent_xxx_modeling_re_modeling_v1",
195
+ "input": {
196
+ "content": "Updated product description",
197
+ "message": "Recalculate with updated packaging",
198
+ "scope": 1,
199
+ "scopeValue": "0,1,2",
200
+ "factorScope": 3
201
+ }
183
202
  }
184
203
  ```
185
204
 
205
+ ### `modeling_update`
206
+
207
+ ```json
208
+ {
209
+ "sessionId": "agent_xxx",
210
+ "accountId": 2001,
211
+ "idempotencyKey": "agent_xxx_modeling_update_v1",
212
+ "input": {
213
+ "content": "Add corrugated box packaging",
214
+ "message": "Supplemental emission source details"
215
+ }
216
+ }
217
+ ```
218
+
219
+ ### `modeling_detail`
220
+
221
+ ```json
222
+ {
223
+ "sessionId": "agent_xxx",
224
+ "accountId": 2001
225
+ }
226
+ ```
227
+
228
+ ### `report_generate`
229
+
230
+ ```json
231
+ {
232
+ "sessionId": "agent_xxx",
233
+ "accountId": 2001,
234
+ "idempotencyKey": "agent_xxx_report_generate_v1",
235
+ "input": {
236
+ "reportName": "Product carbon footprint report",
237
+ "standard": "ISO 14067",
238
+ "message": "Generate report for customer review"
239
+ }
240
+ }
241
+ ```
242
+
243
+ ### `report_regenerate`
244
+
245
+ ```json
246
+ {
247
+ "sessionId": "agent_xxx",
248
+ "reportId": 3001,
249
+ "idempotencyKey": "agent_xxx_report_regenerate_v1",
250
+ "input": {
251
+ "message": "Regenerate after model update"
252
+ }
253
+ }
254
+ ```
255
+
256
+ ### `report_detail`
257
+
258
+ ```json
259
+ {
260
+ "sessionId": "agent_xxx",
261
+ "reportId": 3001
262
+ }
263
+ ```
264
+
265
+ ID fields such as `accountId` and `reportId` accept either numbers or numeric strings. Safe numeric strings are normalized before forwarding to the Agent internal API; very large numeric strings are preserved to avoid JavaScript precision loss.
266
+
186
267
  Write or high-risk tools require `idempotencyKey`, especially:
187
268
 
188
269
  - `modeling_execute`
package/dist/tools.d.ts CHANGED
@@ -8,5 +8,5 @@ export interface ToolRoute {
8
8
  bodyKind: BodyKind;
9
9
  }
10
10
  export declare const toolRoutes: Record<string, ToolRoute>;
11
- export declare function buildBody(route: ToolRoute, args: Record<string, unknown>): Record<string, unknown>;
11
+ export declare function buildBody(route: ToolRoute, args: Record<string, unknown>): unknown;
12
12
  export declare function getSessionId(args: Record<string, unknown>): string;
package/dist/tools.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import * as apipath from "./apipath.js";
3
- const jsonObject = z.record(z.string(), z.unknown());
4
3
  const sessionId = z
5
4
  .string()
6
5
  .min(1)
@@ -9,100 +8,82 @@ const idempotencyKey = z
9
8
  .string()
10
9
  .min(1)
11
10
  .describe("Idempotency key for write or high-risk skills. Reuse the same key only for retrying the same action.");
12
- const traceFields = {
13
- messageId: z.string().optional().describe("Agent message id for grouping multiple skill nodes in one turn."),
14
- traceId: z.string().optional().describe("Agent trace id for runtime trace aggregation."),
15
- taskId: z.string().optional().describe("Agent task id, for example LangGraph run id."),
16
- };
17
- const commonSkillFields = {
18
- sessionId,
19
- projectId: z.number().optional().describe("Agent project id"),
20
- ...traceFields,
21
- accountId: z.number().optional().describe("Product carbon account id"),
22
- modelId: z.number().optional().describe("Reserved model id"),
23
- reportId: z.number().optional().describe("Report id"),
24
- idempotencyKey: z.string().optional().describe("Required for write or high-risk skills"),
25
- confirmed: z.boolean().optional().describe("Whether the user has confirmed a high-risk or high-cost action"),
26
- pendingActionId: z.string().optional().describe("Pending action id returned by a confirmation response"),
27
- };
28
- const modelingInput = z.object({
29
- content: z.string().optional().describe("Product description used for AI modeling. Required when creating a new model."),
30
- message: z.string().optional().describe("Supplemental modeling information from the user or Agent."),
31
- productName: z.string().optional().describe("Product name or short title."),
11
+ const longId = z
12
+ .union([
13
+ z.number().int().positive(),
14
+ z.string().regex(/^\d+$/, "Expected a numeric id string"),
15
+ ])
16
+ .describe("Numeric id. Accepts either a number or a numeric string.");
17
+ const modelingOptions = {
32
18
  scope: z.union([z.number(), z.string()]).optional().describe("Lifecycle scope. Common values: 0 for partial lifecycle, 1 for full lifecycle."),
33
19
  scopeValue: z.string().optional().describe("Lifecycle stage selection for partial lifecycle, for example 0,1,2."),
34
- factorScope: z.number().optional().describe("Factor preference. Common values: 1 Ecoinvent, 2 domestic factors, 3 any source."),
35
- userKeys: z.array(z.string()).optional().describe("User-selected custom factor keys."),
36
- signKeys: z.array(z.string()).optional().describe("Marked factor keys."),
37
- }).catchall(z.unknown());
38
- const modelingExecuteInput = modelingInput.extend({
20
+ factorScope: z.union([z.number(), z.string().regex(/^\d+$/, "Expected a numeric factorScope string")]).optional().describe("Factor preference. Common values: 1 Ecoinvent, 2 domestic factors, 3 any source."),
21
+ };
22
+ const modelingExecuteInput = z.object({
39
23
  content: z.string().min(1).describe("Required product description for creating a new product carbon model."),
40
24
  message: z.string().optional().describe("Supplemental information for new modeling, such as user preferences or Agent-collected context."),
25
+ ...modelingOptions,
41
26
  });
42
- const reModelingInput = modelingInput.extend({
27
+ const reModelingInput = z.object({
43
28
  content: z.string().optional().describe("Optional replacement or updated product description for re-modeling an existing account."),
44
29
  message: z.string().optional().describe("Supplemental re-modeling instruction, such as why the existing account should be recalculated."),
30
+ ...modelingOptions,
45
31
  });
46
32
  const modelUpdateInput = z.object({
47
- accountId: z.number().optional().describe("Product carbon account id. Top-level accountId is preferred."),
48
- content: z.string().optional().describe("Natural language instruction for supplementing emission sources, for example adding a material, energy, packaging, or transport source."),
33
+ content: z.string().min(1).describe("Required natural language instruction for supplementing emission sources, for example adding a material, energy, packaging, or transport source."),
49
34
  message: z.string().optional().describe("Supplemental emission source information from the user or Agent."),
50
- }).catchall(z.unknown());
35
+ });
51
36
  const reportGenerateInput = z.object({
52
- accountId: z.number().optional().describe("Product carbon account id. Top-level accountId is preferred."),
53
37
  reportName: z.string().optional().describe("Report name to generate."),
54
38
  standard: z.string().optional().describe("Report standard, for example ISO 14067."),
55
39
  message: z.string().optional().describe("Supplemental report generation instruction from the user or Agent."),
56
- }).catchall(z.unknown());
40
+ });
41
+ const reportRegenerateInput = z.object({
42
+ message: z.string().optional().describe("Supplemental report regeneration instruction from the user or Agent."),
43
+ });
57
44
  export const schemas = {
58
45
  modeling_execute: z.object({
59
- ...commonSkillFields,
46
+ sessionId,
60
47
  idempotencyKey,
61
48
  input: modelingExecuteInput.describe("Required new-model input. input.content is required; input.message can carry user or Agent supplemental information."),
62
49
  }),
63
50
  modeling_re_modeling: z.object({
64
- ...commonSkillFields,
65
- accountId: z.number().describe("Product carbon account id"),
51
+ sessionId,
52
+ accountId: longId.describe("Product carbon account id"),
66
53
  idempotencyKey,
67
54
  input: reModelingInput.describe("Optional re-modeling input. Use input.content for updated product description and input.message for recalculation instructions.").optional(),
68
55
  }),
69
56
  modeling_update: z.object({
70
- ...commonSkillFields,
71
- accountId: z.number().describe("Product carbon account id"),
57
+ sessionId,
58
+ accountId: longId.describe("Product carbon account id"),
72
59
  idempotencyKey,
73
60
  input: modelUpdateInput.describe("Emission source update input. Use input.content for the source change instruction and input.message for supplemental context."),
74
61
  }),
75
62
  modeling_detail: z.object({
76
63
  sessionId,
77
- projectId: z.number().optional(),
78
- ...traceFields,
79
- accountId: z.number().describe("Product carbon account id"),
80
- input: jsonObject.describe("Optional detail query context.").optional(),
64
+ accountId: longId.describe("Product carbon account id"),
81
65
  }),
82
66
  report_generate: z.object({
83
- ...commonSkillFields,
84
- accountId: z.number().describe("Product carbon account id"),
67
+ sessionId,
68
+ accountId: longId.describe("Product carbon account id"),
85
69
  idempotencyKey,
86
70
  input: reportGenerateInput.describe("Optional report generation input, such as reportName, standard, or message.").optional(),
87
71
  }),
88
72
  report_regenerate: z.object({
89
- ...commonSkillFields,
90
- reportId: z.number().describe("Existing report id to regenerate"),
73
+ sessionId,
74
+ reportId: longId.describe("Existing report id to regenerate"),
91
75
  idempotencyKey,
92
- input: reportGenerateInput.describe("Optional report regeneration input, such as reportName, standard, or message.").optional(),
76
+ input: reportRegenerateInput.describe("Optional report regeneration input, such as message.").optional(),
93
77
  }),
94
78
  report_detail: z.object({
95
79
  sessionId,
96
- projectId: z.number().optional(),
97
- ...traceFields,
98
- reportId: z.number().describe("Report id"),
99
- input: jsonObject.describe("Optional report detail query context.").optional(),
80
+ reportId: longId.describe("Report id"),
100
81
  }),
101
82
  };
102
83
  export const descriptions = {
103
84
  modeling_execute: "Create a new product carbon model from input.content. Use this only when the user wants a new model and no existing account should be reused. Calls /modeling/execute. Requires idempotencyKey and input.content.",
104
85
  modeling_re_modeling: "Re-model an existing product carbon account from updated context. Use this when the user wants to redo or recalculate the whole model for an existing account. Calls /modeling/reModeling. Requires accountId and idempotencyKey.",
105
- modeling_update: "Supplement emission sources on an existing product carbon account. Use this when the user wants to add or adjust materials, energy, packaging, transport, or other emission sources without recreating the whole model. Calls /modeling/update. Requires accountId and idempotencyKey.",
86
+ modeling_update: "Supplement emission sources on an existing product carbon account. Use this when the user wants to add or adjust materials, energy, packaging, transport, or other emission sources without recreating the whole model. Calls /modeling/update. Requires accountId, idempotencyKey, and input.content.",
106
87
  modeling_detail: "Get product carbon model details for an account.",
107
88
  report_generate: "Create a new product carbon report from an account. Requires accountId and idempotencyKey.",
108
89
  report_regenerate: "Regenerate an existing product carbon report. Requires reportId and idempotencyKey.",
@@ -149,7 +130,35 @@ export function buildBody(route, args) {
149
130
  if (route.bodyKind === "sessionContext") {
150
131
  return { sessionId: args.sessionId };
151
132
  }
152
- return args;
133
+ return normalizeIds(args);
134
+ }
135
+ function normalizeIds(value) {
136
+ if (Array.isArray(value)) {
137
+ return value.map(normalizeIds);
138
+ }
139
+ if (!value || typeof value !== "object") {
140
+ return value;
141
+ }
142
+ const normalized = {};
143
+ for (const [key, childValue] of Object.entries(value)) {
144
+ if (isIdField(key) && typeof childValue === "string" && /^\d+$/.test(childValue)) {
145
+ normalized[key] = normalizeNumericId(childValue);
146
+ }
147
+ else if (key === "factorScope" && typeof childValue === "string" && /^\d+$/.test(childValue)) {
148
+ normalized[key] = Number(childValue);
149
+ }
150
+ else {
151
+ normalized[key] = normalizeIds(childValue);
152
+ }
153
+ }
154
+ return normalized;
155
+ }
156
+ function isIdField(key) {
157
+ return key === "projectId" || key === "accountId" || key === "modelId" || key === "reportId";
158
+ }
159
+ function normalizeNumericId(value) {
160
+ const numericValue = Number(value);
161
+ return Number.isSafeInteger(numericValue) ? numericValue : value;
153
162
  }
154
163
  export function getSessionId(args) {
155
164
  const value = args.sessionId;
package/dist/tools.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAExC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAErD,MAAM,SAAS,GAAG,CAAC;KAChB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,CAAC,sGAAsG,CAAC,CAAC;AAEpH,MAAM,cAAc,GAAG,CAAC;KACrB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,QAAQ,CAAC,sGAAsG,CAAC,CAAC;AAEpH,MAAM,WAAW,GAAG;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iEAAiE,CAAC;IAC5G,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IACxF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;CACvF,CAAC;AAEF,MAAM,iBAAiB,GAAG;IACxB,SAAS;IACT,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QA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;YACN,UAAU,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,OAAO,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,UAAU,CAAC;AAC/F,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAa;IACvC,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAA6B;IACxD,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
package/dist/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export declare function getBaseURL(): string;
2
- export declare const Version = "0.1.7";
2
+ export declare const Version = "0.1.9";
3
3
  export declare const Commit = "none";
4
4
  export declare const BuildTime = "unknown";
package/dist/version.js CHANGED
@@ -13,7 +13,7 @@ export function getBaseURL() {
13
13
  return "";
14
14
  }
15
15
  }
16
- export const Version = "0.1.7";
16
+ export const Version = "0.1.9";
17
17
  export const Commit = "none";
18
18
  export const BuildTime = "unknown";
19
19
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonstopper/agent-mcp",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "MCP server for Carbonstop Agent internal skill APIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",