suse-documentation-mcp-server 0.4.0__py3-none-any.whl → 0.6.0__py3-none-any.whl
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.
- server/search_suse_documentation.py +7 -12
- {suse_documentation_mcp_server-0.4.0.dist-info → suse_documentation_mcp_server-0.6.0.dist-info}/METADATA +1 -1
- suse_documentation_mcp_server-0.6.0.dist-info/RECORD +6 -0
- suse_documentation_mcp_server-0.4.0.dist-info/RECORD +0 -6
- {suse_documentation_mcp_server-0.4.0.dist-info → suse_documentation_mcp_server-0.6.0.dist-info}/WHEEL +0 -0
- {suse_documentation_mcp_server-0.4.0.dist-info → suse_documentation_mcp_server-0.6.0.dist-info}/entry_points.txt +0 -0
- {suse_documentation_mcp_server-0.4.0.dist-info → suse_documentation_mcp_server-0.6.0.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,6 @@ import os
|
|
4
4
|
from dotenv import load_dotenv
|
5
5
|
from typing import Any
|
6
6
|
from mcp.server.fastmcp import FastMCP
|
7
|
-
from pydantic import BaseModel, Field
|
8
7
|
|
9
8
|
load_dotenv()
|
10
9
|
|
@@ -21,7 +20,7 @@ def clean_content(content):
|
|
21
20
|
cleaned_content = re.sub(r'[ \t]+', ' ', cleaned_content)
|
22
21
|
return cleaned_content
|
23
22
|
|
24
|
-
def get_web_search_results_from_oi(
|
23
|
+
def get_web_search_results_from_oi(queries):
|
25
24
|
headers = {
|
26
25
|
'Content-Type': 'application/json',
|
27
26
|
'Authorization': f'Bearer {authorization_token}'
|
@@ -29,7 +28,7 @@ def get_web_search_results_from_oi(query):
|
|
29
28
|
|
30
29
|
# Step 1: Get web search results (list of URLs)
|
31
30
|
search_payload = {
|
32
|
-
"
|
31
|
+
"queries": queries,
|
33
32
|
"collection_name": "your_collection_name"
|
34
33
|
}
|
35
34
|
|
@@ -73,21 +72,17 @@ def get_web_search_results_from_oi(query):
|
|
73
72
|
|
74
73
|
return combined_response
|
75
74
|
|
76
|
-
class WebSearchToolInput(BaseModel):
|
77
|
-
"""Input schema for WebSearchTool."""
|
78
|
-
query: str = Field(..., description="search query")
|
79
75
|
@mcp.tool()
|
80
|
-
async def get_web_search_results(
|
81
|
-
"""Get web search results for a given
|
76
|
+
async def get_web_search_results(queries: str) -> str:
|
77
|
+
"""Get web search results for a given queries.
|
82
78
|
|
83
79
|
Args:
|
84
|
-
|
80
|
+
queries: Web search queries
|
85
81
|
"""
|
86
|
-
args_schema: Type[BaseModel] = WebSearchToolInput
|
87
82
|
try:
|
88
|
-
return get_web_search_results_from_oi(
|
83
|
+
return get_web_search_results_from_oi(queries)
|
89
84
|
except Exception as e:
|
90
|
-
return f"Error performing web search: {str(e)}"
|
85
|
+
return f"Error performing web search: {str(e)}\n{queries}"
|
91
86
|
|
92
87
|
|
93
88
|
def main():
|
@@ -0,0 +1,6 @@
|
|
1
|
+
server/search_suse_documentation.py,sha256=PJdcFlVh4DBBahX9QUc0yZO_YL0jfrduS1kbUWk5VdM,3154
|
2
|
+
suse_documentation_mcp_server-0.6.0.dist-info/METADATA,sha256=ZHjL-sfhWlQCyTRlU3I_Wz64-kGSuQE9DSWm9PRpjB4,343
|
3
|
+
suse_documentation_mcp_server-0.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
4
|
+
suse_documentation_mcp_server-0.6.0.dist-info/entry_points.txt,sha256=IEM7kH8YFWMMJCcp4hJGv5tHzHWxiR5lZ7jOyzRCHQA,88
|
5
|
+
suse_documentation_mcp_server-0.6.0.dist-info/top_level.txt,sha256=StKOSmRhvWS5IPcvhsDRbtxUTEofJgYFGOu5AAJdSWo,7
|
6
|
+
suse_documentation_mcp_server-0.6.0.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
server/search_suse_documentation.py,sha256=ZKznYKFSr2VZm1aHbjKlHaJG3rBCSV_DiUZYT1gZcJk,3359
|
2
|
-
suse_documentation_mcp_server-0.4.0.dist-info/METADATA,sha256=I6BIWipFsdVs3T52YahcNCtiB9Y7B0nlXPQKAwxAoko,343
|
3
|
-
suse_documentation_mcp_server-0.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
4
|
-
suse_documentation_mcp_server-0.4.0.dist-info/entry_points.txt,sha256=IEM7kH8YFWMMJCcp4hJGv5tHzHWxiR5lZ7jOyzRCHQA,88
|
5
|
-
suse_documentation_mcp_server-0.4.0.dist-info/top_level.txt,sha256=StKOSmRhvWS5IPcvhsDRbtxUTEofJgYFGOu5AAJdSWo,7
|
6
|
-
suse_documentation_mcp_server-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|