diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index 60311a690..734c23e1b 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -337,7 +337,9 @@ def convert_openapi_to_tool_payload(openapi_spec): tool = { "type": "function", "name": operation.get("operationId"), - "description": operation.get("summary", "No description available."), + "description": operation.get( + "description", operation.get("summary", "No description available.") + ), "parameters": {"type": "object", "properties": {}, "required": []}, } diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 5e70d17bb..fb67e5169 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -1153,7 +1153,7 @@ export const convertOpenApiToToolPayload = (openApiSpec) => { const tool = { type: 'function', name: operation.operationId, - description: operation.summary || 'No description available.', + description: operation.description || operation.summary || 'No description available.', parameters: { type: 'object', properties: {},