gfp-mcp 0.2.1__py3-none-any.whl → 0.3.2__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.
- {mcp_standalone → gfp_mcp}/__init__.py +10 -8
- {mcp_standalone → gfp_mcp}/client.py +57 -33
- gfp_mcp/config.py +161 -0
- {mcp_standalone → gfp_mcp}/registry.py +0 -4
- gfp_mcp/render.py +139 -0
- {mcp_standalone → gfp_mcp}/resources.py +0 -3
- gfp_mcp/samples.py +206 -0
- gfp_mcp/server.py +235 -0
- gfp_mcp/tools/__init__.py +134 -0
- gfp_mcp/tools/base.py +235 -0
- gfp_mcp/tools/bbox.py +115 -0
- gfp_mcp/tools/build.py +159 -0
- gfp_mcp/tools/cells.py +103 -0
- gfp_mcp/tools/connectivity.py +70 -0
- gfp_mcp/tools/drc.py +379 -0
- gfp_mcp/tools/freeze.py +82 -0
- gfp_mcp/tools/lvs.py +86 -0
- gfp_mcp/tools/pdk.py +47 -0
- gfp_mcp/tools/port.py +82 -0
- gfp_mcp/tools/project.py +160 -0
- gfp_mcp/tools/samples.py +215 -0
- gfp_mcp/tools/simulation.py +153 -0
- gfp_mcp/utils.py +55 -0
- {gfp_mcp-0.2.1.dist-info → gfp_mcp-0.3.2.dist-info}/METADATA +37 -8
- gfp_mcp-0.3.2.dist-info/RECORD +29 -0
- gfp_mcp-0.3.2.dist-info/entry_points.txt +2 -0
- gfp_mcp-0.3.2.dist-info/top_level.txt +1 -0
- gfp_mcp-0.2.1.dist-info/RECORD +0 -14
- gfp_mcp-0.2.1.dist-info/entry_points.txt +0 -2
- gfp_mcp-0.2.1.dist-info/top_level.txt +0 -1
- mcp_standalone/config.py +0 -56
- mcp_standalone/mappings.py +0 -386
- mcp_standalone/server.py +0 -294
- mcp_standalone/tools.py +0 -530
- {gfp_mcp-0.2.1.dist-info → gfp_mcp-0.3.2.dist-info}/WHEEL +0 -0
- {gfp_mcp-0.2.1.dist-info → gfp_mcp-0.3.2.dist-info}/licenses/LICENSE +0 -0
mcp_standalone/tools.py
DELETED
|
@@ -1,530 +0,0 @@
|
|
|
1
|
-
"""MCP tool definitions for GDSFactory+.
|
|
2
|
-
|
|
3
|
-
This module defines the MCP tools that are exposed to AI assistants.
|
|
4
|
-
Tools are organized by functionality and phase of implementation.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
|
|
9
|
-
from mcp.types import Tool
|
|
10
|
-
|
|
11
|
-
__all__ = [
|
|
12
|
-
"TOOLS",
|
|
13
|
-
"get_all_tools",
|
|
14
|
-
"get_tool_by_name",
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
# Project discovery tools (for multi-project support)
|
|
19
|
-
PROJECT_TOOLS: list[Tool] = [
|
|
20
|
-
Tool(
|
|
21
|
-
name="list_projects",
|
|
22
|
-
description=(
|
|
23
|
-
"List all active GDSFactory+ projects. Returns information about "
|
|
24
|
-
"all running servers including project name, path, port, PID, and PDK. "
|
|
25
|
-
"Use this to discover which projects are available for interaction."
|
|
26
|
-
),
|
|
27
|
-
inputSchema={
|
|
28
|
-
"type": "object",
|
|
29
|
-
"properties": {},
|
|
30
|
-
},
|
|
31
|
-
),
|
|
32
|
-
Tool(
|
|
33
|
-
name="get_project_info",
|
|
34
|
-
description=(
|
|
35
|
-
"Get detailed information about a specific project. Returns metadata "
|
|
36
|
-
"including project name, path, port, PID, PDK, and version. "
|
|
37
|
-
"Use this to get information about a running project."
|
|
38
|
-
),
|
|
39
|
-
inputSchema={
|
|
40
|
-
"type": "object",
|
|
41
|
-
"properties": {
|
|
42
|
-
"project": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"description": (
|
|
45
|
-
"Project name or path. Can be the project directory name "
|
|
46
|
-
"or full path."
|
|
47
|
-
),
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
"required": ["project"],
|
|
51
|
-
},
|
|
52
|
-
),
|
|
53
|
-
]
|
|
54
|
-
|
|
55
|
-
# Standard optional project parameter for all tools
|
|
56
|
-
PROJECT_PARAM_SCHEMA = {
|
|
57
|
-
"project": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"description": (
|
|
60
|
-
"Optional project name or path to route this request to a specific "
|
|
61
|
-
"server. If not provided, routes to the default server. "
|
|
62
|
-
"Use list_projects to see available projects."
|
|
63
|
-
),
|
|
64
|
-
},
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
def _add_project_param(schema: dict) -> dict:
|
|
69
|
-
"""Add optional project parameter to a tool schema.
|
|
70
|
-
|
|
71
|
-
Args:
|
|
72
|
-
schema: Original input schema
|
|
73
|
-
|
|
74
|
-
Returns:
|
|
75
|
-
Schema with project parameter added
|
|
76
|
-
"""
|
|
77
|
-
if "properties" not in schema:
|
|
78
|
-
schema["properties"] = {}
|
|
79
|
-
schema["properties"].update(PROJECT_PARAM_SCHEMA)
|
|
80
|
-
return schema
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
# Phase 1: Core Building Tools (5 tools)
|
|
84
|
-
CORE_TOOLS: list[Tool] = [
|
|
85
|
-
Tool(
|
|
86
|
-
name="build_cell",
|
|
87
|
-
description=(
|
|
88
|
-
"Build a single GDS cell by name. This creates the physical layout "
|
|
89
|
-
"file (.gds) for a photonic component. The build happens in the "
|
|
90
|
-
"background and the GDS file will be saved to the project build "
|
|
91
|
-
"directory."
|
|
92
|
-
),
|
|
93
|
-
inputSchema=_add_project_param(
|
|
94
|
-
{
|
|
95
|
-
"type": "object",
|
|
96
|
-
"properties": {
|
|
97
|
-
"name": {
|
|
98
|
-
"type": "string",
|
|
99
|
-
"description": "Name of the cell/component to build",
|
|
100
|
-
},
|
|
101
|
-
"with_metadata": {
|
|
102
|
-
"type": "boolean",
|
|
103
|
-
"description": (
|
|
104
|
-
"Include metadata in the GDS file (default: true)"
|
|
105
|
-
),
|
|
106
|
-
"default": True,
|
|
107
|
-
},
|
|
108
|
-
"register": {
|
|
109
|
-
"type": "boolean",
|
|
110
|
-
"description": (
|
|
111
|
-
"Re-register the cell in the KLayout cache (default: true)"
|
|
112
|
-
),
|
|
113
|
-
"default": True,
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
"required": ["name"],
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
),
|
|
120
|
-
Tool(
|
|
121
|
-
name="build_cells",
|
|
122
|
-
description=(
|
|
123
|
-
"Build multiple GDS cells by name in one operation. This is more "
|
|
124
|
-
"efficient than building cells one at a time. All cells are built "
|
|
125
|
-
"in the background and saved to the project build directory."
|
|
126
|
-
),
|
|
127
|
-
inputSchema=_add_project_param(
|
|
128
|
-
{
|
|
129
|
-
"type": "object",
|
|
130
|
-
"properties": {
|
|
131
|
-
"names": {
|
|
132
|
-
"type": "array",
|
|
133
|
-
"items": {"type": "string"},
|
|
134
|
-
"description": "List of cell/component names to build",
|
|
135
|
-
},
|
|
136
|
-
"with_metadata": {
|
|
137
|
-
"type": "boolean",
|
|
138
|
-
"description": (
|
|
139
|
-
"Include metadata in the GDS files (default: true)"
|
|
140
|
-
),
|
|
141
|
-
"default": True,
|
|
142
|
-
},
|
|
143
|
-
"register": {
|
|
144
|
-
"type": "boolean",
|
|
145
|
-
"description": (
|
|
146
|
-
"Re-register the cells in the KLayout cache (default: true)"
|
|
147
|
-
),
|
|
148
|
-
"default": True,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
"required": ["names"],
|
|
152
|
-
}
|
|
153
|
-
),
|
|
154
|
-
),
|
|
155
|
-
Tool(
|
|
156
|
-
name="list_cells",
|
|
157
|
-
description=(
|
|
158
|
-
"List all available cells/components that can be built. Returns "
|
|
159
|
-
"the names of all registered component factories in the current PDK. "
|
|
160
|
-
"Use this to discover what components are available before building."
|
|
161
|
-
),
|
|
162
|
-
inputSchema=_add_project_param(
|
|
163
|
-
{
|
|
164
|
-
"type": "object",
|
|
165
|
-
"properties": {},
|
|
166
|
-
}
|
|
167
|
-
),
|
|
168
|
-
),
|
|
169
|
-
Tool(
|
|
170
|
-
name="get_cell_info",
|
|
171
|
-
description=(
|
|
172
|
-
"Get detailed information about a specific cell/component. Returns "
|
|
173
|
-
"metadata including the source file, parameters, and other details "
|
|
174
|
-
"about the component factory."
|
|
175
|
-
),
|
|
176
|
-
inputSchema=_add_project_param(
|
|
177
|
-
{
|
|
178
|
-
"type": "object",
|
|
179
|
-
"properties": {
|
|
180
|
-
"name": {
|
|
181
|
-
"type": "string",
|
|
182
|
-
"description": "Name of the cell/component to get info about",
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
"required": ["name"],
|
|
186
|
-
}
|
|
187
|
-
),
|
|
188
|
-
),
|
|
189
|
-
Tool(
|
|
190
|
-
name="download_gds",
|
|
191
|
-
description=(
|
|
192
|
-
"Download a GDS file from the project build directory. Returns the "
|
|
193
|
-
"file path to the downloaded GDS file. The file must have been "
|
|
194
|
-
"previously built using build_cell or build_cells."
|
|
195
|
-
),
|
|
196
|
-
inputSchema=_add_project_param(
|
|
197
|
-
{
|
|
198
|
-
"type": "object",
|
|
199
|
-
"properties": {
|
|
200
|
-
"path": {
|
|
201
|
-
"type": "string",
|
|
202
|
-
"description": (
|
|
203
|
-
"Relative path to the GDS file (without .gds extension). "
|
|
204
|
-
"For example, 'mzi' or 'components/coupler'"
|
|
205
|
-
),
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
"required": ["path"],
|
|
209
|
-
}
|
|
210
|
-
),
|
|
211
|
-
),
|
|
212
|
-
]
|
|
213
|
-
|
|
214
|
-
# Phase 2: Verification Tools
|
|
215
|
-
VERIFICATION_TOOLS: list[Tool] = [
|
|
216
|
-
Tool(
|
|
217
|
-
name="check_drc",
|
|
218
|
-
description=(
|
|
219
|
-
"Run a full DRC (Design Rule Check) on a GDS file. This uploads "
|
|
220
|
-
"the file to a remote DRC server and runs comprehensive design rule "
|
|
221
|
-
"verification for the specified PDK and process. Use this for "
|
|
222
|
-
"complete design rule validation. Returns XML results showing all "
|
|
223
|
-
"DRC violations."
|
|
224
|
-
),
|
|
225
|
-
inputSchema=_add_project_param(
|
|
226
|
-
{
|
|
227
|
-
"type": "object",
|
|
228
|
-
"properties": {
|
|
229
|
-
"path": {
|
|
230
|
-
"type": "string",
|
|
231
|
-
"description": (
|
|
232
|
-
"Path to the GDS file to check. Can be absolute or "
|
|
233
|
-
"relative to the project directory."
|
|
234
|
-
),
|
|
235
|
-
},
|
|
236
|
-
"pdk": {
|
|
237
|
-
"type": "string",
|
|
238
|
-
"description": (
|
|
239
|
-
"PDK to use for the check. If not specified, uses the "
|
|
240
|
-
"default PDK from settings."
|
|
241
|
-
),
|
|
242
|
-
},
|
|
243
|
-
"process": {
|
|
244
|
-
"type": "string",
|
|
245
|
-
"description": (
|
|
246
|
-
"Process variant for DRC rules. If not specified, uses "
|
|
247
|
-
"the default process from settings."
|
|
248
|
-
),
|
|
249
|
-
},
|
|
250
|
-
"timeout": {
|
|
251
|
-
"type": "integer",
|
|
252
|
-
"description": (
|
|
253
|
-
"Timeout in seconds for the DRC check. If not specified, "
|
|
254
|
-
"uses the default timeout from settings."
|
|
255
|
-
),
|
|
256
|
-
},
|
|
257
|
-
"host": {
|
|
258
|
-
"type": "string",
|
|
259
|
-
"description": (
|
|
260
|
-
"API host for the DRC server. If not specified, uses "
|
|
261
|
-
"the default host from settings."
|
|
262
|
-
),
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
"required": ["path"],
|
|
266
|
-
}
|
|
267
|
-
),
|
|
268
|
-
),
|
|
269
|
-
Tool(
|
|
270
|
-
name="check_connectivity",
|
|
271
|
-
description=(
|
|
272
|
-
"Run a local connectivity check on a GDS file. This verifies that "
|
|
273
|
-
"all layers are properly connected and identifies any connectivity "
|
|
274
|
-
"violations. This is a fast, local check (does not require uploading "
|
|
275
|
-
"to a remote server). Use this to quickly check for disconnected "
|
|
276
|
-
"components. Returns XML results showing connectivity issues."
|
|
277
|
-
),
|
|
278
|
-
inputSchema=_add_project_param(
|
|
279
|
-
{
|
|
280
|
-
"type": "object",
|
|
281
|
-
"properties": {
|
|
282
|
-
"path": {
|
|
283
|
-
"type": "string",
|
|
284
|
-
"description": (
|
|
285
|
-
"Path to the GDS file to check. Can be absolute or "
|
|
286
|
-
"relative to the project directory."
|
|
287
|
-
),
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
"required": ["path"],
|
|
291
|
-
}
|
|
292
|
-
),
|
|
293
|
-
),
|
|
294
|
-
Tool(
|
|
295
|
-
name="check_lvs",
|
|
296
|
-
description=(
|
|
297
|
-
"Run LVS (Layout vs. Schematic) verification on a cell against a "
|
|
298
|
-
"reference netlist. This compares the physical layout to the "
|
|
299
|
-
"schematic representation to ensure they match. Returns XML results "
|
|
300
|
-
"showing any mismatches between layout and schematic."
|
|
301
|
-
),
|
|
302
|
-
inputSchema=_add_project_param(
|
|
303
|
-
{
|
|
304
|
-
"type": "object",
|
|
305
|
-
"properties": {
|
|
306
|
-
"cell": {
|
|
307
|
-
"type": "string",
|
|
308
|
-
"description": "Name of the cell to verify",
|
|
309
|
-
},
|
|
310
|
-
"netpath": {
|
|
311
|
-
"type": "string",
|
|
312
|
-
"description": (
|
|
313
|
-
"Path to the reference netlist file to compare against"
|
|
314
|
-
),
|
|
315
|
-
},
|
|
316
|
-
"cellargs": {
|
|
317
|
-
"type": "string",
|
|
318
|
-
"description": (
|
|
319
|
-
"Optional cell arguments as a JSON string. "
|
|
320
|
-
"Default is empty string."
|
|
321
|
-
),
|
|
322
|
-
"default": "",
|
|
323
|
-
},
|
|
324
|
-
},
|
|
325
|
-
"required": ["cell", "netpath"],
|
|
326
|
-
}
|
|
327
|
-
),
|
|
328
|
-
),
|
|
329
|
-
]
|
|
330
|
-
|
|
331
|
-
# Phase 3: SPICE Workflow Tools (to be implemented)
|
|
332
|
-
SPICE_TOOLS: list[Tool] = []
|
|
333
|
-
|
|
334
|
-
# Phase 4: Simulation & Advanced Tools
|
|
335
|
-
ADVANCED_TOOLS: list[Tool] = [
|
|
336
|
-
Tool(
|
|
337
|
-
name="simulate_component",
|
|
338
|
-
description=(
|
|
339
|
-
"Run a SAX circuit simulation on a photonic component by name. "
|
|
340
|
-
"This simulates the optical behavior of the component using its "
|
|
341
|
-
"SAX model. Returns S-parameters showing how light propagates "
|
|
342
|
-
"through the component's ports. Use this to analyze component "
|
|
343
|
-
"performance before fabrication."
|
|
344
|
-
),
|
|
345
|
-
inputSchema=_add_project_param(
|
|
346
|
-
{
|
|
347
|
-
"type": "object",
|
|
348
|
-
"properties": {
|
|
349
|
-
"name": {
|
|
350
|
-
"type": "string",
|
|
351
|
-
"description": (
|
|
352
|
-
"Name of the component/cell to simulate. The component "
|
|
353
|
-
"must have a SAX model defined."
|
|
354
|
-
),
|
|
355
|
-
},
|
|
356
|
-
},
|
|
357
|
-
"required": ["name"],
|
|
358
|
-
}
|
|
359
|
-
),
|
|
360
|
-
),
|
|
361
|
-
Tool(
|
|
362
|
-
name="get_port_center",
|
|
363
|
-
description=(
|
|
364
|
-
"Get the center coordinates (x, y) of a specific port in a component "
|
|
365
|
-
"instance. This is useful for positioning components, routing waveguides, "
|
|
366
|
-
"or analyzing layout geometry. Returns the physical coordinates in "
|
|
367
|
-
"microns."
|
|
368
|
-
),
|
|
369
|
-
inputSchema=_add_project_param(
|
|
370
|
-
{
|
|
371
|
-
"type": "object",
|
|
372
|
-
"properties": {
|
|
373
|
-
"netlist": {
|
|
374
|
-
"type": "string",
|
|
375
|
-
"description": (
|
|
376
|
-
"Name of the component/netlist containing the instance"
|
|
377
|
-
),
|
|
378
|
-
},
|
|
379
|
-
"instance": {
|
|
380
|
-
"type": "string",
|
|
381
|
-
"description": "Name of the instance within the netlist",
|
|
382
|
-
},
|
|
383
|
-
"port": {
|
|
384
|
-
"type": "string",
|
|
385
|
-
"description": "Name of the port to get coordinates for",
|
|
386
|
-
},
|
|
387
|
-
},
|
|
388
|
-
"required": ["netlist", "instance", "port"],
|
|
389
|
-
}
|
|
390
|
-
),
|
|
391
|
-
),
|
|
392
|
-
Tool(
|
|
393
|
-
name="generate_bbox",
|
|
394
|
-
description=(
|
|
395
|
-
"Generate a bounding box GDS file from an input GDS. This creates "
|
|
396
|
-
"a simplified version of the layout with only a bounding box on "
|
|
397
|
-
"specified layers. Useful for creating abstract views, floorplanning, "
|
|
398
|
-
"or hierarchical design. Can optionally preserve specific layers and "
|
|
399
|
-
"ports."
|
|
400
|
-
),
|
|
401
|
-
inputSchema=_add_project_param(
|
|
402
|
-
{
|
|
403
|
-
"type": "object",
|
|
404
|
-
"properties": {
|
|
405
|
-
"path": {
|
|
406
|
-
"type": "string",
|
|
407
|
-
"description": (
|
|
408
|
-
"Path to the input GDS file. Can be absolute or relative "
|
|
409
|
-
"to the project directory."
|
|
410
|
-
),
|
|
411
|
-
},
|
|
412
|
-
"outpath": {
|
|
413
|
-
"type": "string",
|
|
414
|
-
"description": (
|
|
415
|
-
"Output path for the bounding box GDS. If not specified, "
|
|
416
|
-
"uses the input filename with '-bbox' suffix."
|
|
417
|
-
),
|
|
418
|
-
"default": "",
|
|
419
|
-
},
|
|
420
|
-
"layers_to_keep": {
|
|
421
|
-
"type": "array",
|
|
422
|
-
"items": {"type": "string"},
|
|
423
|
-
"description": (
|
|
424
|
-
"List of layer names to preserve in the output. "
|
|
425
|
-
"Other layers will be replaced by the bounding box."
|
|
426
|
-
),
|
|
427
|
-
"default": [],
|
|
428
|
-
},
|
|
429
|
-
"bbox_layer": {
|
|
430
|
-
"type": "array",
|
|
431
|
-
"items": {"type": "integer"},
|
|
432
|
-
"description": (
|
|
433
|
-
"Layer (as [layer, datatype]) to use for the bounding box. "
|
|
434
|
-
"Default is [99, 0]."
|
|
435
|
-
),
|
|
436
|
-
"default": [99, 0],
|
|
437
|
-
},
|
|
438
|
-
"ignore_ports": {
|
|
439
|
-
"type": "boolean",
|
|
440
|
-
"description": (
|
|
441
|
-
"If true, do not include ports in the output. "
|
|
442
|
-
"Default is false."
|
|
443
|
-
),
|
|
444
|
-
"default": False,
|
|
445
|
-
},
|
|
446
|
-
},
|
|
447
|
-
"required": ["path"],
|
|
448
|
-
}
|
|
449
|
-
),
|
|
450
|
-
),
|
|
451
|
-
Tool(
|
|
452
|
-
name="freeze_cell",
|
|
453
|
-
description=(
|
|
454
|
-
"Freeze a parametric Python cell as a static schematic netlist. "
|
|
455
|
-
"This converts a gdsfactory component with specific parameters into "
|
|
456
|
-
"a fixed netlist representation in YAML format. Useful for creating "
|
|
457
|
-
"versioned snapshots of parametric designs or preparing components "
|
|
458
|
-
"for simulation workflows."
|
|
459
|
-
),
|
|
460
|
-
inputSchema=_add_project_param(
|
|
461
|
-
{
|
|
462
|
-
"type": "object",
|
|
463
|
-
"properties": {
|
|
464
|
-
"cell_name": {
|
|
465
|
-
"type": "string",
|
|
466
|
-
"description": "Name of the cell/component to freeze",
|
|
467
|
-
},
|
|
468
|
-
"kwargs": {
|
|
469
|
-
"type": "object",
|
|
470
|
-
"description": (
|
|
471
|
-
"Optional keyword arguments to pass to the component "
|
|
472
|
-
"factory. Use this to specify parameter values when "
|
|
473
|
-
"freezing the cell. Default is empty (use default params)."
|
|
474
|
-
),
|
|
475
|
-
"default": {},
|
|
476
|
-
},
|
|
477
|
-
},
|
|
478
|
-
"required": ["cell_name"],
|
|
479
|
-
}
|
|
480
|
-
),
|
|
481
|
-
),
|
|
482
|
-
Tool(
|
|
483
|
-
name="get_pdk_info",
|
|
484
|
-
description=(
|
|
485
|
-
"Get information about the current PDK (Process Design Kit) in use. "
|
|
486
|
-
"Returns metadata including PDK name, project name, project path, "
|
|
487
|
-
"server port, and version. Use this to verify which PDK is active "
|
|
488
|
-
"and get project configuration details."
|
|
489
|
-
),
|
|
490
|
-
inputSchema=_add_project_param(
|
|
491
|
-
{
|
|
492
|
-
"type": "object",
|
|
493
|
-
"properties": {},
|
|
494
|
-
}
|
|
495
|
-
),
|
|
496
|
-
),
|
|
497
|
-
]
|
|
498
|
-
|
|
499
|
-
# All tools (Phase 1 + Project tools)
|
|
500
|
-
TOOLS: list[Tool] = [
|
|
501
|
-
*PROJECT_TOOLS, # Project discovery tools (always available)
|
|
502
|
-
*CORE_TOOLS,
|
|
503
|
-
*VERIFICATION_TOOLS,
|
|
504
|
-
*SPICE_TOOLS,
|
|
505
|
-
*ADVANCED_TOOLS,
|
|
506
|
-
]
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
def get_all_tools() -> list[Tool]:
|
|
510
|
-
"""Get all available MCP tools.
|
|
511
|
-
|
|
512
|
-
Returns:
|
|
513
|
-
List of all tool definitions
|
|
514
|
-
"""
|
|
515
|
-
return TOOLS
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
def get_tool_by_name(name: str) -> Tool | None:
|
|
519
|
-
"""Get a tool by name.
|
|
520
|
-
|
|
521
|
-
Args:
|
|
522
|
-
name: Tool name
|
|
523
|
-
|
|
524
|
-
Returns:
|
|
525
|
-
Tool definition or None if not found
|
|
526
|
-
"""
|
|
527
|
-
for tool in TOOLS:
|
|
528
|
-
if tool.name == name:
|
|
529
|
-
return tool
|
|
530
|
-
return None
|
|
File without changes
|
|
File without changes
|