academia-mcp 1.7.2__py3-none-any.whl → 1.7.4__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.
@@ -131,8 +131,10 @@ Return the result as a JSON object in the following format:
131
131
  "limitations": "Limitations of the paper",
132
132
  "overall": "Number + short description",
133
133
  "confidence": "Number + short description",
134
- "format_issues": "Format issues",
134
+ "format_issues": "Format issues"
135
135
  }
136
+
137
+ Always produce a correct JSON object.
136
138
  """
137
139
 
138
140
 
@@ -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
- OLD_API_URL_TEMPLATE = "https://api.semanticscholar.org/v1/paper/{paper_id}"
11
- GRAPH_URL_TEMPLATE = "https://api.semanticscholar.org/graph/v1/paper/{paper_id}/citations?fields={fields}&offset={offset}&limit={limit}"
12
- REVERSED_GRAPH_URL_TEMPLATE = "https://api.semanticscholar.org/graph/v1/paper/{paper_id}/references?fields={fields}&offset={offset}&limit={limit}"
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 = GRAPH_URL_TEMPLATE.format(paper_id=paper_id, fields=FIELDS, offset=offset, limit=limit)
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 = OLD_API_URL_TEMPLATE.format(paper_id=paper_id)
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["numCitedBy"]
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 = REVERSED_GRAPH_URL_TEMPLATE.format(
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.2
3
+ Version: 1.7.4
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
@@ -17,13 +17,13 @@ academia_mcp/tools/document_qa.py,sha256=t9mygYQ7AFIAPiha1nZ-y043luQlkTCBdWb_SDn
17
17
  academia_mcp/tools/hf_datasets_search.py,sha256=KiBkqT4rXjEN4oc1AWZOPnqN_Go90TQogY5-DUm3LQo,2854
18
18
  academia_mcp/tools/latex.py,sha256=llxxjBMHzDX4iNMeJSLuiP_sXT4umtYVyyhfZq2derM,5936
19
19
  academia_mcp/tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- academia_mcp/tools/review.py,sha256=LbebOHGs76qoSgWvTQ9Uj1fvmjc2eSBudX6n_zCINYI,10247
21
- academia_mcp/tools/s2_citations.py,sha256=dqrBp76RrX1zH2XzcMAoWBbvbtyhxLeF-xnqOKD_JiM,4852
20
+ academia_mcp/tools/review.py,sha256=9lMMELiRNVpiETqtFEHk551LaFuf1LYx0gXD5Sn7Ve0,10285
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.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
- academia_mcp-1.7.2.dist-info/METADATA,sha256=OrWgykO5__PEKpBExYyOOfk7bGpbn02rO1thwtOfh-E,3714
26
- academia_mcp-1.7.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- academia_mcp-1.7.2.dist-info/entry_points.txt,sha256=gxkiKJ74w2FwJpSECpjA3XtCfI5ZfrM6N8cqnwsq4yY,51
28
- academia_mcp-1.7.2.dist-info/top_level.txt,sha256=CzGpRFsRRJRqWEb1e3SUlcfGqRzOxevZGaJWrtGF8W0,13
29
- academia_mcp-1.7.2.dist-info/RECORD,,
24
+ academia_mcp-1.7.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
25
+ academia_mcp-1.7.4.dist-info/METADATA,sha256=gy4d2ZNVTCU11hDgYerJ_H_hQjQ3CI7kUiPSmmNDsvA,3714
26
+ academia_mcp-1.7.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ academia_mcp-1.7.4.dist-info/entry_points.txt,sha256=gxkiKJ74w2FwJpSECpjA3XtCfI5ZfrM6N8cqnwsq4yY,51
28
+ academia_mcp-1.7.4.dist-info/top_level.txt,sha256=CzGpRFsRRJRqWEb1e3SUlcfGqRzOxevZGaJWrtGF8W0,13
29
+ academia_mcp-1.7.4.dist-info/RECORD,,