scitex 2.14.0__py3-none-any.whl → 2.15.1__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.
Files changed (218) hide show
  1. scitex/__init__.py +47 -0
  2. scitex/_env_loader.py +156 -0
  3. scitex/_mcp_resources/__init__.py +37 -0
  4. scitex/_mcp_resources/_cheatsheet.py +135 -0
  5. scitex/_mcp_resources/_figrecipe.py +138 -0
  6. scitex/_mcp_resources/_formats.py +102 -0
  7. scitex/_mcp_resources/_modules.py +337 -0
  8. scitex/_mcp_resources/_session.py +149 -0
  9. scitex/_mcp_tools/__init__.py +4 -0
  10. scitex/_mcp_tools/audio.py +66 -0
  11. scitex/_mcp_tools/diagram.py +11 -95
  12. scitex/_mcp_tools/introspect.py +191 -0
  13. scitex/_mcp_tools/plt.py +260 -305
  14. scitex/_mcp_tools/scholar.py +74 -0
  15. scitex/_mcp_tools/social.py +244 -0
  16. scitex/_mcp_tools/writer.py +21 -204
  17. scitex/ai/_gen_ai/_PARAMS.py +10 -7
  18. scitex/ai/classification/reporters/_SingleClassificationReporter.py +45 -1603
  19. scitex/ai/classification/reporters/_mixins/__init__.py +36 -0
  20. scitex/ai/classification/reporters/_mixins/_constants.py +67 -0
  21. scitex/ai/classification/reporters/_mixins/_cv_summary.py +387 -0
  22. scitex/ai/classification/reporters/_mixins/_feature_importance.py +119 -0
  23. scitex/ai/classification/reporters/_mixins/_metrics.py +275 -0
  24. scitex/ai/classification/reporters/_mixins/_plotting.py +179 -0
  25. scitex/ai/classification/reporters/_mixins/_reports.py +153 -0
  26. scitex/ai/classification/reporters/_mixins/_storage.py +160 -0
  27. scitex/audio/README.md +40 -36
  28. scitex/audio/__init__.py +127 -59
  29. scitex/audio/_branding.py +185 -0
  30. scitex/audio/_mcp/__init__.py +32 -0
  31. scitex/audio/_mcp/handlers.py +59 -6
  32. scitex/audio/_mcp/speak_handlers.py +238 -0
  33. scitex/audio/_relay.py +225 -0
  34. scitex/audio/engines/elevenlabs_engine.py +6 -1
  35. scitex/audio/mcp_server.py +228 -75
  36. scitex/canvas/README.md +1 -1
  37. scitex/canvas/editor/_dearpygui/__init__.py +25 -0
  38. scitex/canvas/editor/_dearpygui/_editor.py +147 -0
  39. scitex/canvas/editor/_dearpygui/_handlers.py +476 -0
  40. scitex/canvas/editor/_dearpygui/_panels/__init__.py +17 -0
  41. scitex/canvas/editor/_dearpygui/_panels/_control.py +119 -0
  42. scitex/canvas/editor/_dearpygui/_panels/_element_controls.py +190 -0
  43. scitex/canvas/editor/_dearpygui/_panels/_preview.py +43 -0
  44. scitex/canvas/editor/_dearpygui/_panels/_sections.py +390 -0
  45. scitex/canvas/editor/_dearpygui/_plotting.py +187 -0
  46. scitex/canvas/editor/_dearpygui/_rendering.py +504 -0
  47. scitex/canvas/editor/_dearpygui/_selection.py +295 -0
  48. scitex/canvas/editor/_dearpygui/_state.py +93 -0
  49. scitex/canvas/editor/_dearpygui/_utils.py +61 -0
  50. scitex/canvas/editor/flask_editor/templates/__init__.py +32 -70
  51. scitex/cli/__init__.py +38 -43
  52. scitex/cli/audio.py +76 -27
  53. scitex/cli/capture.py +13 -20
  54. scitex/cli/introspect.py +443 -0
  55. scitex/cli/main.py +198 -109
  56. scitex/cli/mcp.py +60 -34
  57. scitex/cli/scholar/__init__.py +8 -0
  58. scitex/cli/scholar/_crossref_scitex.py +296 -0
  59. scitex/cli/scholar/_fetch.py +25 -3
  60. scitex/cli/social.py +314 -0
  61. scitex/cli/writer.py +117 -0
  62. scitex/config/README.md +1 -1
  63. scitex/config/__init__.py +16 -2
  64. scitex/config/_env_registry.py +191 -0
  65. scitex/diagram/__init__.py +42 -19
  66. scitex/diagram/mcp_server.py +13 -125
  67. scitex/introspect/__init__.py +75 -0
  68. scitex/introspect/_call_graph.py +303 -0
  69. scitex/introspect/_class_hierarchy.py +163 -0
  70. scitex/introspect/_core.py +42 -0
  71. scitex/introspect/_docstring.py +131 -0
  72. scitex/introspect/_examples.py +113 -0
  73. scitex/introspect/_imports.py +271 -0
  74. scitex/introspect/_mcp/__init__.py +37 -0
  75. scitex/introspect/_mcp/handlers.py +208 -0
  76. scitex/introspect/_members.py +151 -0
  77. scitex/introspect/_resolve.py +89 -0
  78. scitex/introspect/_signature.py +131 -0
  79. scitex/introspect/_source.py +80 -0
  80. scitex/introspect/_type_hints.py +172 -0
  81. scitex/io/bundle/README.md +1 -1
  82. scitex/mcp_server.py +98 -5
  83. scitex/plt/__init__.py +248 -550
  84. scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin/_wrappers.py +5 -10
  85. scitex/plt/docs/EXTERNAL_PACKAGE_BRANDING.md +149 -0
  86. scitex/plt/gallery/README.md +1 -1
  87. scitex/plt/utils/_hitmap/__init__.py +82 -0
  88. scitex/plt/utils/_hitmap/_artist_extraction.py +343 -0
  89. scitex/plt/utils/_hitmap/_color_application.py +346 -0
  90. scitex/plt/utils/_hitmap/_color_conversion.py +121 -0
  91. scitex/plt/utils/_hitmap/_constants.py +40 -0
  92. scitex/plt/utils/_hitmap/_hitmap_core.py +334 -0
  93. scitex/plt/utils/_hitmap/_path_extraction.py +357 -0
  94. scitex/plt/utils/_hitmap/_query.py +113 -0
  95. scitex/plt/utils/_hitmap.py +46 -1616
  96. scitex/plt/utils/_metadata/__init__.py +80 -0
  97. scitex/plt/utils/_metadata/_artists/__init__.py +25 -0
  98. scitex/plt/utils/_metadata/_artists/_base.py +195 -0
  99. scitex/plt/utils/_metadata/_artists/_collections.py +356 -0
  100. scitex/plt/utils/_metadata/_artists/_extract.py +57 -0
  101. scitex/plt/utils/_metadata/_artists/_images.py +80 -0
  102. scitex/plt/utils/_metadata/_artists/_lines.py +261 -0
  103. scitex/plt/utils/_metadata/_artists/_patches.py +247 -0
  104. scitex/plt/utils/_metadata/_artists/_text.py +106 -0
  105. scitex/plt/utils/_metadata/_csv.py +416 -0
  106. scitex/plt/utils/_metadata/_detect.py +225 -0
  107. scitex/plt/utils/_metadata/_legend.py +127 -0
  108. scitex/plt/utils/_metadata/_rounding.py +117 -0
  109. scitex/plt/utils/_metadata/_verification.py +202 -0
  110. scitex/schema/README.md +1 -1
  111. scitex/scholar/__init__.py +8 -0
  112. scitex/scholar/_mcp/crossref_handlers.py +265 -0
  113. scitex/scholar/core/Scholar.py +63 -1700
  114. scitex/scholar/core/_mixins/__init__.py +36 -0
  115. scitex/scholar/core/_mixins/_enrichers.py +270 -0
  116. scitex/scholar/core/_mixins/_library_handlers.py +100 -0
  117. scitex/scholar/core/_mixins/_loaders.py +103 -0
  118. scitex/scholar/core/_mixins/_pdf_download.py +375 -0
  119. scitex/scholar/core/_mixins/_pipeline.py +312 -0
  120. scitex/scholar/core/_mixins/_project_handlers.py +125 -0
  121. scitex/scholar/core/_mixins/_savers.py +69 -0
  122. scitex/scholar/core/_mixins/_search.py +103 -0
  123. scitex/scholar/core/_mixins/_services.py +88 -0
  124. scitex/scholar/core/_mixins/_url_finding.py +105 -0
  125. scitex/scholar/crossref_scitex.py +367 -0
  126. scitex/scholar/docs/EXTERNAL_PACKAGE_BRANDING.md +149 -0
  127. scitex/scholar/examples/00_run_all.sh +120 -0
  128. scitex/scholar/jobs/_executors.py +27 -3
  129. scitex/scholar/pdf_download/ScholarPDFDownloader.py +38 -416
  130. scitex/scholar/pdf_download/_cli.py +154 -0
  131. scitex/scholar/pdf_download/strategies/__init__.py +11 -8
  132. scitex/scholar/pdf_download/strategies/manual_download_fallback.py +80 -3
  133. scitex/scholar/pipelines/ScholarPipelineBibTeX.py +73 -121
  134. scitex/scholar/pipelines/ScholarPipelineParallel.py +80 -138
  135. scitex/scholar/pipelines/ScholarPipelineSingle.py +43 -63
  136. scitex/scholar/pipelines/_single_steps.py +71 -36
  137. scitex/scholar/storage/_LibraryManager.py +97 -1695
  138. scitex/scholar/storage/_mixins/__init__.py +30 -0
  139. scitex/scholar/storage/_mixins/_bibtex_handlers.py +128 -0
  140. scitex/scholar/storage/_mixins/_library_operations.py +218 -0
  141. scitex/scholar/storage/_mixins/_metadata_conversion.py +226 -0
  142. scitex/scholar/storage/_mixins/_paper_saving.py +456 -0
  143. scitex/scholar/storage/_mixins/_resolution.py +376 -0
  144. scitex/scholar/storage/_mixins/_storage_helpers.py +121 -0
  145. scitex/scholar/storage/_mixins/_symlink_handlers.py +226 -0
  146. scitex/scholar/url_finder/.tmp/open_url/KNOWN_RESOLVERS.py +462 -0
  147. scitex/scholar/url_finder/.tmp/open_url/README.md +223 -0
  148. scitex/scholar/url_finder/.tmp/open_url/_DOIToURLResolver.py +694 -0
  149. scitex/scholar/url_finder/.tmp/open_url/_OpenURLResolver.py +1160 -0
  150. scitex/scholar/url_finder/.tmp/open_url/_ResolverLinkFinder.py +344 -0
  151. scitex/scholar/url_finder/.tmp/open_url/__init__.py +24 -0
  152. scitex/security/README.md +3 -3
  153. scitex/session/README.md +1 -1
  154. scitex/sh/README.md +1 -1
  155. scitex/social/__init__.py +153 -0
  156. scitex/social/docs/EXTERNAL_PACKAGE_BRANDING.md +149 -0
  157. scitex/template/README.md +1 -1
  158. scitex/template/clone_writer_directory.py +5 -5
  159. scitex/writer/README.md +1 -1
  160. scitex/writer/_mcp/handlers.py +11 -744
  161. scitex/writer/_mcp/tool_schemas.py +5 -335
  162. scitex-2.15.1.dist-info/METADATA +648 -0
  163. {scitex-2.14.0.dist-info → scitex-2.15.1.dist-info}/RECORD +166 -111
  164. scitex/canvas/editor/flask_editor/templates/_scripts.py +0 -4933
  165. scitex/canvas/editor/flask_editor/templates/_styles.py +0 -1658
  166. scitex/dev/plt/data/mpl/PLOTTING_FUNCTIONS.yaml +0 -90
  167. scitex/dev/plt/data/mpl/PLOTTING_SIGNATURES.yaml +0 -1571
  168. scitex/dev/plt/data/mpl/PLOTTING_SIGNATURES_DETAILED.yaml +0 -6262
  169. scitex/dev/plt/data/mpl/SIGNATURES_FLATTENED.yaml +0 -1274
  170. scitex/dev/plt/data/mpl/dir_ax.txt +0 -459
  171. scitex/diagram/_compile.py +0 -312
  172. scitex/diagram/_diagram.py +0 -355
  173. scitex/diagram/_mcp/__init__.py +0 -4
  174. scitex/diagram/_mcp/handlers.py +0 -400
  175. scitex/diagram/_mcp/tool_schemas.py +0 -157
  176. scitex/diagram/_presets.py +0 -173
  177. scitex/diagram/_schema.py +0 -182
  178. scitex/diagram/_split.py +0 -278
  179. scitex/plt/_mcp/__init__.py +0 -4
  180. scitex/plt/_mcp/_handlers_annotation.py +0 -102
  181. scitex/plt/_mcp/_handlers_figure.py +0 -195
  182. scitex/plt/_mcp/_handlers_plot.py +0 -252
  183. scitex/plt/_mcp/_handlers_style.py +0 -219
  184. scitex/plt/_mcp/handlers.py +0 -74
  185. scitex/plt/_mcp/tool_schemas.py +0 -497
  186. scitex/plt/mcp_server.py +0 -231
  187. scitex/scholar/data/.gitkeep +0 -0
  188. scitex/scholar/data/README.md +0 -44
  189. scitex/scholar/data/bib_files/bibliography.bib +0 -1952
  190. scitex/scholar/data/bib_files/neurovista.bib +0 -277
  191. scitex/scholar/data/bib_files/neurovista_enriched.bib +0 -441
  192. scitex/scholar/data/bib_files/neurovista_enriched_enriched.bib +0 -441
  193. scitex/scholar/data/bib_files/neurovista_processed.bib +0 -338
  194. scitex/scholar/data/bib_files/openaccess.bib +0 -89
  195. scitex/scholar/data/bib_files/pac-seizure_prediction_enriched.bib +0 -2178
  196. scitex/scholar/data/bib_files/pac.bib +0 -698
  197. scitex/scholar/data/bib_files/pac_enriched.bib +0 -1061
  198. scitex/scholar/data/bib_files/pac_processed.bib +0 -0
  199. scitex/scholar/data/bib_files/pac_titles.txt +0 -75
  200. scitex/scholar/data/bib_files/paywalled.bib +0 -98
  201. scitex/scholar/data/bib_files/related-papers-by-coauthors.bib +0 -58
  202. scitex/scholar/data/bib_files/related-papers-by-coauthors_enriched.bib +0 -87
  203. scitex/scholar/data/bib_files/seizure_prediction.bib +0 -694
  204. scitex/scholar/data/bib_files/seizure_prediction_processed.bib +0 -0
  205. scitex/scholar/data/bib_files/test_complete_enriched.bib +0 -437
  206. scitex/scholar/data/bib_files/test_final_enriched.bib +0 -437
  207. scitex/scholar/data/bib_files/test_seizure.bib +0 -46
  208. scitex/scholar/data/impact_factor/JCR_IF_2022.xlsx +0 -0
  209. scitex/scholar/data/impact_factor/JCR_IF_2024.db +0 -0
  210. scitex/scholar/data/impact_factor/JCR_IF_2024.xlsx +0 -0
  211. scitex/scholar/data/impact_factor/JCR_IF_2024_v01.db +0 -0
  212. scitex/scholar/data/impact_factor.db +0 -0
  213. scitex/scholar/examples/SUGGESTIONS.md +0 -865
  214. scitex/scholar/examples/dev.py +0 -38
  215. scitex-2.14.0.dist-info/METADATA +0 -1238
  216. {scitex-2.14.0.dist-info → scitex-2.15.1.dist-info}/WHEEL +0 -0
  217. {scitex-2.14.0.dist-info → scitex-2.15.1.dist-info}/entry_points.txt +0 -0
  218. {scitex-2.14.0.dist-info → scitex-2.15.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,497 +0,0 @@
1
- #!/usr/bin/env python3
2
- # Timestamp: 2026-01-08
3
- # File: src/scitex/plt/_mcp.tool_schemas.py
4
- # ----------------------------------------
5
-
6
- """
7
- MCP Tool schemas for SciTeX plt module.
8
-
9
- Defines tools for publication-quality plotting:
10
- - get_style: Get current style configuration
11
- - set_style: Set global style overrides
12
- - list_presets: List available style presets
13
- - create_figure: Create figure with publication style
14
- - crop_figure: Auto-crop figure whitespace
15
- """
16
-
17
- from __future__ import annotations
18
-
19
- import mcp.types as types
20
-
21
-
22
- def get_tool_schemas() -> list[types.Tool]:
23
- """Return list of available MCP tools for plt operations."""
24
- return [
25
- # Get current style
26
- types.Tool(
27
- name="get_style",
28
- description="Get current SciTeX publication style configuration with all parameters (axes dimensions, fonts, margins, etc.)",
29
- inputSchema={
30
- "type": "object",
31
- "properties": {},
32
- "required": [],
33
- },
34
- ),
35
- # Set style
36
- types.Tool(
37
- name="set_style",
38
- description="Set global style overrides for publication figures. Parameters like axes_width_mm, margin_left_mm, font sizes, etc.",
39
- inputSchema={
40
- "type": "object",
41
- "properties": {
42
- "axes_width_mm": {
43
- "type": "number",
44
- "description": "Axes width in millimeters (default: 40)",
45
- },
46
- "axes_height_mm": {
47
- "type": "number",
48
- "description": "Axes height in millimeters (default: 28)",
49
- },
50
- "margin_left_mm": {
51
- "type": "number",
52
- "description": "Left margin in millimeters (default: 20)",
53
- },
54
- "margin_right_mm": {
55
- "type": "number",
56
- "description": "Right margin in millimeters (default: 20)",
57
- },
58
- "margin_top_mm": {
59
- "type": "number",
60
- "description": "Top margin in millimeters (default: 20)",
61
- },
62
- "margin_bottom_mm": {
63
- "type": "number",
64
- "description": "Bottom margin in millimeters (default: 20)",
65
- },
66
- "dpi": {
67
- "type": "integer",
68
- "description": "Output resolution in DPI (default: 300)",
69
- },
70
- "axis_font_size_pt": {
71
- "type": "number",
72
- "description": "Axis label font size in points (default: 7)",
73
- },
74
- "tick_font_size_pt": {
75
- "type": "number",
76
- "description": "Tick label font size in points (default: 7)",
77
- },
78
- "title_font_size_pt": {
79
- "type": "number",
80
- "description": "Title font size in points (default: 8)",
81
- },
82
- "legend_font_size_pt": {
83
- "type": "number",
84
- "description": "Legend font size in points (default: 6)",
85
- },
86
- "trace_thickness_mm": {
87
- "type": "number",
88
- "description": "Line trace thickness in mm (default: 0.2)",
89
- },
90
- "reset": {
91
- "type": "boolean",
92
- "description": "If true, reset style to defaults before applying",
93
- },
94
- },
95
- "required": [],
96
- },
97
- ),
98
- # List presets
99
- types.Tool(
100
- name="list_presets",
101
- description="List available publication style presets (e.g., Nature, Science journal styles)",
102
- inputSchema={
103
- "type": "object",
104
- "properties": {},
105
- "required": [],
106
- },
107
- ),
108
- # Crop figure
109
- types.Tool(
110
- name="crop_figure",
111
- description="Auto-crop whitespace from a saved figure image",
112
- inputSchema={
113
- "type": "object",
114
- "properties": {
115
- "input_path": {
116
- "type": "string",
117
- "description": "Path to the input figure image",
118
- },
119
- "output_path": {
120
- "type": "string",
121
- "description": "Output path (optional, adds '_cropped' suffix if not provided)",
122
- },
123
- "margin": {
124
- "type": "integer",
125
- "description": "Margin in pixels around content (default: 12, ~1mm at 300 DPI)",
126
- "default": 12,
127
- },
128
- "overwrite": {
129
- "type": "boolean",
130
- "description": "Overwrite input file (default: false)",
131
- "default": False,
132
- },
133
- },
134
- "required": ["input_path"],
135
- },
136
- ),
137
- # Get DPI settings
138
- types.Tool(
139
- name="get_dpi_settings",
140
- description="Get DPI settings for different output contexts (save, display, preview)",
141
- inputSchema={
142
- "type": "object",
143
- "properties": {},
144
- "required": [],
145
- },
146
- ),
147
- # Get color palette
148
- types.Tool(
149
- name="get_color_palette",
150
- description="Get the SciTeX color palette for consistent figure colors",
151
- inputSchema={
152
- "type": "object",
153
- "properties": {
154
- "format": {
155
- "type": "string",
156
- "description": "Color format to return",
157
- "enum": ["hex", "rgb", "rgba"],
158
- "default": "hex",
159
- },
160
- },
161
- "required": [],
162
- },
163
- ),
164
- # =================================================================
165
- # PLOTTING TOOLS - Create publication figures via MCP
166
- # =================================================================
167
- # Create multi-panel figure
168
- types.Tool(
169
- name="create_figure",
170
- description="Create a multi-panel figure canvas with SciTeX style. Returns figure_id for subsequent plotting.",
171
- inputSchema={
172
- "type": "object",
173
- "properties": {
174
- "nrows": {
175
- "type": "integer",
176
- "description": "Number of rows (default: 1)",
177
- "default": 1,
178
- },
179
- "ncols": {
180
- "type": "integer",
181
- "description": "Number of columns (default: 1)",
182
- "default": 1,
183
- },
184
- "axes_width_mm": {
185
- "type": "number",
186
- "description": "Width of each axes in mm (default: 40)",
187
- "default": 40,
188
- },
189
- "axes_height_mm": {
190
- "type": "number",
191
- "description": "Height of each axes in mm (default: 28)",
192
- "default": 28,
193
- },
194
- "space_w_mm": {
195
- "type": "number",
196
- "description": "Horizontal spacing between panels in mm (default: 8 from style)",
197
- },
198
- "space_h_mm": {
199
- "type": "number",
200
- "description": "Vertical spacing between panels in mm (default: 10 from style)",
201
- },
202
- },
203
- "required": [],
204
- },
205
- ),
206
- # Bar plot
207
- types.Tool(
208
- name="plot_bar",
209
- description="Create a bar plot on specified panel",
210
- inputSchema={
211
- "type": "object",
212
- "properties": {
213
- "figure_id": {
214
- "type": "string",
215
- "description": "Figure ID from create_figure (uses current if not specified)",
216
- },
217
- "panel": {
218
- "type": "string",
219
- "description": "Panel index as 'row,col' e.g. '0,0' or panel label e.g. 'A' (default: '0,0')",
220
- "default": "0,0",
221
- },
222
- "x": {
223
- "type": "array",
224
- "items": {"type": "string"},
225
- "description": "X-axis labels/categories",
226
- },
227
- "y": {
228
- "type": "array",
229
- "items": {"type": "number"},
230
- "description": "Y-axis values (heights)",
231
- },
232
- "yerr": {
233
- "type": "array",
234
- "items": {"type": "number"},
235
- "description": "Error bar values (optional)",
236
- },
237
- "colors": {
238
- "type": "array",
239
- "items": {"type": "string"},
240
- "description": "Bar colors (optional, uses palette)",
241
- },
242
- "xlabel": {"type": "string", "description": "X-axis label"},
243
- "ylabel": {"type": "string", "description": "Y-axis label"},
244
- "title": {"type": "string", "description": "Panel title"},
245
- },
246
- "required": ["x", "y"],
247
- },
248
- ),
249
- # Scatter plot
250
- types.Tool(
251
- name="plot_scatter",
252
- description="Create a scatter plot on specified panel",
253
- inputSchema={
254
- "type": "object",
255
- "properties": {
256
- "figure_id": {"type": "string", "description": "Figure ID"},
257
- "panel": {"type": "string", "default": "0,0"},
258
- "x": {
259
- "type": "array",
260
- "items": {"type": "number"},
261
- "description": "X values",
262
- },
263
- "y": {
264
- "type": "array",
265
- "items": {"type": "number"},
266
- "description": "Y values",
267
- },
268
- "color": {"type": "string", "description": "Point color"},
269
- "size": {"type": "number", "description": "Point size in mm"},
270
- "alpha": {"type": "number", "description": "Transparency (0-1)"},
271
- "add_regression": {
272
- "type": "boolean",
273
- "description": "Add regression line",
274
- "default": False,
275
- },
276
- "xlabel": {"type": "string"},
277
- "ylabel": {"type": "string"},
278
- "title": {"type": "string"},
279
- },
280
- "required": ["x", "y"],
281
- },
282
- ),
283
- # Line plot
284
- types.Tool(
285
- name="plot_line",
286
- description="Create a line plot on specified panel",
287
- inputSchema={
288
- "type": "object",
289
- "properties": {
290
- "figure_id": {"type": "string"},
291
- "panel": {"type": "string", "default": "0,0"},
292
- "x": {
293
- "type": "array",
294
- "items": {"type": "number"},
295
- "description": "X values",
296
- },
297
- "y": {
298
- "type": "array",
299
- "items": {"type": "number"},
300
- "description": "Y values",
301
- },
302
- "yerr": {
303
- "type": "array",
304
- "items": {"type": "number"},
305
- "description": "Y error values for shaded region",
306
- },
307
- "color": {"type": "string"},
308
- "label": {"type": "string", "description": "Legend label"},
309
- "linestyle": {
310
- "type": "string",
311
- "enum": ["-", "--", ":", "-."],
312
- "default": "-",
313
- },
314
- "xlabel": {"type": "string"},
315
- "ylabel": {"type": "string"},
316
- "title": {"type": "string"},
317
- },
318
- "required": ["x", "y"],
319
- },
320
- ),
321
- # Box plot
322
- types.Tool(
323
- name="plot_box",
324
- description="Create a box plot on specified panel",
325
- inputSchema={
326
- "type": "object",
327
- "properties": {
328
- "figure_id": {"type": "string"},
329
- "panel": {"type": "string", "default": "0,0"},
330
- "data": {
331
- "type": "array",
332
- "items": {"type": "array", "items": {"type": "number"}},
333
- "description": "List of data arrays, one per group",
334
- },
335
- "labels": {
336
- "type": "array",
337
- "items": {"type": "string"},
338
- "description": "Group labels",
339
- },
340
- "colors": {
341
- "type": "array",
342
- "items": {"type": "string"},
343
- "description": "Box colors",
344
- },
345
- "xlabel": {"type": "string"},
346
- "ylabel": {"type": "string"},
347
- "title": {"type": "string"},
348
- },
349
- "required": ["data"],
350
- },
351
- ),
352
- # Violin plot
353
- types.Tool(
354
- name="plot_violin",
355
- description="Create a violin plot on specified panel",
356
- inputSchema={
357
- "type": "object",
358
- "properties": {
359
- "figure_id": {"type": "string"},
360
- "panel": {"type": "string", "default": "0,0"},
361
- "data": {
362
- "type": "array",
363
- "items": {"type": "array", "items": {"type": "number"}},
364
- "description": "List of data arrays, one per group",
365
- },
366
- "labels": {
367
- "type": "array",
368
- "items": {"type": "string"},
369
- },
370
- "colors": {
371
- "type": "array",
372
- "items": {"type": "string"},
373
- },
374
- "xlabel": {"type": "string"},
375
- "ylabel": {"type": "string"},
376
- "title": {"type": "string"},
377
- },
378
- "required": ["data"],
379
- },
380
- ),
381
- # Add significance bracket
382
- types.Tool(
383
- name="add_significance",
384
- description="Add significance bracket between two groups",
385
- inputSchema={
386
- "type": "object",
387
- "properties": {
388
- "figure_id": {"type": "string"},
389
- "panel": {"type": "string", "default": "0,0"},
390
- "x1": {
391
- "type": "number",
392
- "description": "X position of first group (0-indexed)",
393
- },
394
- "x2": {
395
- "type": "number",
396
- "description": "X position of second group",
397
- },
398
- "y": {
399
- "type": "number",
400
- "description": "Y position of bracket base",
401
- },
402
- "text": {
403
- "type": "string",
404
- "description": "Significance text: '*', '**', '***', 'n.s.', or p-value",
405
- },
406
- "height": {
407
- "type": "number",
408
- "description": "Bracket height (auto if not specified)",
409
- },
410
- },
411
- "required": ["x1", "x2", "y", "text"],
412
- },
413
- ),
414
- # Add panel label
415
- types.Tool(
416
- name="add_panel_label",
417
- description="Add panel label (A, B, C, etc.) to a panel",
418
- inputSchema={
419
- "type": "object",
420
- "properties": {
421
- "figure_id": {"type": "string"},
422
- "panel": {"type": "string", "default": "0,0"},
423
- "label": {
424
- "type": "string",
425
- "description": "Label text (e.g., 'A', 'B')",
426
- },
427
- "x": {
428
- "type": "number",
429
- "description": "X position in axes coordinates (default: -0.15)",
430
- "default": -0.15,
431
- },
432
- "y": {
433
- "type": "number",
434
- "description": "Y position in axes coordinates (default: 1.1)",
435
- "default": 1.1,
436
- },
437
- "fontsize": {
438
- "type": "number",
439
- "description": "Font size in points (default: 10)",
440
- "default": 10,
441
- },
442
- "fontweight": {
443
- "type": "string",
444
- "enum": ["normal", "bold"],
445
- "default": "bold",
446
- },
447
- },
448
- "required": ["label"],
449
- },
450
- ),
451
- # Save figure
452
- types.Tool(
453
- name="save_figure",
454
- description="Save the current figure to file",
455
- inputSchema={
456
- "type": "object",
457
- "properties": {
458
- "figure_id": {"type": "string"},
459
- "output_path": {
460
- "type": "string",
461
- "description": "Output file path (supports .png, .pdf, .svg)",
462
- },
463
- "dpi": {
464
- "type": "integer",
465
- "description": "Resolution (default: 300)",
466
- "default": 300,
467
- },
468
- "crop": {
469
- "type": "boolean",
470
- "description": "Auto-crop whitespace (default: true)",
471
- "default": True,
472
- },
473
- },
474
- "required": ["output_path"],
475
- },
476
- ),
477
- # Close figure
478
- types.Tool(
479
- name="close_figure",
480
- description="Close a figure and free memory",
481
- inputSchema={
482
- "type": "object",
483
- "properties": {
484
- "figure_id": {
485
- "type": "string",
486
- "description": "Figure ID to close (closes current if not specified)",
487
- },
488
- },
489
- "required": [],
490
- },
491
- ),
492
- ]
493
-
494
-
495
- __all__ = ["get_tool_schemas"]
496
-
497
- # EOF