feat: Add OpenAPI-compatible tool execution endpoints for named APIs (#316)

This commit is contained in:
samanhappy
2025-08-30 16:00:15 +08:00
committed by GitHub
parent c398223824
commit 621bc36560

View File

@@ -196,6 +196,8 @@ export const initRoutes = (app: express.Application): void => {
// OpenAPI-compatible tool execution endpoints
app.get(`${config.basePath}/api/tools/:serverName/:toolName`, executeToolViaOpenAPI);
app.post(`${config.basePath}/api/tools/:serverName/:toolName`, executeToolViaOpenAPI);
app.get(`${config.basePath}/api/:name/tools/:serverName/:toolName`, executeToolViaOpenAPI);
app.post(`${config.basePath}/api/:name/tools/:serverName/:toolName`, executeToolViaOpenAPI);
app.use(`${config.basePath}/api`, router);
};