suse-documentation-mcp-server 0.25.0__py3-none-any.whl → 0.26.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.
@@ -77,27 +77,31 @@ def get_web_search_results_from_oi(query):
77
77
 
78
78
  @mcp.tool()
79
79
  async def get_web_search_results(
80
- queries: list[str] = Field(
81
- description="One or more concise, keyword-focused search queries. Use keywords relevant to SUSE documentation.",
80
+ payload: dict[str, Any] = Field(
81
+ description="A dictionary containing a single key 'queries' with a string value representing the search query.",
82
82
  ),
83
83
  ) -> str:
84
84
  """
85
- Fetch web results based on one or more queries using the Open WebUI Web Search API
85
+ Fetch web results based on a query string provided in the payload using the Open WebUI Web Search API.
86
86
  Use for general search and when the user explicitly tells you to 'fetch' results/information.
87
87
  """
88
- print("Entered get_web_search_results:", queries)
88
+ print("Entered get_web_search_results with payload:", payload)
89
89
 
90
90
  try:
91
- if not queries:
92
- raise ValueError("Search called with no queries.")
91
+ # Validate payload
92
+ if not isinstance(payload, dict) or "queries" not in payload:
93
+ raise ValueError("Payload must be a dictionary with a 'queries' key.")
93
94
 
94
- with ThreadPoolExecutor() as executor:
95
- results = list(executor.map(get_web_search_results_from_oi, queries, timeout=10))
95
+ query = payload["queries"]
96
+ if not isinstance(query, str) or not query.strip():
97
+ raise ValueError("'queries' must be a non-empty string.")
96
98
 
97
- return results
99
+ # Process the query
100
+ result = get_web_search_results_from_oi(query)
101
+
102
+ return result
98
103
  except Exception as e:
99
- return f"Error performing web search: {str(e)}\n\n{queries}"
100
-
104
+ return f"Error performing web search: {str(e)}\n\nPayload: {payload}"
101
105
 
102
106
  def main():
103
107
  """Main entry point for the script."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: suse-documentation-mcp-server
3
- Version: 0.25.0
3
+ Version: 0.26.0
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -0,0 +1,6 @@
1
+ server/search_suse_documentation.py,sha256=r04Rbs_ArKVGx6EYG87xEM6F9dxlJJXKBt5IJ4slzw0,4102
2
+ suse_documentation_mcp_server-0.26.0.dist-info/METADATA,sha256=qwEbN3zsQ-xl-duQorJg0UHwIqx47rR9J6LeKQiaLRc,344
3
+ suse_documentation_mcp_server-0.26.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4
+ suse_documentation_mcp_server-0.26.0.dist-info/entry_points.txt,sha256=IEM7kH8YFWMMJCcp4hJGv5tHzHWxiR5lZ7jOyzRCHQA,88
5
+ suse_documentation_mcp_server-0.26.0.dist-info/top_level.txt,sha256=StKOSmRhvWS5IPcvhsDRbtxUTEofJgYFGOu5AAJdSWo,7
6
+ suse_documentation_mcp_server-0.26.0.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- server/search_suse_documentation.py,sha256=hi--EoGaFGutevSCb1URLaE982DPqZgdAhNK78VOO3A,3844
2
- suse_documentation_mcp_server-0.25.0.dist-info/METADATA,sha256=bKHsgM82Rwj9ZTWwn8rTUo1_EFRgon9U9Lt357ktwyY,344
3
- suse_documentation_mcp_server-0.25.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4
- suse_documentation_mcp_server-0.25.0.dist-info/entry_points.txt,sha256=IEM7kH8YFWMMJCcp4hJGv5tHzHWxiR5lZ7jOyzRCHQA,88
5
- suse_documentation_mcp_server-0.25.0.dist-info/top_level.txt,sha256=StKOSmRhvWS5IPcvhsDRbtxUTEofJgYFGOu5AAJdSWo,7
6
- suse_documentation_mcp_server-0.25.0.dist-info/RECORD,,