search1api-mcp 0.7.0 → 0.7.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/build/tools/search.js +6 -16
- package/package.json +1 -1
- package/server.json +2 -2
package/build/tools/search.js
CHANGED
|
@@ -3,25 +3,15 @@ import { makeRequest } from '../api.js';
|
|
|
3
3
|
import { formatError } from '../utils.js';
|
|
4
4
|
import { API_CONFIG } from '../config.js';
|
|
5
5
|
import { INVALID_PARAMS, ProtocolError, } from "@modelcontextprotocol/server";
|
|
6
|
-
// Source fields the API adds for some engines (dates, GitHub and Hacker News
|
|
7
|
-
// details). Only fields the result actually carries are copied.
|
|
8
|
-
const OPTIONAL_RESULT_FIELDS = [
|
|
9
|
-
"published_date",
|
|
10
|
-
"kind",
|
|
11
|
-
"stars",
|
|
12
|
-
"language",
|
|
13
|
-
"num_comments",
|
|
14
|
-
"points",
|
|
15
|
-
"story_url",
|
|
16
|
-
];
|
|
17
6
|
export function resultMetadata(result) {
|
|
18
|
-
const metadata = {
|
|
7
|
+
const metadata = {
|
|
8
|
+
...result.metadata,
|
|
9
|
+
snippet: result.snippet,
|
|
10
|
+
};
|
|
19
11
|
if (result.content)
|
|
20
12
|
metadata.has_full_content = true;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
metadata[field] = result[field];
|
|
24
|
-
}
|
|
13
|
+
if (result.published_date) {
|
|
14
|
+
metadata.published_date = result.published_date;
|
|
25
15
|
}
|
|
26
16
|
return metadata;
|
|
27
17
|
}
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "https://github.com/superagents-lab/search1api-mcp",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.7.
|
|
10
|
+
"version": "0.7.1",
|
|
11
11
|
"remotes": [
|
|
12
12
|
{
|
|
13
13
|
"type": "streamable-http",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{
|
|
19
19
|
"registryType": "npm",
|
|
20
20
|
"identifier": "search1api-mcp",
|
|
21
|
-
"version": "0.7.
|
|
21
|
+
"version": "0.7.1",
|
|
22
22
|
"transport": {
|
|
23
23
|
"type": "stdio"
|
|
24
24
|
},
|