academia-mcp 1.7.2__py3-none-any.whl → 1.7.3__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.
- academia_mcp/tools/s2_citations.py +9 -7
- {academia_mcp-1.7.2.dist-info → academia_mcp-1.7.3.dist-info}/METADATA +1 -1
- {academia_mcp-1.7.2.dist-info → academia_mcp-1.7.3.dist-info}/RECORD +7 -7
- {academia_mcp-1.7.2.dist-info → academia_mcp-1.7.3.dist-info}/WHEEL +0 -0
- {academia_mcp-1.7.2.dist-info → academia_mcp-1.7.3.dist-info}/entry_points.txt +0 -0
- {academia_mcp-1.7.2.dist-info → academia_mcp-1.7.3.dist-info}/licenses/LICENSE +0 -0
- {academia_mcp-1.7.2.dist-info → academia_mcp-1.7.3.dist-info}/top_level.txt +0 -0
@@ -7,9 +7,9 @@ from typing import Optional, List, Dict, Any
|
|
7
7
|
from academia_mcp.utils import get_with_retries
|
8
8
|
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
PAPER_URL_TEMPLATE = "https://api.semanticscholar.org/graph/v1/paper/{paper_id}?fields={fields}"
|
11
|
+
CITATIONS_URL_TEMPLATE = "https://api.semanticscholar.org/graph/v1/paper/{paper_id}/citations?fields={fields}&offset={offset}&limit={limit}"
|
12
|
+
REFERENCES_URL_TEMPLATE = "https://api.semanticscholar.org/graph/v1/paper/{paper_id}/references?fields={fields}&offset={offset}&limit={limit}"
|
13
13
|
FIELDS = "title,authors,externalIds,venue,citationCount,publicationDate"
|
14
14
|
|
15
15
|
|
@@ -77,17 +77,19 @@ def s2_get_citations(
|
|
77
77
|
arxiv_id = arxiv_id.split("v")[0]
|
78
78
|
paper_id = f"arxiv:{arxiv_id}"
|
79
79
|
|
80
|
-
url =
|
80
|
+
url = CITATIONS_URL_TEMPLATE.format(
|
81
|
+
paper_id=paper_id, fields=FIELDS, offset=offset, limit=limit
|
82
|
+
)
|
81
83
|
response = get_with_retries(url)
|
82
84
|
result = response.json()
|
83
85
|
entries = result["data"]
|
84
86
|
total_count = len(result["data"]) + result["offset"]
|
85
87
|
|
86
88
|
if "next" in result:
|
87
|
-
paper_url =
|
89
|
+
paper_url = PAPER_URL_TEMPLATE.format(paper_id=paper_id, fields=FIELDS)
|
88
90
|
paper_response = get_with_retries(paper_url)
|
89
91
|
paper_result = paper_response.json()
|
90
|
-
total_count = paper_result["
|
92
|
+
total_count = paper_result["citationCount"]
|
91
93
|
|
92
94
|
return _format_entries(entries, offset if offset else 0, total_count)
|
93
95
|
|
@@ -116,7 +118,7 @@ def s2_get_references(
|
|
116
118
|
arxiv_id = arxiv_id.split("v")[0]
|
117
119
|
paper_id = f"arxiv:{arxiv_id}"
|
118
120
|
|
119
|
-
url =
|
121
|
+
url = REFERENCES_URL_TEMPLATE.format(
|
120
122
|
paper_id=paper_id, fields=FIELDS, offset=offset, limit=limit
|
121
123
|
)
|
122
124
|
response = get_with_retries(url)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: academia-mcp
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.3
|
4
4
|
Summary: MCP server that provides different tools to search for scientific publications
|
5
5
|
Author-email: Ilya Gusev <phoenixilya@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/IlyaGusev/academia_mcp
|
@@ -18,12 +18,12 @@ academia_mcp/tools/hf_datasets_search.py,sha256=KiBkqT4rXjEN4oc1AWZOPnqN_Go90TQo
|
|
18
18
|
academia_mcp/tools/latex.py,sha256=llxxjBMHzDX4iNMeJSLuiP_sXT4umtYVyyhfZq2derM,5936
|
19
19
|
academia_mcp/tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
academia_mcp/tools/review.py,sha256=LbebOHGs76qoSgWvTQ9Uj1fvmjc2eSBudX6n_zCINYI,10247
|
21
|
-
academia_mcp/tools/s2_citations.py,sha256=
|
21
|
+
academia_mcp/tools/s2_citations.py,sha256=XZ3a4rsovAiI_D_kIy0GddRHSjpC5Fa_CS8dmB9Qftg,4902
|
22
22
|
academia_mcp/tools/visit_webpage.py,sha256=OZdqDkVPIbANyFw5o5jIjU5Rr_dolxrGDs63Ud-GmRM,1966
|
23
23
|
academia_mcp/tools/web_search.py,sha256=mobKm4iqKppn8pduZYMzWRo1MQBjkAqmMtrFLI5XY2Y,6296
|
24
|
-
academia_mcp-1.7.
|
25
|
-
academia_mcp-1.7.
|
26
|
-
academia_mcp-1.7.
|
27
|
-
academia_mcp-1.7.
|
28
|
-
academia_mcp-1.7.
|
29
|
-
academia_mcp-1.7.
|
24
|
+
academia_mcp-1.7.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
25
|
+
academia_mcp-1.7.3.dist-info/METADATA,sha256=uSv_PP7sCjZUnLsGNBigsa0zd-SNkK3ohtsqCizdobg,3714
|
26
|
+
academia_mcp-1.7.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
27
|
+
academia_mcp-1.7.3.dist-info/entry_points.txt,sha256=gxkiKJ74w2FwJpSECpjA3XtCfI5ZfrM6N8cqnwsq4yY,51
|
28
|
+
academia_mcp-1.7.3.dist-info/top_level.txt,sha256=CzGpRFsRRJRqWEb1e3SUlcfGqRzOxevZGaJWrtGF8W0,13
|
29
|
+
academia_mcp-1.7.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|