@avallon-labs/mcp 66.2.0 → 66.3.0-staging.1393
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/index.js
CHANGED
|
@@ -2647,6 +2647,21 @@ var submitFormSubmission = async (id, submitFormSubmissionBody, options) => {
|
|
|
2647
2647
|
const data = body ? JSON.parse(body) : {};
|
|
2648
2648
|
return { data, status: res.status, headers: res.headers };
|
|
2649
2649
|
};
|
|
2650
|
+
var getGetPublicFormSubmissionThemeUrl = (id) => {
|
|
2651
|
+
return `/public/v1/form-submissions/${id}/theme`;
|
|
2652
|
+
};
|
|
2653
|
+
var getPublicFormSubmissionTheme = async (id, options) => {
|
|
2654
|
+
const res = await fetch(
|
|
2655
|
+
getGetPublicFormSubmissionThemeUrl(id),
|
|
2656
|
+
{
|
|
2657
|
+
...options,
|
|
2658
|
+
method: "GET"
|
|
2659
|
+
}
|
|
2660
|
+
);
|
|
2661
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
2662
|
+
const data = body ? JSON.parse(body) : {};
|
|
2663
|
+
return { data, status: res.status, headers: res.headers };
|
|
2664
|
+
};
|
|
2650
2665
|
var getCreateFormUrl = () => {
|
|
2651
2666
|
return `/v1/forms`;
|
|
2652
2667
|
};
|
|
@@ -7213,6 +7228,29 @@ var submitFormSubmissionHandler = async (args, options) => {
|
|
|
7213
7228
|
structuredContent: res.data
|
|
7214
7229
|
};
|
|
7215
7230
|
};
|
|
7231
|
+
var getPublicFormSubmissionThemeHandler = async (args, options) => {
|
|
7232
|
+
const res = await getPublicFormSubmissionTheme(args.pathParams.id, options);
|
|
7233
|
+
if (res.status >= 400) {
|
|
7234
|
+
return {
|
|
7235
|
+
content: [
|
|
7236
|
+
{
|
|
7237
|
+
type: "text",
|
|
7238
|
+
text: JSON.stringify(res.data ?? null)
|
|
7239
|
+
}
|
|
7240
|
+
],
|
|
7241
|
+
isError: true
|
|
7242
|
+
};
|
|
7243
|
+
}
|
|
7244
|
+
return {
|
|
7245
|
+
content: [
|
|
7246
|
+
{
|
|
7247
|
+
type: "text",
|
|
7248
|
+
text: JSON.stringify(res.data ?? null)
|
|
7249
|
+
}
|
|
7250
|
+
],
|
|
7251
|
+
structuredContent: res.data
|
|
7252
|
+
};
|
|
7253
|
+
};
|
|
7216
7254
|
var createFormHandler = async (args, options) => {
|
|
7217
7255
|
const res = await createForm(args.bodyParams, options);
|
|
7218
7256
|
if (res.status >= 400) {
|
|
@@ -12944,6 +12982,19 @@ var SubmitFormSubmissionResponse = zod.object({
|
|
|
12944
12982
|
}),
|
|
12945
12983
|
"message": zod.string()
|
|
12946
12984
|
});
|
|
12985
|
+
var GetPublicFormSubmissionThemeParams = zod.object({
|
|
12986
|
+
"id": zod.string().uuid()
|
|
12987
|
+
});
|
|
12988
|
+
var GetPublicFormSubmissionThemeResponse = zod.object({
|
|
12989
|
+
"data": zod.object({
|
|
12990
|
+
"tenant_name": zod.string().describe("The tenant's name, for the page title"),
|
|
12991
|
+
"form_title": zod.string().describe("Title of the form version the submission is pinned to"),
|
|
12992
|
+
"primary_color": zod.union([zod.string(), zod.null()]).describe("Brand color as `#RRGGBB`, null for the default"),
|
|
12993
|
+
"logo_url": zod.union([zod.string(), zod.null()]).describe("HTTPS URL of the header logo, null for the default"),
|
|
12994
|
+
"favicon_url": zod.union([zod.string(), zod.null()]).describe("HTTPS URL of the favicon, null for the default")
|
|
12995
|
+
}),
|
|
12996
|
+
"message": zod.string()
|
|
12997
|
+
});
|
|
12947
12998
|
var CreateFormBody = zod.object({
|
|
12948
12999
|
"title": zod.string().min(1),
|
|
12949
13000
|
"schema": zod.record(zod.string(), zod.unknown()).describe("JSON Schema (draft 2020-12) of the form's fields, restricted to the renderer subset: a flat object of boolean, string and number fields with `title`, `additionalProperties: false`, optional `if`/`then`/`else`, `allOf`, `dependentRequired` and `$data` bounds. Property order is the display order."),
|
|
@@ -17175,6 +17226,22 @@ var createMcpServer = (options) => {
|
|
|
17175
17226
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17176
17227
|
})
|
|
17177
17228
|
);
|
|
17229
|
+
tools.getPublicFormSubmissionTheme = server2.registerTool(
|
|
17230
|
+
"getPublicFormSubmissionTheme",
|
|
17231
|
+
{
|
|
17232
|
+
title: "Get a form submission's theme (public)",
|
|
17233
|
+
description: "Return the form title and the name and branding of the tenant a submission link belongs to, so the form renderer can style the page before the password is entered. Needs no password; an unknown id is 404.",
|
|
17234
|
+
inputSchema: {
|
|
17235
|
+
pathParams: GetPublicFormSubmissionThemeParams
|
|
17236
|
+
},
|
|
17237
|
+
outputSchema: GetPublicFormSubmissionThemeResponse,
|
|
17238
|
+
annotations: { readOnlyHint: true }
|
|
17239
|
+
},
|
|
17240
|
+
(args, ctx) => getPublicFormSubmissionThemeHandler(args, {
|
|
17241
|
+
...options,
|
|
17242
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
17243
|
+
})
|
|
17244
|
+
);
|
|
17178
17245
|
tools.createForm = server2.registerTool(
|
|
17179
17246
|
"createForm",
|
|
17180
17247
|
{
|
|
@@ -18537,4 +18604,4 @@ var transport = new StdioServerTransport();
|
|
|
18537
18604
|
server.connect(transport).then(() => {
|
|
18538
18605
|
console.error("MCP server running on stdio");
|
|
18539
18606
|
}).catch(console.error);
|
|
18540
|
-
//# sourceMappingURL=server-
|
|
18607
|
+
//# sourceMappingURL=server-PVUDT336.js.map
|