@steuerboard/mcp 0.0.1 → 0.0.7
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 +18 -23
- package/bin/mcp-server.js +362 -173
- package/bin/mcp-server.js.map +23 -19
- package/esm/src/cloudflare-worker/cloudflare-worker.d.ts +1 -1
- package/esm/src/cloudflare-worker/cloudflare-worker.d.ts.map +1 -1
- package/esm/src/cloudflare-worker/cloudflare-worker.js +8 -5
- package/esm/src/cloudflare-worker/cloudflare-worker.js.map +1 -1
- package/esm/src/cloudflare-worker/landing-page.d.ts +1 -1
- package/esm/src/cloudflare-worker/landing-page.d.ts.map +1 -1
- package/esm/src/cloudflare-worker/landing-page.js +9 -9
- package/esm/src/cloudflare-worker/landing-page.js.map +1 -1
- package/esm/src/funcs/adminClientsCreateClient.d.ts +17 -0
- package/esm/src/funcs/adminClientsCreateClient.d.ts.map +1 -0
- package/esm/src/funcs/adminClientsCreateClient.js +91 -0
- package/esm/src/funcs/adminClientsCreateClient.js.map +1 -0
- package/esm/src/funcs/adminClientsListClients.d.ts.map +1 -1
- package/esm/src/funcs/adminClientsListClients.js +23 -15
- package/esm/src/funcs/adminClientsListClients.js.map +1 -1
- package/esm/src/funcs/filesListFiles.d.ts.map +1 -1
- package/esm/src/funcs/filesListFiles.js +18 -10
- package/esm/src/funcs/filesListFiles.js.map +1 -1
- package/esm/src/funcs/healthCheckGetV1Ping.d.ts +1 -1
- package/esm/src/funcs/healthCheckGetV1Ping.d.ts.map +1 -1
- package/esm/src/funcs/healthCheckGetV1Ping.js +3 -7
- package/esm/src/funcs/healthCheckGetV1Ping.js.map +1 -1
- package/esm/src/funcs/tasksListTasks.d.ts.map +1 -1
- package/esm/src/funcs/tasksListTasks.js +17 -10
- package/esm/src/funcs/tasksListTasks.js.map +1 -1
- package/esm/src/funcs/workspacesListWorkspaces.d.ts.map +1 -1
- package/esm/src/funcs/workspacesListWorkspaces.js +17 -9
- package/esm/src/funcs/workspacesListWorkspaces.js.map +1 -1
- package/esm/src/lib/config.d.ts +3 -3
- package/esm/src/lib/config.d.ts.map +1 -1
- package/esm/src/lib/config.js +3 -3
- package/esm/src/lib/config.js.map +1 -1
- package/esm/src/mcp-server/mcp-server.js +1 -1
- package/esm/src/mcp-server/server.d.ts.map +1 -1
- package/esm/src/mcp-server/server.js +3 -1
- package/esm/src/mcp-server/server.js.map +1 -1
- package/esm/src/mcp-server/tools/adminClientsCreateClient.d.ts +7 -0
- package/esm/src/mcp-server/tools/adminClientsCreateClient.d.ts.map +1 -0
- package/esm/src/mcp-server/tools/adminClientsCreateClient.js +28 -0
- package/esm/src/mcp-server/tools/adminClientsCreateClient.js.map +1 -0
- package/esm/src/mcp-server/tools/adminClientsListClients.d.ts.map +1 -1
- package/esm/src/mcp-server/tools/adminClientsListClients.js +1 -2
- package/esm/src/mcp-server/tools/adminClientsListClients.js.map +1 -1
- package/esm/src/mcp-server/tools/healthCheckGetV1Ping.js +1 -1
- package/esm/src/mcp-server/tools/healthCheckGetV1Ping.js.map +1 -1
- package/esm/src/mcp-server/tools.d.ts.map +1 -1
- package/esm/src/mcp-server/tools.js +10 -11
- package/esm/src/mcp-server/tools.js.map +1 -1
- package/esm/src/models/client.d.ts +4 -4
- package/esm/src/models/client.d.ts.map +1 -1
- package/esm/src/models/client.js +4 -4
- package/esm/src/models/client.js.map +1 -1
- package/esm/src/models/clientcreate.d.ts +25 -0
- package/esm/src/models/clientcreate.d.ts.map +1 -0
- package/esm/src/models/clientcreate.js +27 -0
- package/esm/src/models/clientcreate.js.map +1 -0
- package/esm/src/models/createclientop.d.ts +40 -0
- package/esm/src/models/createclientop.d.ts.map +1 -0
- package/esm/src/models/createclientop.js +37 -0
- package/esm/src/models/createclientop.js.map +1 -0
- package/esm/src/models/getv1meop.d.ts +2 -1
- package/esm/src/models/getv1meop.d.ts.map +1 -1
- package/esm/src/models/getv1meop.js +2 -1
- package/esm/src/models/getv1meop.js.map +1 -1
- package/esm/src/models/listclientsop.d.ts +1 -1
- package/esm/src/models/listclientsop.d.ts.map +1 -1
- package/esm/src/models/listclientsop.js +2 -2
- package/esm/src/models/listclientsop.js.map +1 -1
- package/esm/src/models/listtasksop.d.ts +0 -1
- package/esm/src/models/listtasksop.d.ts.map +1 -1
- package/esm/src/models/listtasksop.js +0 -1
- package/esm/src/models/listtasksop.js.map +1 -1
- package/manifest.json +10 -6
- package/package.json +7 -6
- package/src/cloudflare-worker/cloudflare-worker.ts +12 -9
- package/src/cloudflare-worker/landing-page.ts +9 -9
- package/src/funcs/adminClientsCreateClient.ts +171 -0
- package/src/funcs/adminClientsListClients.ts +137 -131
- package/src/funcs/filesListFiles.ts +136 -130
- package/src/funcs/healthCheckGetV1Ping.ts +3 -7
- package/src/funcs/tasksListTasks.ts +129 -124
- package/src/funcs/workspacesListWorkspaces.ts +135 -129
- package/src/lib/config.ts +4 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/adminClientsCreateClient.ts +37 -0
- package/src/mcp-server/tools/adminClientsListClients.ts +22 -24
- package/src/mcp-server/tools/healthCheckGetV1Ping.ts +1 -1
- package/src/mcp-server/tools.ts +96 -98
- package/src/models/client.ts +8 -6
- package/src/models/clientcreate.ts +56 -0
- package/src/models/createclientop.ts +112 -0
- package/src/models/getv1meop.ts +4 -2
- package/src/models/listclientsop.ts +4 -2
- package/src/models/listtasksop.ts +0 -2
- package/worker-configuration.d.ts +7024 -6203
|
@@ -12,18 +12,18 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
ListTasksRequest,
|
|
24
|
+
ListTasksRequest$zodSchema,
|
|
25
|
+
ListTasksResponse,
|
|
26
|
+
ListTasksResponse$zodSchema,
|
|
27
27
|
} from "../models/listtasksop.js";
|
|
28
28
|
import { APICall, APIPromise } from "../types/async.js";
|
|
29
29
|
import { Result } from "../types/fp.js";
|
|
@@ -35,132 +35,137 @@ import { Result } from "../types/fp.js";
|
|
|
35
35
|
* Returns a paginated list of tasks. Optionally you can filter by client or workspace.
|
|
36
36
|
*/
|
|
37
37
|
export function tasksListTasks(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
client$: SteuerboardCore,
|
|
39
|
+
request?: ListTasksRequest | undefined,
|
|
40
|
+
options?: RequestOptions,
|
|
41
41
|
): APIPromise<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
Result<
|
|
43
|
+
ListTasksResponse,
|
|
44
|
+
| APIError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
>
|
|
52
52
|
> {
|
|
53
|
-
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client$,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
async function $do(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
client$: SteuerboardCore,
|
|
62
|
+
request?: ListTasksRequest | undefined,
|
|
63
|
+
options?: RequestOptions,
|
|
60
64
|
): Promise<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
ListTasksResponse,
|
|
68
|
+
| APIError
|
|
69
|
+
| SDKValidationError
|
|
70
|
+
| UnexpectedClientError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| ConnectionError
|
|
75
|
+
>,
|
|
76
|
+
APICall,
|
|
77
|
+
]
|
|
74
78
|
> {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
});
|
|
79
|
+
const parsed$ = safeParse(
|
|
80
|
+
request,
|
|
81
|
+
(value$) => ListTasksRequest$zodSchema.optional().parse(value$),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed$.ok) {
|
|
85
|
+
return [parsed$, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload$ = parsed$.value;
|
|
88
|
+
const body$ = null;
|
|
89
|
+
const path$ = pathToFunc("/v1/tasks")();
|
|
90
|
+
const query$ = encodeFormQuery({
|
|
91
|
+
"cursor": payload$?.cursor,
|
|
92
|
+
"limit": payload$?.limit,
|
|
93
|
+
"workspaceId": payload$?.workspaceId,
|
|
94
|
+
});
|
|
92
95
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const securityInput = await extractSecurity(client$._options.security);
|
|
99
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
96
|
+
const headers$ = new Headers(compactMap({
|
|
97
|
+
Accept: "application/json",
|
|
98
|
+
}));
|
|
99
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
100
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
const context = {
|
|
103
|
+
options: client$._options,
|
|
104
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
105
|
+
operationID: "listTasks",
|
|
106
|
+
oAuth2Scopes: [],
|
|
107
|
+
resolvedSecurity: requestSecurity,
|
|
108
|
+
securitySource: client$._options.security,
|
|
109
|
+
retryConfig: options?.retries
|
|
110
|
+
|| client$._options.retryConfig
|
|
111
|
+
|| { strategy: "none" },
|
|
112
|
+
retryCodes: options?.retryCodes || [
|
|
113
|
+
"429",
|
|
114
|
+
"500",
|
|
115
|
+
"502",
|
|
116
|
+
"503",
|
|
117
|
+
"504",
|
|
118
|
+
],
|
|
119
|
+
};
|
|
112
120
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return [requestRes, { status: "invalid" }];
|
|
130
|
-
}
|
|
131
|
-
const req$ = requestRes.value;
|
|
121
|
+
const requestRes = client$._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "GET",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path$,
|
|
126
|
+
headers: headers$,
|
|
127
|
+
query: query$,
|
|
128
|
+
body: body$,
|
|
129
|
+
userAgent: client$._options.userAgent,
|
|
130
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
131
|
+
|| -1,
|
|
132
|
+
}, options);
|
|
133
|
+
if (!requestRes.ok) {
|
|
134
|
+
return [requestRes, { status: "invalid" }];
|
|
135
|
+
}
|
|
136
|
+
const req$ = requestRes.value;
|
|
132
137
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
const doResult = await client$._do(req$, {
|
|
139
|
+
context,
|
|
140
|
+
errorCodes: [],
|
|
141
|
+
retryConfig: context.retryConfig,
|
|
142
|
+
retryCodes: context.retryCodes,
|
|
143
|
+
});
|
|
144
|
+
if (!doResult.ok) {
|
|
145
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
146
|
+
}
|
|
147
|
+
const response = doResult.value;
|
|
148
|
+
const responseFields$ = {
|
|
149
|
+
HttpMeta: { Response: response, Request: req$ },
|
|
150
|
+
};
|
|
146
151
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
152
|
+
const [result$] = await M.match<
|
|
153
|
+
ListTasksResponse,
|
|
154
|
+
| APIError
|
|
155
|
+
| SDKValidationError
|
|
156
|
+
| UnexpectedClientError
|
|
157
|
+
| InvalidRequestError
|
|
158
|
+
| RequestAbortedError
|
|
159
|
+
| RequestTimeoutError
|
|
160
|
+
| ConnectionError
|
|
161
|
+
>(
|
|
162
|
+
M.json(200, ListTasksResponse$zodSchema, {
|
|
163
|
+
key: "200_application/json_object",
|
|
164
|
+
}),
|
|
165
|
+
M.json(422, ListTasksResponse$zodSchema, {
|
|
166
|
+
key: "422_application/json_object",
|
|
167
|
+
}),
|
|
168
|
+
)(response, req$, { extraFields: responseFields$ });
|
|
164
169
|
|
|
165
|
-
|
|
170
|
+
return [result$, { status: "complete", request: req$, response }];
|
|
166
171
|
}
|
|
@@ -12,18 +12,18 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
13
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
ListWorkspacesRequest,
|
|
24
|
+
ListWorkspacesRequest$zodSchema,
|
|
25
|
+
ListWorkspacesResponse,
|
|
26
|
+
ListWorkspacesResponse$zodSchema,
|
|
27
27
|
} from "../models/listworkspacesop.js";
|
|
28
28
|
import { APICall, APIPromise } from "../types/async.js";
|
|
29
29
|
import { Result } from "../types/fp.js";
|
|
@@ -35,137 +35,143 @@ import { Result } from "../types/fp.js";
|
|
|
35
35
|
* Returns a paginated list of workspaces.
|
|
36
36
|
*/
|
|
37
37
|
export function workspacesListWorkspaces(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
client$: SteuerboardCore,
|
|
39
|
+
request: ListWorkspacesRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
41
|
): APIPromise<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
Result<
|
|
43
|
+
ListWorkspacesResponse,
|
|
44
|
+
| APIError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
>
|
|
52
52
|
> {
|
|
53
|
-
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client$,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
async function $do(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
client$: SteuerboardCore,
|
|
62
|
+
request: ListWorkspacesRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
60
64
|
): Promise<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
ListWorkspacesResponse,
|
|
68
|
+
| APIError
|
|
69
|
+
| SDKValidationError
|
|
70
|
+
| UnexpectedClientError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| ConnectionError
|
|
75
|
+
>,
|
|
76
|
+
APICall,
|
|
77
|
+
]
|
|
74
78
|
> {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
const parsed$ = safeParse(
|
|
80
|
+
request,
|
|
81
|
+
(value$) => ListWorkspacesRequest$zodSchema.parse(value$),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed$.ok) {
|
|
85
|
+
return [parsed$, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload$ = parsed$.value;
|
|
88
|
+
const body$ = null;
|
|
89
|
+
const path$ = pathToFunc("/v1/workspaces")();
|
|
90
|
+
const query$ = encodeFormQuery({
|
|
91
|
+
"cursor": payload$.cursor,
|
|
92
|
+
"limit": payload$.limit,
|
|
93
|
+
});
|
|
90
94
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const securityInput = await extractSecurity(client$._options.security);
|
|
101
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
95
|
+
const headers$ = new Headers(compactMap({
|
|
96
|
+
Accept: "application/json",
|
|
97
|
+
"x-client-id": encodeSimple("x-client-id", payload$.xClientId, {
|
|
98
|
+
explode: false,
|
|
99
|
+
charEncoding: "none",
|
|
100
|
+
}),
|
|
101
|
+
}));
|
|
102
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
103
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
const context = {
|
|
106
|
+
options: client$._options,
|
|
107
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
108
|
+
operationID: "listWorkspaces",
|
|
109
|
+
oAuth2Scopes: [],
|
|
110
|
+
resolvedSecurity: requestSecurity,
|
|
111
|
+
securitySource: client$._options.security,
|
|
112
|
+
retryConfig: options?.retries
|
|
113
|
+
|| client$._options.retryConfig
|
|
114
|
+
|| { strategy: "none" },
|
|
115
|
+
retryCodes: options?.retryCodes || [
|
|
116
|
+
"429",
|
|
117
|
+
"500",
|
|
118
|
+
"502",
|
|
119
|
+
"503",
|
|
120
|
+
"504",
|
|
121
|
+
],
|
|
122
|
+
};
|
|
114
123
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return [requestRes, { status: "invalid" }];
|
|
132
|
-
}
|
|
133
|
-
const req$ = requestRes.value;
|
|
124
|
+
const requestRes = client$._createRequest(context, {
|
|
125
|
+
security: requestSecurity,
|
|
126
|
+
method: "GET",
|
|
127
|
+
baseURL: options?.serverURL,
|
|
128
|
+
path: path$,
|
|
129
|
+
headers: headers$,
|
|
130
|
+
query: query$,
|
|
131
|
+
body: body$,
|
|
132
|
+
userAgent: client$._options.userAgent,
|
|
133
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
134
|
+
|| -1,
|
|
135
|
+
}, options);
|
|
136
|
+
if (!requestRes.ok) {
|
|
137
|
+
return [requestRes, { status: "invalid" }];
|
|
138
|
+
}
|
|
139
|
+
const req$ = requestRes.value;
|
|
134
140
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
const doResult = await client$._do(req$, {
|
|
142
|
+
context,
|
|
143
|
+
errorCodes: [],
|
|
144
|
+
retryConfig: context.retryConfig,
|
|
145
|
+
retryCodes: context.retryCodes,
|
|
146
|
+
});
|
|
147
|
+
if (!doResult.ok) {
|
|
148
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
149
|
+
}
|
|
150
|
+
const response = doResult.value;
|
|
151
|
+
const responseFields$ = {
|
|
152
|
+
HttpMeta: { Response: response, Request: req$ },
|
|
153
|
+
};
|
|
148
154
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
155
|
+
const [result$] = await M.match<
|
|
156
|
+
ListWorkspacesResponse,
|
|
157
|
+
| APIError
|
|
158
|
+
| SDKValidationError
|
|
159
|
+
| UnexpectedClientError
|
|
160
|
+
| InvalidRequestError
|
|
161
|
+
| RequestAbortedError
|
|
162
|
+
| RequestTimeoutError
|
|
163
|
+
| ConnectionError
|
|
164
|
+
>(
|
|
165
|
+
M.json(200, ListWorkspacesResponse$zodSchema, {
|
|
166
|
+
key: "200_application/json_object",
|
|
167
|
+
}),
|
|
168
|
+
M.json(422, ListWorkspacesResponse$zodSchema, {
|
|
169
|
+
key: "422_application/json_object",
|
|
170
|
+
}),
|
|
171
|
+
M.json(429, ListWorkspacesResponse$zodSchema, {
|
|
172
|
+
key: "429_application/json_object",
|
|
173
|
+
}),
|
|
174
|
+
)(response, req$, { extraFields: responseFields$ });
|
|
169
175
|
|
|
170
|
-
|
|
176
|
+
return [result$, { status: "complete", request: req$, response }];
|
|
171
177
|
}
|
package/src/lib/config.ts
CHANGED
|
@@ -62,7 +62,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
62
62
|
export const SDK_METADATA = {
|
|
63
63
|
language: "typescript",
|
|
64
64
|
openapiDocVersion: "0.1.0",
|
|
65
|
-
sdkVersion: "0.0.
|
|
66
|
-
genVersion: "2.
|
|
67
|
-
userAgent:
|
|
65
|
+
sdkVersion: "0.0.7",
|
|
66
|
+
genVersion: "2.701.8",
|
|
67
|
+
userAgent:
|
|
68
|
+
"speakeasy-sdk/mcp-typescript 0.0.7 2.701.8 0.1.0 @steuerboard/mcp",
|
|
68
69
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from "./resources.js";
|
|
14
14
|
import { MCPScope } from "./scopes.js";
|
|
15
15
|
import { createRegisterTool } from "./tools.js";
|
|
16
|
+
import { tool$adminClientsCreateClient } from "./tools/adminClientsCreateClient.js";
|
|
16
17
|
import { tool$adminClientsGetClient } from "./tools/adminClientsGetClient.js";
|
|
17
18
|
import { tool$adminClientsListClients } from "./tools/adminClientsListClients.js";
|
|
18
19
|
import { tool$authGetV1Me } from "./tools/authGetV1Me.js";
|
|
@@ -42,7 +43,7 @@ export function createMCPServer(deps: {
|
|
|
42
43
|
}) {
|
|
43
44
|
const server = new McpServer({
|
|
44
45
|
name: "Steuerboard",
|
|
45
|
-
version: "0.0.
|
|
46
|
+
version: "0.0.7",
|
|
46
47
|
});
|
|
47
48
|
|
|
48
49
|
const getClient = deps.getSDK || (() =>
|
|
@@ -89,6 +90,7 @@ export function createMCPServer(deps: {
|
|
|
89
90
|
tool(tool$healthCheckGetV1Ping);
|
|
90
91
|
tool(tool$authGetV1Me);
|
|
91
92
|
tool(tool$adminClientsListClients);
|
|
93
|
+
tool(tool$adminClientsCreateClient);
|
|
92
94
|
tool(tool$adminClientsGetClient);
|
|
93
95
|
tool(tool$workspacesListWorkspaces);
|
|
94
96
|
tool(tool$workspacesGetWorkspace);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { adminClientsCreateClient } from "../../funcs/adminClientsCreateClient.js";
|
|
6
|
+
import { ClientCreate$zodSchema } from "../../models/clientcreate.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: ClientCreate$zodSchema.optional(),
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$adminClientsCreateClient: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "admin-clients-create-client",
|
|
15
|
+
description: `Create a client
|
|
16
|
+
|
|
17
|
+
Creates a new client for the accountant and returns the created client object.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await adminClientsCreateClient(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|