@roarkanalytics/sdk-mcp 2.24.0 → 2.26.0

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.
Files changed (50) hide show
  1. package/code-tool-paths.cjs +6 -0
  2. package/code-tool-paths.cjs.map +1 -0
  3. package/code-tool-paths.d.cts +2 -0
  4. package/code-tool-paths.d.cts.map +1 -0
  5. package/code-tool-types.d.mts.map +1 -1
  6. package/code-tool-types.d.ts.map +1 -1
  7. package/code-tool-worker.d.mts +5 -0
  8. package/code-tool-worker.d.mts.map +1 -0
  9. package/code-tool-worker.d.ts +5 -0
  10. package/code-tool-worker.d.ts.map +1 -0
  11. package/code-tool-worker.js +277 -0
  12. package/code-tool-worker.js.map +1 -0
  13. package/code-tool-worker.mjs +272 -0
  14. package/code-tool-worker.mjs.map +1 -0
  15. package/code-tool.d.mts +8 -2
  16. package/code-tool.d.mts.map +1 -1
  17. package/code-tool.d.ts +8 -2
  18. package/code-tool.d.ts.map +1 -1
  19. package/code-tool.js +240 -35
  20. package/code-tool.js.map +1 -1
  21. package/code-tool.mjs +204 -35
  22. package/code-tool.mjs.map +1 -1
  23. package/methods.d.mts.map +1 -1
  24. package/methods.d.ts.map +1 -1
  25. package/methods.js +54 -0
  26. package/methods.js.map +1 -1
  27. package/methods.mjs +54 -0
  28. package/methods.mjs.map +1 -1
  29. package/options.d.mts +2 -0
  30. package/options.d.mts.map +1 -1
  31. package/options.d.ts +2 -0
  32. package/options.d.ts.map +1 -1
  33. package/options.js +8 -0
  34. package/options.js.map +1 -1
  35. package/options.mjs +8 -0
  36. package/options.mjs.map +1 -1
  37. package/package.json +18 -2
  38. package/server.d.mts.map +1 -1
  39. package/server.d.ts.map +1 -1
  40. package/server.js +2 -1
  41. package/server.js.map +1 -1
  42. package/server.mjs +2 -1
  43. package/server.mjs.map +1 -1
  44. package/src/code-tool-paths.cts +3 -0
  45. package/src/code-tool-types.ts +1 -0
  46. package/src/code-tool-worker.ts +323 -0
  47. package/src/code-tool.ts +265 -47
  48. package/src/methods.ts +54 -0
  49. package/src/options.ts +12 -0
  50. package/src/server.ts +2 -1
package/src/methods.ts CHANGED
@@ -58,12 +58,66 @@ export const sdkMethods: SdkMethod[] = [
58
58
  httpMethod: 'get',
59
59
  httpPath: '/v1/call/{callId}/sentiment-run',
60
60
  },
61
+ {
62
+ clientCallName: 'client.metric.createDefinition',
63
+ fullyQualifiedName: 'metric.createDefinition',
64
+ httpMethod: 'post',
65
+ httpPath: '/v1/metric/definitions',
66
+ },
61
67
  {
62
68
  clientCallName: 'client.metric.listDefinitions',
63
69
  fullyQualifiedName: 'metric.listDefinitions',
64
70
  httpMethod: 'get',
65
71
  httpPath: '/v1/metric/definitions',
66
72
  },
73
+ {
74
+ clientCallName: 'client.metricPolicy.create',
75
+ fullyQualifiedName: 'metricPolicy.create',
76
+ httpMethod: 'post',
77
+ httpPath: '/v1/metric/policies',
78
+ },
79
+ {
80
+ clientCallName: 'client.metricPolicy.update',
81
+ fullyQualifiedName: 'metricPolicy.update',
82
+ httpMethod: 'put',
83
+ httpPath: '/v1/metric/policies/{policyId}',
84
+ },
85
+ {
86
+ clientCallName: 'client.metricPolicy.list',
87
+ fullyQualifiedName: 'metricPolicy.list',
88
+ httpMethod: 'get',
89
+ httpPath: '/v1/metric/policies',
90
+ },
91
+ {
92
+ clientCallName: 'client.metricPolicy.delete',
93
+ fullyQualifiedName: 'metricPolicy.delete',
94
+ httpMethod: 'delete',
95
+ httpPath: '/v1/metric/policies/{policyId}',
96
+ },
97
+ {
98
+ clientCallName: 'client.metricPolicy.getByID',
99
+ fullyQualifiedName: 'metricPolicy.getByID',
100
+ httpMethod: 'get',
101
+ httpPath: '/v1/metric/policies/{policyId}',
102
+ },
103
+ {
104
+ clientCallName: 'client.metricCollectionJob.create',
105
+ fullyQualifiedName: 'metricCollectionJob.create',
106
+ httpMethod: 'post',
107
+ httpPath: '/v1/metric/collection-jobs',
108
+ },
109
+ {
110
+ clientCallName: 'client.metricCollectionJob.list',
111
+ fullyQualifiedName: 'metricCollectionJob.list',
112
+ httpMethod: 'get',
113
+ httpPath: '/v1/metric/collection-jobs',
114
+ },
115
+ {
116
+ clientCallName: 'client.metricCollectionJob.getByID',
117
+ fullyQualifiedName: 'metricCollectionJob.getByID',
118
+ httpMethod: 'get',
119
+ httpPath: '/v1/metric/collection-jobs/{jobId}',
120
+ },
67
121
  {
68
122
  clientCallName: 'client.simulationJob.getByID',
69
123
  fullyQualifiedName: 'simulationJob.getByID',
package/src/options.ts CHANGED
@@ -19,8 +19,11 @@ export type McpOptions = {
19
19
  codeAllowHttpGets?: boolean | undefined;
20
20
  codeAllowedMethods?: string[] | undefined;
21
21
  codeBlockedMethods?: string[] | undefined;
22
+ codeExecutionMode: McpCodeExecutionMode;
22
23
  };
23
24
 
25
+ export type McpCodeExecutionMode = 'stainless-sandbox' | 'local';
26
+
24
27
  export function parseCLIOptions(): CLIOptions {
25
28
  const opts = yargs(hideBin(process.argv))
26
29
  .option('code-allow-http-gets', {
@@ -40,6 +43,13 @@ export function parseCLIOptions(): CLIOptions {
40
43
  description:
41
44
  'Methods to explicitly block for code tool. Evaluated as regular expressions against method fully qualified names. If all code-allow-* flags are unset, then everything is allowed.',
42
45
  })
46
+ .option('code-execution-mode', {
47
+ type: 'string',
48
+ choices: ['stainless-sandbox', 'local'],
49
+ default: 'stainless-sandbox',
50
+ description:
51
+ "Where to run code execution in code tool; 'stainless-sandbox' will execute code in Stainless-hosted sandboxes whereas 'local' will execute code locally on the MCP server machine.",
52
+ })
43
53
  .option('debug', { type: 'boolean', description: 'Enable debug logging' })
44
54
  .option('no-tools', {
45
55
  type: 'string',
@@ -93,6 +103,7 @@ export function parseCLIOptions(): CLIOptions {
93
103
  codeAllowHttpGets: argv.codeAllowHttpGets,
94
104
  codeAllowedMethods: argv.codeAllowedMethods,
95
105
  codeBlockedMethods: argv.codeBlockedMethods,
106
+ codeExecutionMode: argv.codeExecutionMode as McpCodeExecutionMode,
96
107
  transport,
97
108
  port: argv.port,
98
109
  socket: argv.socket,
@@ -124,6 +135,7 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M
124
135
  : defaultOptions.includeDocsTools;
125
136
 
126
137
  return {
138
+ codeExecutionMode: defaultOptions.codeExecutionMode,
127
139
  ...(docsTools !== undefined && { includeDocsTools: docsTools }),
128
140
  };
129
141
  }
package/src/server.ts CHANGED
@@ -20,7 +20,7 @@ export const newMcpServer = async (stainlessApiKey: string | undefined) =>
20
20
  new McpServer(
21
21
  {
22
22
  name: 'roarkanalytics_sdk_api',
23
- version: '2.24.0',
23
+ version: '2.26.0',
24
24
  },
25
25
  {
26
26
  instructions: await getInstructions(stainlessApiKey),
@@ -159,6 +159,7 @@ export function selectTools(options?: McpOptions): McpTool[] {
159
159
  const includedTools = [
160
160
  codeTool({
161
161
  blockedMethods: blockedMethodsForCodeTool(options),
162
+ codeExecutionMode: options?.codeExecutionMode ?? 'stainless-sandbox',
162
163
  }),
163
164
  ];
164
165
  if (options?.includeDocsTools ?? true) {