@avallon-labs/mcp 69.2.0-staging.1477 → 69.3.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.
package/dist/index.js
CHANGED
|
@@ -3008,6 +3008,21 @@ var createIntake = async (createIntakeBody, options) => {
|
|
|
3008
3008
|
const data = body ? JSON.parse(body) : {};
|
|
3009
3009
|
return { data, status: res.status, headers: res.headers };
|
|
3010
3010
|
};
|
|
3011
|
+
var getGetIntakeUrl = (intakeId) => {
|
|
3012
|
+
return `/v1/intakes/${intakeId}`;
|
|
3013
|
+
};
|
|
3014
|
+
var getIntake = async (intakeId, options) => {
|
|
3015
|
+
const res = await fetch(
|
|
3016
|
+
getGetIntakeUrl(intakeId),
|
|
3017
|
+
{
|
|
3018
|
+
...options,
|
|
3019
|
+
method: "GET"
|
|
3020
|
+
}
|
|
3021
|
+
);
|
|
3022
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
3023
|
+
const data = body ? JSON.parse(body) : {};
|
|
3024
|
+
return { data, status: res.status, headers: res.headers };
|
|
3025
|
+
};
|
|
3011
3026
|
var getGetExtractUrl = (id) => {
|
|
3012
3027
|
return `/v1/extracts/${id}`;
|
|
3013
3028
|
};
|
|
@@ -7808,6 +7823,29 @@ var createIntakeHandler = async (args, options) => {
|
|
|
7808
7823
|
structuredContent: res.data
|
|
7809
7824
|
};
|
|
7810
7825
|
};
|
|
7826
|
+
var getIntakeHandler = async (args, options) => {
|
|
7827
|
+
const res = await getIntake(args.pathParams.intakeId, options);
|
|
7828
|
+
if (res.status >= 400) {
|
|
7829
|
+
return {
|
|
7830
|
+
content: [
|
|
7831
|
+
{
|
|
7832
|
+
type: "text",
|
|
7833
|
+
text: JSON.stringify(res.data ?? null)
|
|
7834
|
+
}
|
|
7835
|
+
],
|
|
7836
|
+
isError: true
|
|
7837
|
+
};
|
|
7838
|
+
}
|
|
7839
|
+
return {
|
|
7840
|
+
content: [
|
|
7841
|
+
{
|
|
7842
|
+
type: "text",
|
|
7843
|
+
text: JSON.stringify(res.data ?? null)
|
|
7844
|
+
}
|
|
7845
|
+
],
|
|
7846
|
+
structuredContent: res.data
|
|
7847
|
+
};
|
|
7848
|
+
};
|
|
7811
7849
|
var getExtractHandler = async (args, options) => {
|
|
7812
7850
|
const res = await getExtract(args.pathParams.id, options);
|
|
7813
7851
|
if (res.status >= 400) {
|
|
@@ -13821,6 +13859,31 @@ var CreateIntakeResponse = zod.object({
|
|
|
13821
13859
|
}),
|
|
13822
13860
|
"message": zod.string()
|
|
13823
13861
|
});
|
|
13862
|
+
var GetIntakeParams = zod.object({
|
|
13863
|
+
"intakeId": zod.string().uuid()
|
|
13864
|
+
});
|
|
13865
|
+
var GetIntakeResponse = zod.object({
|
|
13866
|
+
"data": zod.object({
|
|
13867
|
+
"id": zod.string(),
|
|
13868
|
+
"name": zod.string(),
|
|
13869
|
+
"version": zod.number().describe("Version the routes below belong to."),
|
|
13870
|
+
"versions": zod.object({
|
|
13871
|
+
"latest": zod.number(),
|
|
13872
|
+
"live": zod.number(),
|
|
13873
|
+
"test": zod.number()
|
|
13874
|
+
}),
|
|
13875
|
+
"routes": zod.array(zod.object({
|
|
13876
|
+
"id": zod.string(),
|
|
13877
|
+
"name": zod.string(),
|
|
13878
|
+
"description": zod.string(),
|
|
13879
|
+
"processor_type": zod.enum(["extractor", "worker"]),
|
|
13880
|
+
"processor_id": zod.string()
|
|
13881
|
+
})),
|
|
13882
|
+
"created_at": zod.string().datetime({ "offset": true }),
|
|
13883
|
+
"updated_at": zod.string().datetime({ "offset": true })
|
|
13884
|
+
}),
|
|
13885
|
+
"message": zod.string()
|
|
13886
|
+
});
|
|
13824
13887
|
var GetExtractParams = zod.object({
|
|
13825
13888
|
"id": zod.string().uuid()
|
|
13826
13889
|
});
|
|
@@ -18132,6 +18195,22 @@ var createMcpServer = (options) => {
|
|
|
18132
18195
|
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
18133
18196
|
})
|
|
18134
18197
|
);
|
|
18198
|
+
tools.getIntake = server2.registerTool(
|
|
18199
|
+
"getIntake",
|
|
18200
|
+
{
|
|
18201
|
+
title: "Get intake",
|
|
18202
|
+
description: "Retrieve an intake with its routes at the newest version.",
|
|
18203
|
+
inputSchema: {
|
|
18204
|
+
pathParams: GetIntakeParams
|
|
18205
|
+
},
|
|
18206
|
+
outputSchema: GetIntakeResponse,
|
|
18207
|
+
annotations: { readOnlyHint: true }
|
|
18208
|
+
},
|
|
18209
|
+
(args, ctx) => getIntakeHandler(args, {
|
|
18210
|
+
...options,
|
|
18211
|
+
signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
|
|
18212
|
+
})
|
|
18213
|
+
);
|
|
18135
18214
|
tools.getExtract = server2.registerTool(
|
|
18136
18215
|
"getExtract",
|
|
18137
18216
|
{
|
|
@@ -19331,4 +19410,4 @@ var transport = new StdioServerTransport();
|
|
|
19331
19410
|
server.connect(transport).then(() => {
|
|
19332
19411
|
console.error("MCP server running on stdio");
|
|
19333
19412
|
}).catch(console.error);
|
|
19334
|
-
//# sourceMappingURL=server-
|
|
19413
|
+
//# sourceMappingURL=server-XN72ZYHY.js.map
|