@ttoss/http-server-mcp-openapi 0.9.2 → 0.10.1
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 +3 -0
- package/dist/index.cjs +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -69,6 +69,9 @@ Each OpenAPI operation with an `operationId` and a supported HTTP method
|
|
|
69
69
|
| operation `description` | tool description, newlines flattened |
|
|
70
70
|
| operation `tags` | tool `tags`, for the deferred `search` filter |
|
|
71
71
|
|
|
72
|
+
Every `inputSchema` is closed (`additionalProperties: false`): the request is
|
|
73
|
+
built from declared arguments only, so with `validateArguments` an undeclared
|
|
74
|
+
one is refused, named, rather than dropped unseen.
|
|
72
75
|
Path params are always required strings, carrying their own `description`; a
|
|
73
76
|
call missing one is refused before `callApi` runs, whatever
|
|
74
77
|
`validateArguments` says. Query and body params carry their
|
package/dist/index.cjs
CHANGED
|
@@ -780,7 +780,8 @@ var buildFullInputSchema = args => {
|
|
|
780
780
|
properties,
|
|
781
781
|
...(required.length > 0 ? {
|
|
782
782
|
required: [...new Set(required)]
|
|
783
|
-
} : {})
|
|
783
|
+
} : {}),
|
|
784
|
+
additionalProperties: false
|
|
784
785
|
};
|
|
785
786
|
};
|
|
786
787
|
|
|
@@ -933,7 +934,8 @@ var buildInputSchema = (pathParams, queryParams, bodyProps) => {
|
|
|
933
934
|
return !p.serverManaged;
|
|
934
935
|
});
|
|
935
936
|
if ([...modelPathParams, ...modelQueryParams, ...bodyProps].length === 0) return {
|
|
936
|
-
type: "object"
|
|
937
|
+
type: "object",
|
|
938
|
+
additionalProperties: false
|
|
937
939
|
};
|
|
938
940
|
const requiredFields = [...modelPathParams.map(p => {
|
|
939
941
|
return p.argName;
|
|
@@ -957,7 +959,8 @@ var buildInputSchema = (pathParams, queryParams, bodyProps) => {
|
|
|
957
959
|
properties,
|
|
958
960
|
...(requiredFields.length > 0 ? {
|
|
959
961
|
required: requiredFields
|
|
960
|
-
} : {})
|
|
962
|
+
} : {}),
|
|
963
|
+
additionalProperties: false
|
|
961
964
|
};
|
|
962
965
|
};
|
|
963
966
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -777,7 +777,8 @@ var buildFullInputSchema = args => {
|
|
|
777
777
|
properties,
|
|
778
778
|
...(required.length > 0 ? {
|
|
779
779
|
required: [...new Set(required)]
|
|
780
|
-
} : {})
|
|
780
|
+
} : {}),
|
|
781
|
+
additionalProperties: false
|
|
781
782
|
};
|
|
782
783
|
};
|
|
783
784
|
|
|
@@ -930,7 +931,8 @@ var buildInputSchema = (pathParams, queryParams, bodyProps) => {
|
|
|
930
931
|
return !p.serverManaged;
|
|
931
932
|
});
|
|
932
933
|
if ([...modelPathParams, ...modelQueryParams, ...bodyProps].length === 0) return {
|
|
933
|
-
type: "object"
|
|
934
|
+
type: "object",
|
|
935
|
+
additionalProperties: false
|
|
934
936
|
};
|
|
935
937
|
const requiredFields = [...modelPathParams.map(p => {
|
|
936
938
|
return p.argName;
|
|
@@ -954,7 +956,8 @@ var buildInputSchema = (pathParams, queryParams, bodyProps) => {
|
|
|
954
956
|
properties,
|
|
955
957
|
...(requiredFields.length > 0 ? {
|
|
956
958
|
required: requiredFields
|
|
957
|
-
} : {})
|
|
959
|
+
} : {}),
|
|
960
|
+
additionalProperties: false
|
|
958
961
|
};
|
|
959
962
|
};
|
|
960
963
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/http-server-mcp-openapi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Generate Model Context Protocol (MCP) tools from an OpenAPI specification for @ttoss/http-server-mcp",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ttoss/http-server": "^0.14.2",
|
|
40
|
-
"@ttoss/http-server-mcp": "^0.
|
|
40
|
+
"@ttoss/http-server-mcp": "^0.41.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@modelcontextprotocol/server": "^2.3.1",
|