@avallon-labs/mcp 23.6.0-staging.521 → 23.7.0-staging.522
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
|
@@ -1833,6 +1833,38 @@ var updateTool = async (id, updateToolBody, options) => {
|
|
|
1833
1833
|
headers: res.headers
|
|
1834
1834
|
};
|
|
1835
1835
|
};
|
|
1836
|
+
var getWorkerListToolsUrl = () => {
|
|
1837
|
+
return `/worker/v1/tools`;
|
|
1838
|
+
};
|
|
1839
|
+
var workerListTools = async (options) => {
|
|
1840
|
+
const res = await fetch(getWorkerListToolsUrl(), {
|
|
1841
|
+
...options,
|
|
1842
|
+
method: "GET"
|
|
1843
|
+
});
|
|
1844
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1845
|
+
const data = body ? JSON.parse(body) : {};
|
|
1846
|
+
return {
|
|
1847
|
+
data,
|
|
1848
|
+
status: res.status,
|
|
1849
|
+
headers: res.headers
|
|
1850
|
+
};
|
|
1851
|
+
};
|
|
1852
|
+
var getWorkerGetToolUrl = (id) => {
|
|
1853
|
+
return `/worker/v1/tools/${id}`;
|
|
1854
|
+
};
|
|
1855
|
+
var workerGetTool = async (id, options) => {
|
|
1856
|
+
const res = await fetch(getWorkerGetToolUrl(id), {
|
|
1857
|
+
...options,
|
|
1858
|
+
method: "GET"
|
|
1859
|
+
});
|
|
1860
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1861
|
+
const data = body ? JSON.parse(body) : {};
|
|
1862
|
+
return {
|
|
1863
|
+
data,
|
|
1864
|
+
status: res.status,
|
|
1865
|
+
headers: res.headers
|
|
1866
|
+
};
|
|
1867
|
+
};
|
|
1836
1868
|
var getUploadFileUrl = () => {
|
|
1837
1869
|
return `/v1/upload-file`;
|
|
1838
1870
|
};
|
|
@@ -3058,6 +3090,28 @@ var updateToolHandler = async (args) => {
|
|
|
3058
3090
|
]
|
|
3059
3091
|
};
|
|
3060
3092
|
};
|
|
3093
|
+
var workerListToolsHandler = async () => {
|
|
3094
|
+
const res = await workerListTools();
|
|
3095
|
+
return {
|
|
3096
|
+
content: [
|
|
3097
|
+
{
|
|
3098
|
+
type: "text",
|
|
3099
|
+
text: JSON.stringify(res)
|
|
3100
|
+
}
|
|
3101
|
+
]
|
|
3102
|
+
};
|
|
3103
|
+
};
|
|
3104
|
+
var workerGetToolHandler = async (args) => {
|
|
3105
|
+
const res = await workerGetTool(args.pathParams.id);
|
|
3106
|
+
return {
|
|
3107
|
+
content: [
|
|
3108
|
+
{
|
|
3109
|
+
type: "text",
|
|
3110
|
+
text: JSON.stringify(res)
|
|
3111
|
+
}
|
|
3112
|
+
]
|
|
3113
|
+
};
|
|
3114
|
+
};
|
|
3061
3115
|
var uploadFileHandler = async (args) => {
|
|
3062
3116
|
const res = await uploadFile(args.bodyParams);
|
|
3063
3117
|
return {
|
|
@@ -5738,6 +5792,26 @@ var UpdateToolResponse = zod.object({
|
|
|
5738
5792
|
has_api_key: zod.boolean()
|
|
5739
5793
|
})
|
|
5740
5794
|
});
|
|
5795
|
+
var WorkerListToolsResponse = zod.object({
|
|
5796
|
+
tools: zod.array(
|
|
5797
|
+
zod.object({
|
|
5798
|
+
id: zod.string(),
|
|
5799
|
+
name: zod.string(),
|
|
5800
|
+
description: zod.string()
|
|
5801
|
+
})
|
|
5802
|
+
)
|
|
5803
|
+
});
|
|
5804
|
+
var WorkerGetToolParams = zod.object({
|
|
5805
|
+
id: zod.string().uuid()
|
|
5806
|
+
});
|
|
5807
|
+
var WorkerGetToolResponse = zod.object({
|
|
5808
|
+
tool: zod.object({
|
|
5809
|
+
id: zod.string(),
|
|
5810
|
+
name: zod.string(),
|
|
5811
|
+
description: zod.string(),
|
|
5812
|
+
schema: zod.record(zod.string(), zod.unknown())
|
|
5813
|
+
})
|
|
5814
|
+
});
|
|
5741
5815
|
var UploadFileBody = zod.object({
|
|
5742
5816
|
source_url: zod.string().describe(
|
|
5743
5817
|
"URL of the file to upload. Accepts either a public HTTPS URL or an `avallon://artifact-upload/` URL returned by the Request a pre-signed URL for direct large file upload (POST /v1/artifacts/get-upload-url) endpoint."
|
|
@@ -6766,6 +6840,15 @@ server.tool(
|
|
|
6766
6840
|
},
|
|
6767
6841
|
updateToolHandler
|
|
6768
6842
|
);
|
|
6843
|
+
server.tool("workerListTools", "List worker tools", workerListToolsHandler);
|
|
6844
|
+
server.tool(
|
|
6845
|
+
"workerGetTool",
|
|
6846
|
+
"Get worker tool",
|
|
6847
|
+
{
|
|
6848
|
+
pathParams: WorkerGetToolParams
|
|
6849
|
+
},
|
|
6850
|
+
workerGetToolHandler
|
|
6851
|
+
);
|
|
6769
6852
|
server.tool(
|
|
6770
6853
|
"uploadFile",
|
|
6771
6854
|
"Upload a file for processing",
|
|
@@ -6862,4 +6945,4 @@ var transport = new StdioServerTransport();
|
|
|
6862
6945
|
server.connect(transport).then(() => {
|
|
6863
6946
|
console.error("MCP server running on stdio");
|
|
6864
6947
|
}).catch(console.error);
|
|
6865
|
-
//# sourceMappingURL=server-
|
|
6948
|
+
//# sourceMappingURL=server-M7TTMEI7.js.map
|