Coverage Report

Created: 2026-03-25 23:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/home/runner/work/tenet/tenet/tenet-aws/src/services/mcp/handlers/tools_schemas.rs
Line
Count
Source
1
use super::super::*;
2
use super::tools_handlers::*;
3
use super::tools_registry::CrudTool;
4
use tenet_domain::mcp;
5
6
32
pub(super) fn crud_tools() -> Vec<CrudTool<ToolHandler>> {
7
32
    vec![
8
32
        CrudTool {
9
32
            name: "create_container",
10
32
            description: "Create a deployable/runtime container.",
11
32
            input_schema: serde_json::json!({
12
32
                "type": "object",
13
32
                "properties": {
14
32
                    "project": {
15
32
                        "type": "string",
16
32
                        "description": "Project name to add the container to"
17
32
                    },
18
32
                    "name": {
19
32
                        "type": "string",
20
32
                        "description": "Display name for the container"
21
32
                    },
22
32
                    "path": {
23
32
                        "type": "string",
24
32
                        "description": "Glob pattern for the container's code path"
25
32
                    },
26
32
                    "container_kind": {
27
32
                        "type": "string",
28
32
                        "description": tenet_domain::ContainerKind::HELP
29
32
                    },
30
32
                    "description": {
31
32
                        "type": "string",
32
32
                        "description": "Optional description of the container"
33
32
                    },
34
32
                    "technology": {
35
32
                        "type": "string",
36
32
                        "description": "Programming language"
37
32
                    },
38
32
                    "framework": {
39
32
                        "type": "string",
40
32
                        "description": "Framework used"
41
32
                    },
42
32
                    "runtime": {
43
32
                        "type": "string",
44
32
                        "description": "Optional runtime hint"
45
32
                    },
46
32
                    "deployment": {
47
32
                        "type": "string",
48
32
                        "description": "Optional deployment hint"
49
32
                    }
50
32
                },
51
32
                "required": ["project", "name", "path", "container_kind"]
52
32
            }),
53
32
            handler: handle_create_container,
54
32
        },
55
32
        CrudTool {
56
32
            name: "get_container",
57
32
            description: "Get a container by id or name.",
58
32
            input_schema: serde_json::json!({
59
32
                "type": "object",
60
32
                "properties": {
61
32
                    "project": {
62
32
                        "type": "string",
63
32
                        "description": "Project name"
64
32
                    },
65
32
                    "container_id": {
66
32
                        "type": "string",
67
32
                        "description": "Container id (UUID)"
68
32
                    },
69
32
                    "name": {
70
32
                        "type": "string",
71
32
                        "description": "Container name (case-insensitive)"
72
32
                    }
73
32
                },
74
32
                "required": ["project"]
75
32
            }),
76
32
            handler: handle_get_container,
77
32
        },
78
32
        CrudTool {
79
32
            name: "list_containers",
80
32
            description: "List all containers in a project.",
81
32
            input_schema: serde_json::json!({
82
32
                "type": "object",
83
32
                "properties": {
84
32
                    "project": {
85
32
                        "type": "string",
86
32
                        "description": "Project name"
87
32
                    }
88
32
                },
89
32
                "required": ["project"]
90
32
            }),
91
32
            handler: handle_list_containers,
92
32
        },
93
32
        CrudTool {
94
32
            name: "update_container",
95
32
            description: "Update an existing container.",
96
32
            input_schema: serde_json::json!({
97
32
                "type": "object",
98
32
                "properties": {
99
32
                    "project": { "type": "string", "description": "Project name containing the container" },
100
32
                    "container_id": { "type": "string", "description": "Container id (UUID)" },
101
32
                    "name": { "type": "string", "description": "Current container name (case-insensitive)" },
102
32
                    "new_name": { "type": "string", "description": "Optional new name for the container" },
103
32
                    "path": { "type": "string", "description": "Optional new path pattern for the container" },
104
32
                    "description": { "type": "string", "description": "Optional description for the container" },
105
32
                    "container_kind": { "type": "string", "description": tenet_domain::ContainerKind::HELP },
106
32
                    "technology": { "type": "string", "description": "Optional new technology/language" },
107
32
                    "framework": { "type": "string", "description": "Optional new framework" },
108
32
                    "runtime": { "type": "string", "description": "Optional runtime hint" },
109
32
                    "deployment": { "type": "string", "description": "Optional deployment hint" }
110
32
                },
111
32
                "required": ["project"]
112
32
            }),
113
32
            handler: handle_update_container,
114
32
        },
115
32
        CrudTool {
116
32
            name: "delete_container",
117
32
            description: "Delete a container from a project.",
118
32
            input_schema: serde_json::json!({
119
32
                "type": "object",
120
32
                "properties": {
121
32
                    "project": { "type": "string", "description": "Project name containing the container" },
122
32
                    "container_id": { "type": "string", "description": "Container id (UUID)" },
123
32
                    "name": { "type": "string", "description": "Container name (case-insensitive)" }
124
32
                },
125
32
                "required": ["project"]
126
32
            }),
127
32
            handler: handle_delete_container,
128
32
        },
129
32
        CrudTool {
130
32
            name: "create_connection",
131
32
            description: "Create a dependency or interaction between architecture nodes. Connections appear in working context as upstream/downstream dependencies.",
132
32
            input_schema: serde_json::json!({
133
32
                "type": "object",
134
32
                "properties": {
135
32
                    "project": { "type": "string", "description": "Project name containing the components" },
136
32
                    "source_name": { "type": "string", "description": "Name of the source component" },
137
32
                    "source_kind": { "type": "string", "description": tenet_domain::ConnectionSourceKind::HELP },
138
32
                    "target_name": { "type": "string", "description": "Name of the target component or external system" },
139
32
                    "target_kind": { "type": "string", "description": tenet_domain::ConnectionTargetKind::HELP },
140
32
                    "source_side": { "type": "string", "description": tenet_domain::ConnectionAnchorSide::HELP },
141
32
                    "target_side": { "type": "string", "description": tenet_domain::ConnectionAnchorSide::HELP },
142
32
                    "routing_mode": { "type": "string", "description": tenet_domain::ConnectionRoutingMode::HELP },
143
32
                    "control_points": {
144
32
                        "type": "array",
145
32
                        "description": "Optional manual route control points",
146
32
                        "items": {
147
32
                            "type": "object",
148
32
                            "properties": {
149
32
                                "x": { "type": "number" },
150
32
                                "y": { "type": "number" }
151
32
                            },
152
32
                            "required": ["x", "y"]
153
32
                        }
154
32
                    },
155
32
                    "label": { "type": "string", "description": "Relationship type (e.g., 'imports', 'uses', 'REST API', 'publishes to')" },
156
32
                    "description": { "type": "string", "description": "Optional interaction details" }
157
32
                },
158
32
                "required": ["project", "source_name", "source_kind", "target_name", "target_kind", "label"]
159
32
            }),
160
32
            handler: handle_create_connection,
161
32
        },
162
32
        CrudTool {
163
32
            name: "create_component",
164
32
            description: "Create a component within a container or component.",
165
32
            input_schema: serde_json::json!({
166
32
                "type": "object",
167
32
                "properties": {
168
32
                    "project": { "type": "string", "description": "Project name to add the component to" },
169
32
                    "parent_name": { "type": "string", "description": "Parent node name (container or component)" },
170
32
                    "parent_kind": { "type": "string", "description": tenet_domain::mcp::COMPONENT_PARENT_KIND_DESCRIPTION },
171
32
                    "name": { "type": "string", "description": "Display name for the component" },
172
32
                    "path": { "type": "string", "description": "Glob pattern for the component's code path" },
173
32
                    "description": { "type": "string", "description": "Optional description of the component" },
174
32
                    "component_kind": { "type": "string", "description": tenet_domain::ArchitectureComponentKind::HELP }
175
32
                },
176
32
                "required": ["project", "parent_name", "parent_kind", "name", "path"]
177
32
            }),
178
32
            handler: handle_create_component,
179
32
        },
180
32
        CrudTool {
181
32
            name: "get_component",
182
32
            description: "Get a component by id or name under a parent.",
183
32
            input_schema: serde_json::json!({
184
32
                "type": "object",
185
32
                "properties": {
186
32
                    "project": { "type": "string", "description": "Project name" },
187
32
                    "parent_name": { "type": "string", "description": "Parent node name (container or component)" },
188
32
                    "parent_kind": { "type": "string", "description": tenet_domain::mcp::COMPONENT_PARENT_KIND_DESCRIPTION },
189
32
                    "component_id": { "type": "string", "description": "Component id (UUID)" },
190
32
                    "name": { "type": "string", "description": "Component name (case-insensitive)" }
191
32
                },
192
32
                "required": ["project", "parent_name", "parent_kind"]
193
32
            }),
194
32
            handler: handle_get_component,
195
32
        },
196
32
        CrudTool {
197
32
            name: "list_components",
198
32
            description: "List all components under a parent.",
199
32
            input_schema: serde_json::json!({
200
32
                "type": "object",
201
32
                "properties": {
202
32
                    "project": { "type": "string", "description": "Project name" },
203
32
                    "parent_name": { "type": "string", "description": "Parent node name (container or component)" },
204
32
                    "parent_kind": { "type": "string", "description": tenet_domain::mcp::COMPONENT_PARENT_KIND_DESCRIPTION }
205
32
                },
206
32
                "required": ["project", "parent_name", "parent_kind"]
207
32
            }),
208
32
            handler: handle_list_components,
209
32
        },
210
32
        CrudTool {
211
32
            name: "update_component",
212
32
            description: "Update an existing component's name, path, or description.",
213
32
            input_schema: serde_json::json!({
214
32
                "type": "object",
215
32
                "properties": {
216
32
                    "project": { "type": "string", "description": "Project name containing the component" },
217
32
                    "parent_name": { "type": "string", "description": "Parent node name (container or component)" },
218
32
                    "parent_kind": { "type": "string", "description": tenet_domain::mcp::COMPONENT_PARENT_KIND_DESCRIPTION },
219
32
                    "component_id": { "type": "string", "description": "Component id (UUID)" },
220
32
                    "name": { "type": "string", "description": "Current component name (case-insensitive)" },
221
32
                    "new_name": { "type": "string", "description": "Optional new name for the component" },
222
32
                    "path": { "type": "string", "description": "Optional new path pattern for the component" },
223
32
                    "description": { "type": "string", "description": "Optional description for the component" },
224
32
                    "component_kind": { "type": "string", "description": tenet_domain::ArchitectureComponentKind::HELP }
225
32
                },
226
32
                "required": ["project", "parent_name", "parent_kind"]
227
32
            }),
228
32
            handler: handle_update_component,
229
32
        },
230
32
        CrudTool {
231
32
            name: "delete_component",
232
32
            description: "Delete a component from a parent.",
233
32
            input_schema: serde_json::json!({
234
32
                "type": "object",
235
32
                "properties": {
236
32
                    "project": { "type": "string", "description": "Project name containing the component" },
237
32
                    "parent_name": { "type": "string", "description": "Parent node name (container or component)" },
238
32
                    "parent_kind": { "type": "string", "description": tenet_domain::mcp::COMPONENT_PARENT_KIND_DESCRIPTION },
239
32
                    "component_id": { "type": "string", "description": "Component id (UUID)" },
240
32
                    "name": { "type": "string", "description": "Component name to delete (case-insensitive)" }
241
32
                },
242
32
                "required": ["project", "parent_name", "parent_kind"]
243
32
            }),
244
32
            handler: handle_delete_component,
245
32
        },
246
32
        CrudTool {
247
32
            name: "create_store",
248
32
            description: "Create a data store (database, cache, object storage, etc.) that components connect to.",
249
32
            input_schema: serde_json::json!({
250
32
                "type": "object",
251
32
                "properties": {
252
32
                    "project": { "type": "string", "description": "Project name to add the store to" },
253
32
                    "name": { "type": "string", "description": "Store display name" },
254
32
                    "store_type": { "type": "string", "description": "Store type (e.g., postgres, mysql, redis, s3)" },
255
32
                    "ownership": { "type": "string", "description": "Ownership model (internal, shared, managed)" },
256
32
                    "description": { "type": "string", "description": "Optional description of the store" },
257
32
                    "tags": { "type": "array", "items": { "type": "string" }, "description": "Optional tags" }
258
32
                },
259
32
                "required": ["project", "name", "store_type", "ownership"]
260
32
            }),
261
32
            handler: handle_create_store,
262
32
        },
263
32
        CrudTool {
264
32
            name: "get_store",
265
32
            description: "Get detailed information about a specific store including description and tags.",
266
32
            input_schema: serde_json::json!({
267
32
                "type": "object",
268
32
                "properties": {
269
32
                    "project": { "type": "string", "description": "Project name" },
270
32
                    "store_id": { "type": "string", "description": "Store id (UUID)" },
271
32
                    "name": { "type": "string", "description": "Store name (case-insensitive)" }
272
32
                },
273
32
                "required": ["project"]
274
32
            }),
275
32
            handler: handle_get_store,
276
32
        },
277
32
        CrudTool {
278
32
            name: "list_stores",
279
32
            description: "List all data stores in a project.",
280
32
            input_schema: serde_json::json!({
281
32
                "type": "object",
282
32
                "properties": {
283
32
                    "project": { "type": "string", "description": "Project name" }
284
32
                },
285
32
                "required": ["project"]
286
32
            }),
287
32
            handler: handle_list_stores,
288
32
        },
289
32
        CrudTool {
290
32
            name: "update_store",
291
32
            description: "Update a store by id or name.",
292
32
            input_schema: serde_json::json!({
293
32
                "type": "object",
294
32
                "properties": {
295
32
                    "project": { "type": "string", "description": "Project name" },
296
32
                    "store_id": { "type": "string", "description": "Store id (UUID)" },
297
32
                    "name": { "type": "string", "description": "Store name (case-insensitive)" },
298
32
                    "new_name": { "type": "string", "description": "Optional new store name" },
299
32
                    "store_type": { "type": "string", "description": "Optional store type" },
300
32
                    "ownership": { "type": "string", "description": "Optional ownership model (internal, shared, managed)" },
301
32
                    "description": { "type": "string", "description": "Optional description" },
302
32
                    "tags": { "type": "array", "items": { "type": "string" }, "description": "Optional tags" },
303
32
                    "position_x": { "type": "number", "description": "Optional x position in the diagram" },
304
32
                    "position_y": { "type": "number", "description": "Optional y position in the diagram" }
305
32
                },
306
32
                "required": ["project"]
307
32
            }),
308
32
            handler: handle_update_store,
309
32
        },
310
32
        CrudTool {
311
32
            name: "delete_store",
312
32
            description: "Delete a store by id or name.",
313
32
            input_schema: serde_json::json!({
314
32
                "type": "object",
315
32
                "properties": {
316
32
                    "project": { "type": "string", "description": "Project name" },
317
32
                    "store_id": { "type": "string", "description": "Store id (UUID)" },
318
32
                    "name": { "type": "string", "description": "Store name (case-insensitive)" }
319
32
                },
320
32
                "required": ["project"]
321
32
            }),
322
32
            handler: handle_delete_store,
323
32
        },
324
32
        CrudTool {
325
32
            name: "create_actor",
326
32
            description: "Create an actor representing a user or agent that interacts with the system.",
327
32
            input_schema: serde_json::json!({
328
32
                "type": "object",
329
32
                "properties": {
330
32
                    "project": { "type": "string", "description": "Project name to add the actor to" },
331
32
                    "name": { "type": "string", "description": "Actor display name" },
332
32
                    "actor_type": { "type": "string", "description": "Actor type: human_user | ai_agent | service_account" },
333
32
                    "description": { "type": "string", "description": "Optional description of the actor" },
334
32
                    "interaction_mode": { "type": "string", "description": "Optional interaction mode: web_ui | mcp_agent | api | cli" },
335
32
                    "responsibilities": { "type": "array", "items": { "type": "string" }, "description": "Optional responsibilities" }
336
32
                },
337
32
                "required": ["project", "name", "actor_type"]
338
32
            }),
339
32
            handler: handle_create_actor,
340
32
        },
341
32
        CrudTool {
342
32
            name: "get_actor",
343
32
            description: "Get detailed info about an actor including description, interaction mode, and responsibilities.",
344
32
            input_schema: serde_json::json!({
345
32
                "type": "object",
346
32
                "properties": {
347
32
                    "project": { "type": "string", "description": "Project name" },
348
32
                    "actor_id": { "type": "string", "description": "Actor id (UUID)" },
349
32
                    "name": { "type": "string", "description": "Actor name (case-insensitive)" }
350
32
                },
351
32
                "required": ["project"]
352
32
            }),
353
32
            handler: handle_get_actor,
354
32
        },
355
32
        CrudTool {
356
32
            name: "list_actors",
357
32
            description: "List all actors in a project with their types.",
358
32
            input_schema: serde_json::json!({
359
32
                "type": "object",
360
32
                "properties": {
361
32
                    "project": { "type": "string", "description": "Project name" }
362
32
                },
363
32
                "required": ["project"]
364
32
            }),
365
32
            handler: handle_list_actors,
366
32
        },
367
32
        CrudTool {
368
32
            name: "update_actor",
369
32
            description: "Update an actor by id or name.",
370
32
            input_schema: serde_json::json!({
371
32
                "type": "object",
372
32
                "properties": {
373
32
                    "project": { "type": "string", "description": "Project name" },
374
32
                    "actor_id": { "type": "string", "description": "Actor id (UUID)" },
375
32
                    "name": { "type": "string", "description": "Actor name (case-insensitive)" },
376
32
                    "new_name": { "type": "string", "description": "Optional new actor name" },
377
32
                    "actor_type": { "type": "string", "description": "Optional actor type" },
378
32
                    "description": { "type": "string", "description": "Optional description" },
379
32
                    "interaction_mode": { "type": "string", "description": "Optional interaction mode" },
380
32
                    "responsibilities": { "type": "array", "items": { "type": "string" }, "description": "Optional responsibilities" },
381
32
                    "position_x": { "type": "number", "description": "Optional x position in the diagram" },
382
32
                    "position_y": { "type": "number", "description": "Optional y position in the diagram" }
383
32
                },
384
32
                "required": ["project"]
385
32
            }),
386
32
            handler: handle_update_actor,
387
32
        },
388
32
        CrudTool {
389
32
            name: "delete_actor",
390
32
            description: "Delete an actor by id or name.",
391
32
            input_schema: serde_json::json!({
392
32
                "type": "object",
393
32
                "properties": {
394
32
                    "project": { "type": "string", "description": "Project name" },
395
32
                    "actor_id": { "type": "string", "description": "Actor id (UUID)" },
396
32
                    "name": { "type": "string", "description": "Actor name (case-insensitive)" }
397
32
                },
398
32
                "required": ["project"]
399
32
            }),
400
32
            handler: handle_delete_actor,
401
32
        },
402
32
        CrudTool {
403
32
            name: "create_external_system",
404
32
            description: "Create an external system that the project integrates with (third-party service, API, or infrastructure).",
405
32
            input_schema: serde_json::json!({
406
32
                "type": "object",
407
32
                "properties": {
408
32
                    "project": { "type": "string", "description": "Project name to add the external system to" },
409
32
                    "name": { "type": "string", "description": "External system display name" },
410
32
                    "category": { "type": "string", "description": "Category (e.g., payment, auth, crm, email, partner)" },
411
32
                    "description": { "type": "string", "description": "Optional description of the external system" },
412
32
                    "vendor": { "type": "string", "description": "Optional vendor (e.g., Stripe, Okta)" },
413
32
                    "tags": { "type": "array", "items": { "type": "string" }, "description": "Optional tags" }
414
32
                },
415
32
                "required": ["project", "name", "category"]
416
32
            }),
417
32
            handler: handle_create_external_system,
418
32
        },
419
32
        CrudTool {
420
32
            name: "get_external_system",
421
32
            description: "Get an external system by id or name.",
422
32
            input_schema: serde_json::json!({
423
32
                "type": "object",
424
32
                "properties": {
425
32
                    "project": { "type": "string", "description": "Project name" },
426
32
                    "external_system_id": { "type": "string", "description": "External system id (UUID)" },
427
32
                    "name": { "type": "string", "description": "External system name (case-insensitive)" }
428
32
                },
429
32
                "required": ["project"]
430
32
            }),
431
32
            handler: handle_get_external_system,
432
32
        },
433
32
        CrudTool {
434
32
            name: "list_external_systems",
435
32
            description: "List external systems for a project.",
436
32
            input_schema: serde_json::json!({
437
32
                "type": "object",
438
32
                "properties": {
439
32
                    "project": { "type": "string", "description": "Project name" }
440
32
                },
441
32
                "required": ["project"]
442
32
            }),
443
32
            handler: handle_list_external_systems,
444
32
        },
445
32
        CrudTool {
446
32
            name: "update_external_system",
447
32
            description: "Update an external system by id or name.",
448
32
            input_schema: serde_json::json!({
449
32
                "type": "object",
450
32
                "properties": {
451
32
                    "project": { "type": "string", "description": "Project name" },
452
32
                    "external_system_id": { "type": "string", "description": "External system id (UUID)" },
453
32
                    "name": { "type": "string", "description": "External system name (case-insensitive)" },
454
32
                    "new_name": { "type": "string", "description": "Optional new external system name" },
455
32
                    "category": { "type": "string", "description": "Optional category" },
456
32
                    "description": { "type": "string", "description": "Optional description" },
457
32
                    "vendor": { "type": "string", "description": "Optional vendor" },
458
32
                    "tags": { "type": "array", "items": { "type": "string" }, "description": "Optional tags" },
459
32
                    "position_x": { "type": "number", "description": "Optional x position in the diagram" },
460
32
                    "position_y": { "type": "number", "description": "Optional y position in the diagram" }
461
32
                },
462
32
                "required": ["project"]
463
32
            }),
464
32
            handler: handle_update_external_system,
465
32
        },
466
32
        CrudTool {
467
32
            name: "delete_external_system",
468
32
            description: "Delete an external system by id or name.",
469
32
            input_schema: serde_json::json!({
470
32
                "type": "object",
471
32
                "properties": {
472
32
                    "project": { "type": "string", "description": "Project name" },
473
32
                    "external_system_id": { "type": "string", "description": "External system id (UUID)" },
474
32
                    "name": { "type": "string", "description": "External system name (case-insensitive)" }
475
32
                },
476
32
                "required": ["project"]
477
32
            }),
478
32
            handler: handle_delete_external_system,
479
32
        },
480
32
        CrudTool {
481
32
            name: "create_quality_attribute",
482
32
            description: "Create a new quality attribute (non-functional requirement) for a project. Maximum 10 per project.",
483
32
            input_schema: serde_json::json!({
484
32
                "type": "object",
485
32
                "properties": {
486
32
                    "project": { "type": "string", "description": "Project name" },
487
32
                    "name": { "type": "string", "description": "Quality attribute name (e.g., 'Security')" },
488
32
                    "priority": { "type": "integer", "description": "Priority (1-10, lower is higher priority)" },
489
32
                    "description": { "type": "string", "description": "Optional description" },
490
32
                    "constraints": {
491
32
                        "type": "array",
492
32
                        "items": { "type": "string" },
493
32
                        "description": "Optional list of constraints"
494
32
                    }
495
32
                },
496
32
                "required": ["project", "name", "priority"]
497
32
            }),
498
32
            handler: handle_create_quality_attribute,
499
32
        },
500
32
        CrudTool {
501
32
            name: "get_quality_attribute",
502
32
            description: "Get detailed information about a quality attribute including constraints and linked components.",
503
32
            input_schema: serde_json::json!({
504
32
                "type": "object",
505
32
                "properties": {
506
32
                    "project": { "type": "string", "description": "Project name" },
507
32
                    "quality_attribute_id": { "type": "string", "description": "Quality attribute id (UUID)" },
508
32
                    "name": { "type": "string", "description": "Quality attribute name (case-insensitive)" }
509
32
                },
510
32
                "required": ["project"]
511
32
            }),
512
32
            handler: handle_get_quality_attribute,
513
32
        },
514
32
        CrudTool {
515
32
            name: "list_quality_attributes",
516
32
            description: "List all quality attributes for a project, ordered by priority (1 = highest).",
517
32
            input_schema: serde_json::json!({
518
32
                "type": "object",
519
32
                "properties": {
520
32
                    "project": { "type": "string", "description": "Project name" }
521
32
                },
522
32
                "required": ["project"]
523
32
            }),
524
32
            handler: handle_list_quality_attributes,
525
32
        },
526
32
        CrudTool {
527
32
            name: "update_quality_attribute",
528
32
            description: "Update a quality attribute by id or name.",
529
32
            input_schema: serde_json::json!({
530
32
                "type": "object",
531
32
                "properties": {
532
32
                    "project": { "type": "string", "description": "Project name" },
533
32
                    "quality_attribute_id": { "type": "string", "description": "Quality attribute id (UUID)" },
534
32
                    "name": { "type": "string", "description": "Quality attribute name (case-insensitive)" },
535
32
                    "priority": { "type": "integer", "description": "Priority (1-10, lower is higher priority)" },
536
32
                    "description": { "type": "string", "description": "Optional description" },
537
32
                    "constraints": {
538
32
                        "type": "array",
539
32
                        "items": { "type": "string" },
540
32
                        "description": "Optional list of constraints (replaces the array)"
541
32
                    }
542
32
                },
543
32
                "required": ["project"]
544
32
            }),
545
32
            handler: handle_update_quality_attribute,
546
32
        },
547
32
        CrudTool {
548
32
            name: "delete_quality_attribute",
549
32
            description: "Delete a quality attribute by id or name.",
550
32
            input_schema: serde_json::json!({
551
32
                "type": "object",
552
32
                "properties": {
553
32
                    "project": { "type": "string", "description": "Project name" },
554
32
                    "quality_attribute_id": { "type": "string", "description": "Quality attribute id (UUID)" },
555
32
                    "name": { "type": "string", "description": "Quality attribute name (case-insensitive)" }
556
32
                },
557
32
                "required": ["project"]
558
32
            }),
559
32
            handler: handle_delete_quality_attribute,
560
32
        },
561
32
        CrudTool {
562
32
            name: "create_rule",
563
32
            description: "Create a new coding rule that is enforced across the organization and shown in working context.",
564
32
            input_schema: serde_json::json!({
565
32
                "type": "object",
566
32
                "properties": {
567
32
                    "name": { "type": "string", "description": "Short name for the rule (e.g., 'Error Handling', 'No Console Logs')" },
568
32
                    "description": { "type": "string", "description": "Detailed description of the rule that AI agents should follow" },
569
32
                    "category": { "type": "string", "description": "Category for grouping rules (e.g., 'global', 'code-style', 'security', 'testing')" },
570
32
                    "applies_to": { "type": "string", "description": "Optional filter for when rule applies (e.g., 'Rust', 'TypeScript', '*.test.ts')" },
571
32
                    "priority": { "type": "number", "description": "Optional priority (lower = higher priority, default: 100)" }
572
32
                },
573
32
                "required": ["name", "description", "category"]
574
32
            }),
575
32
            handler: handle_create_rule,
576
32
        },
577
32
        CrudTool {
578
32
            name: "delete_rule",
579
32
            description: "Delete an obsolete rule by id or name. Supports org-level rules and project-scoped rules (when project is provided).",
580
32
            input_schema: serde_json::json!({
581
32
                "type": "object",
582
32
                "properties": {
583
32
                    "project": {
584
32
                        "type": "string",
585
32
                        "description": "Optional project name. If set, deletes a project-scoped rule."
586
32
                    },
587
32
                    "rule_id": {
588
32
                        "type": "string",
589
32
                        "description": "Rule id (UUID)"
590
32
                    },
591
32
                    "name": {
592
32
                        "type": "string",
593
32
                        "description": "Rule name (case-insensitive). Must be unique in scope."
594
32
                    }
595
32
                },
596
32
                "required": []
597
32
            }),
598
32
            handler: handle_delete_rule,
599
32
        },
600
32
        CrudTool {
601
32
            name: "link_actor_to_component",
602
32
            description: "Create a typed actor-to-component relationship (implemented as a connection edge).",
603
32
            input_schema: serde_json::json!({
604
32
                "type": "object",
605
32
                "properties": {
606
32
                    "project": { "type": "string", "description": "Project name" },
607
32
                    "actor_name": { "type": "string", "description": "Actor id or name (case-insensitive)" },
608
32
                    "component_name": { "type": "string", "description": "Component id or name (case-insensitive)" },
609
32
                    "component_type": { "type": "string", "description": tenet_domain::QualityLinkComponentType::HELP },
610
32
                    "label": { "type": "string", "description": "Optional relationship label (default: uses)" },
611
32
                    "description": { "type": "string", "description": "Optional relationship description" }
612
32
                },
613
32
                "required": ["project", "actor_name", "component_name", "component_type"]
614
32
            }),
615
32
            handler: handle_link_actor_to_component,
616
32
        },
617
32
        CrudTool {
618
32
            name: "unlink_actor_from_component",
619
32
            description: "Remove actor-to-component relationship(s). Deletes matching actor->component connection edges.",
620
32
            input_schema: serde_json::json!({
621
32
                "type": "object",
622
32
                "properties": {
623
32
                    "project": { "type": "string", "description": "Project name" },
624
32
                    "actor_name": { "type": "string", "description": "Actor id or name (case-insensitive)" },
625
32
                    "component_name": { "type": "string", "description": "Component id or name (case-insensitive)" },
626
32
                    "component_type": { "type": "string", "description": tenet_domain::QualityLinkComponentType::HELP },
627
32
                    "label": { "type": "string", "description": "Optional label filter; when set only links with this label are removed" }
628
32
                },
629
32
                "required": ["project", "actor_name", "component_name", "component_type"]
630
32
            }),
631
32
            handler: handle_unlink_actor_from_component,
632
32
        },
633
    ]
634
32
}
635
636
30
pub(super) fn base_tool_definitions() -> Vec<ToolDefinition> {
637
30
    vec![
638
30
        ToolDefinition {
639
30
            name: "get_rules".to_string(),
640
30
            description: Some(
641
30
                "Get coding rules and standards that must be followed. Returns all rules or filters by category."
642
30
                    .to_string(),
643
30
            ),
644
30
            input_schema: serde_json::json!({
645
30
                "type": "object",
646
30
                "properties": {
647
30
                    "category": {
648
30
                        "type": "string",
649
30
                        "description": "Optional category filter (e.g., 'global', 'code-style', 'security', 'testing')"
650
30
                    }
651
30
                },
652
30
                "required": []
653
30
            }),
654
30
        },
655
30
        ToolDefinition {
656
30
            name: "get_project_info".to_string(),
657
30
            description: Some(
658
30
                "Get a comprehensive overview of one or all projects, including components, actors, stores, external systems, connections, and architecture metadata."
659
30
                    .to_string(),
660
30
            ),
661
30
            input_schema: serde_json::json!({
662
30
                "type": "object",
663
30
                "properties": {
664
30
                    "project": {
665
30
                        "type": "string",
666
30
                        "description": "Optional project name. Omit to list all projects."
667
30
                    },
668
30
                    "path": {
669
30
                        "type": "string",
670
30
                        "description": "Optional file path to resolve owning component (e.g., 'src/auth/login.ts')"
671
30
                    }
672
30
                },
673
30
                "required": []
674
30
            }),
675
30
        },
676
30
        ToolDefinition {
677
30
            name: "get_working_context".to_string(),
678
30
            description: Some(
679
30
                "Get complete working context for a component or file path, including hierarchy, dependencies, quality attributes, and applicable rules."
680
30
                    .to_string(),
681
30
            ),
682
30
            input_schema: serde_json::json!({
683
30
                "type": "object",
684
30
                "properties": {
685
30
                    "project": { "type": "string", "description": "Project name or id" },
686
30
                    "path": { "type": "string", "description": "File path to resolve to owning component context" },
687
30
                    "component_name": { "type": "string", "description": "Component name to resolve context for" }
688
30
                },
689
30
                "required": ["project"],
690
30
                "oneOf": [
691
30
                    { "required": ["path"] },
692
30
                    { "required": ["component_name"] }
693
30
                ]
694
30
            }),
695
30
        },
696
30
        ToolDefinition {
697
30
            name: "get_graph_layout".to_string(),
698
30
            description: Some(
699
30
                "Get graph layout overrides for a project and view level.".to_string(),
700
30
            ),
701
30
            input_schema: serde_json::json!({
702
30
                "type": "object",
703
30
                "properties": {
704
30
                    "project": { "type": "string", "description": "Project name" },
705
30
                    "view_level": { "type": "string", "description": tenet_domain::mcp::GRAPH_VIEW_LEVEL_DESCRIPTION }
706
30
                },
707
30
                "required": ["project", "view_level"]
708
30
            }),
709
30
        },
710
30
        ToolDefinition {
711
30
            name: "update_graph_layout".to_string(),
712
30
            description: Some(
713
30
                "Update graph layout overrides for a project and view level. Uses PATCH by default; set replace=true for PUT semantics."
714
30
                    .to_string(),
715
30
            ),
716
30
            input_schema: serde_json::json!({
717
30
                "type": "object",
718
30
                "properties": {
719
30
                    "project": { "type": "string", "description": "Project name" },
720
30
                    "view_level": { "type": "string", "description": tenet_domain::mcp::GRAPH_VIEW_LEVEL_DESCRIPTION },
721
30
                    "replace": { "type": "boolean", "description": "When true, replace full layout (PUT). Default false (PATCH)." },
722
30
                    "expected_version": { "type": "integer", "description": "Optional optimistic concurrency guard." },
723
30
                    "nodes": { "type": "object", "description": "PUT: full node overrides keyed by node key." },
724
30
                    "edges": { "type": "object", "description": "PUT: full edge overrides keyed by edge key." },
725
30
                    "viewport": { "type": "object", "description": "PUT/PATCH viewport payload." },
726
30
                    "nodes_upsert": { "type": "object", "description": "PATCH: node overrides to upsert." },
727
30
                    "nodes_remove": { "type": "array", "items": { "type": "string" }, "description": "PATCH: node keys to remove." },
728
30
                    "edges_upsert": { "type": "object", "description": "PATCH: edge overrides to upsert." },
729
30
                    "edges_remove": { "type": "array", "items": { "type": "string" }, "description": "PATCH: edge keys to remove." },
730
30
                    "clear_viewport": { "type": "boolean", "description": "PATCH: clear viewport when true." }
731
30
                },
732
30
                "required": ["project", "view_level"]
733
30
            }),
734
30
        },
735
30
        ToolDefinition {
736
30
            name: "reset_graph_layout".to_string(),
737
30
            description: Some(
738
30
                "Reset graph layout overrides for a project and view level.".to_string(),
739
30
            ),
740
30
            input_schema: serde_json::json!({
741
30
                "type": "object",
742
30
                "properties": {
743
30
                    "project": { "type": "string", "description": "Project name" },
744
30
                    "view_level": { "type": "string", "description": tenet_domain::mcp::GRAPH_VIEW_LEVEL_DESCRIPTION }
745
30
                },
746
30
                "required": ["project", "view_level"]
747
30
            }),
748
30
        },
749
30
        ToolDefinition {
750
30
            name: "create_skill".to_string(),
751
30
            description: Some("Create a skill in a project.".to_string()),
752
30
            input_schema: serde_json::json!({
753
30
                "type": "object",
754
30
                "properties": {
755
30
                    "project": { "type": "string" },
756
30
                    "name": { "type": "string" },
757
30
                    "display_name": { "type": "string" },
758
30
                    "description": { "type": "string" },
759
30
                    "content": { "type": "string" },
760
30
                    "parent_skill_name": { "type": "string" },
761
30
                    "sort_order": { "type": "integer" }
762
30
                },
763
30
                "required": ["project", "name", "display_name", "description", "content"]
764
30
            }),
765
30
        },
766
30
        ToolDefinition {
767
30
            name: "get_skill".to_string(),
768
30
            description: Some("Get a skill including sub-skills and links.".to_string()),
769
30
            input_schema: serde_json::json!({
770
30
                "type": "object",
771
30
                "properties": {
772
30
                    "project": { "type": "string" },
773
30
                    "name": { "type": "string" }
774
30
                },
775
30
                "required": ["project", "name"]
776
30
            }),
777
30
        },
778
30
        ToolDefinition {
779
30
            name: "list_skills".to_string(),
780
30
            description: Some("List skills in a project.".to_string()),
781
30
            input_schema: serde_json::json!({
782
30
                "type": "object",
783
30
                "properties": {
784
30
                    "project": { "type": "string" },
785
30
                    "parent_skill_name": { "type": "string" }
786
30
                },
787
30
                "required": ["project"]
788
30
            }),
789
30
        },
790
30
        ToolDefinition {
791
30
            name: "update_skill".to_string(),
792
30
            description: Some("Update a skill by name.".to_string()),
793
30
            input_schema: serde_json::json!({
794
30
                "type": "object",
795
30
                "properties": {
796
30
                    "project": { "type": "string" },
797
30
                    "name": { "type": "string" },
798
30
                    "new_name": { "type": "string" },
799
30
                    "display_name": { "type": "string" },
800
30
                    "description": { "type": "string" },
801
30
                    "content": { "type": "string" },
802
30
                    "sort_order": { "type": "integer" }
803
30
                },
804
30
                "required": ["project", "name"]
805
30
            }),
806
30
        },
807
30
        ToolDefinition {
808
30
            name: "delete_skill".to_string(),
809
30
            description: Some("Delete a skill and its descendants.".to_string()),
810
30
            input_schema: serde_json::json!({
811
30
                "type": "object",
812
30
                "properties": {
813
30
                    "project": { "type": "string" },
814
30
                    "name": { "type": "string" }
815
30
                },
816
30
                "required": ["project", "name"]
817
30
            }),
818
30
        },
819
30
        ToolDefinition {
820
30
            name: "import_skill".to_string(),
821
30
            description: Some("Import a skill from URL.".to_string()),
822
30
            input_schema: serde_json::json!({
823
30
                "type": "object",
824
30
                "properties": {
825
30
                    "project": { "type": "string" },
826
30
                    "source_url": { "type": "string" },
827
30
                    "name": { "type": "string" },
828
30
                    "display_name": { "type": "string" },
829
30
                    "description": { "type": "string" },
830
30
                    "content": { "type": "string" },
831
30
                    "parent_skill_name": { "type": "string" },
832
30
                    "sort_order": { "type": "integer" }
833
30
                },
834
30
                "required": ["project", "source_url"]
835
30
            }),
836
30
        },
837
30
        ToolDefinition {
838
30
            name: "reimport_skill".to_string(),
839
30
            description: Some("Re-import skill content from source_url.".to_string()),
840
30
            input_schema: serde_json::json!({
841
30
                "type": "object",
842
30
                "properties": {
843
30
                    "project": { "type": "string" },
844
30
                    "name": { "type": "string" }
845
30
                },
846
30
                "required": ["project", "name"]
847
30
            }),
848
30
        },
849
30
        ToolDefinition {
850
30
            name: "link_skill_to_component".to_string(),
851
30
            description: Some("Link a skill to a target node via guides edge.".to_string()),
852
30
            input_schema: serde_json::json!({
853
30
                "type": "object",
854
30
                "properties": {
855
30
                    "project": { "type": "string" },
856
30
                    "skill_name": { "type": "string" },
857
30
                    "target_name": { "type": "string" },
858
30
                    "target_kind": { "type": "string", "description": tenet_domain::mcp::ARCHITECTURE_LINK_TARGET_KIND_DESCRIPTION }
859
30
                },
860
30
                "required": ["project", "skill_name", "target_name", "target_kind"]
861
30
            }),
862
30
        },
863
30
        ToolDefinition {
864
30
            name: "unlink_skill_from_component".to_string(),
865
30
            description: Some("Unlink a skill from a target by link_id.".to_string()),
866
30
            input_schema: serde_json::json!({
867
30
                "type": "object",
868
30
                "properties": {
869
30
                    "project": { "type": "string" },
870
30
                    "skill_name": { "type": "string" },
871
30
                    "link_id": { "type": "string" }
872
30
                },
873
30
                "required": ["project", "skill_name", "link_id"]
874
30
            }),
875
30
        },
876
30
        ToolDefinition {
877
30
            name: "create_spec".to_string(),
878
30
            description: Some("Create a spec in a project.".to_string()),
879
30
            input_schema: mcp::create_spec_schema(),
880
30
        },
881
30
        ToolDefinition {
882
30
            name: "get_spec".to_string(),
883
30
            description: Some("Get a spec including tasks and links.".to_string()),
884
30
            input_schema: serde_json::json!({
885
30
                "type": "object",
886
30
                "properties": {
887
30
                    "project": { "type": "string" },
888
30
                    "name": { "type": "string" }
889
30
                },
890
30
                "required": ["project", "name"]
891
30
            }),
892
30
        },
893
30
        ToolDefinition {
894
30
            name: "list_specs".to_string(),
895
30
            description: Some("List specs in a project.".to_string()),
896
30
            input_schema: mcp::list_specs_schema(),
897
30
        },
898
30
        ToolDefinition {
899
30
            name: "update_spec".to_string(),
900
30
            description: Some("Update a spec by name.".to_string()),
901
30
            input_schema: mcp::update_spec_schema(),
902
30
        },
903
30
        ToolDefinition {
904
30
            name: "delete_spec".to_string(),
905
30
            description: Some("Delete a spec and its tasks.".to_string()),
906
30
            input_schema: serde_json::json!({
907
30
                "type": "object",
908
30
                "properties": {
909
30
                    "project": { "type": "string" },
910
30
                    "name": { "type": "string" }
911
30
                },
912
30
                "required": ["project", "name"]
913
30
            }),
914
30
        },
915
30
        ToolDefinition {
916
30
            name: "create_task".to_string(),
917
30
            description: Some("Create a task inside a spec.".to_string()),
918
30
            input_schema: mcp::create_task_schema(),
919
30
        },
920
30
        ToolDefinition {
921
30
            name: "get_task".to_string(),
922
30
            description: Some("Get a task by spec and task name.".to_string()),
923
30
            input_schema: serde_json::json!({
924
30
                "type": "object",
925
30
                "properties": {
926
30
                    "project": { "type": "string" },
927
30
                    "spec_name": { "type": "string" },
928
30
                    "name": { "type": "string" }
929
30
                },
930
30
                "required": ["project", "spec_name", "name"]
931
30
            }),
932
30
        },
933
30
        ToolDefinition {
934
30
            name: "list_tasks".to_string(),
935
30
            description: Some("List tasks in a spec.".to_string()),
936
30
            input_schema: serde_json::json!({
937
30
                "type": "object",
938
30
                "properties": {
939
30
                    "project": { "type": "string" },
940
30
                    "spec_name": { "type": "string" }
941
30
                },
942
30
                "required": ["project", "spec_name"]
943
30
            }),
944
30
        },
945
30
        ToolDefinition {
946
30
            name: "update_task".to_string(),
947
30
            description: Some("Update a task by spec and task name.".to_string()),
948
30
            input_schema: mcp::update_task_schema(),
949
30
        },
950
30
        ToolDefinition {
951
30
            name: "delete_task".to_string(),
952
30
            description: Some("Delete a task inside a spec.".to_string()),
953
30
            input_schema: serde_json::json!({
954
30
                "type": "object",
955
30
                "properties": {
956
30
                    "project": { "type": "string" },
957
30
                    "spec_name": { "type": "string" },
958
30
                    "name": { "type": "string" }
959
30
                },
960
30
                "required": ["project", "spec_name", "name"]
961
30
            }),
962
30
        },
963
30
        ToolDefinition {
964
30
            name: "link_spec".to_string(),
965
30
            description: Some("Link a spec to a target node or quality attribute.".to_string()),
966
30
            input_schema: mcp::link_spec_schema(),
967
30
        },
968
30
        ToolDefinition {
969
30
            name: "unlink_spec".to_string(),
970
30
            description: Some("Unlink a spec by link_id.".to_string()),
971
30
            input_schema: serde_json::json!({
972
30
                "type": "object",
973
30
                "properties": {
974
30
                    "project": { "type": "string" },
975
30
                    "spec_name": { "type": "string" },
976
30
                    "link_id": { "type": "string" }
977
30
                },
978
30
                "required": ["project", "spec_name", "link_id"]
979
30
            }),
980
30
        },
981
30
        ToolDefinition {
982
30
            name: "link_task".to_string(),
983
30
            description: Some("Link a task to a target node or another task.".to_string()),
984
30
            input_schema: mcp::link_task_schema(),
985
30
        },
986
30
        ToolDefinition {
987
30
            name: "unlink_task".to_string(),
988
30
            description: Some("Unlink a task by link_id.".to_string()),
989
30
            input_schema: serde_json::json!({
990
30
                "type": "object",
991
30
                "properties": {
992
30
                    "project": { "type": "string" },
993
30
                    "spec_name": { "type": "string" },
994
30
                    "task_name": { "type": "string" },
995
30
                    "link_id": { "type": "string" }
996
30
                },
997
30
                "required": ["project", "spec_name", "task_name", "link_id"]
998
30
            }),
999
30
        },
1000
30
        ToolDefinition {
1001
30
            name: "create_project_architecture".to_string(),
1002
30
            description: Some(
1003
30
                "Create or update a complete project architecture in one call. Use confirm=false for validation and confirm=true to persist."
1004
30
                    .to_string(),
1005
30
            ),
1006
30
            input_schema: serde_json::json!({
1007
30
                "type": "object",
1008
30
                "properties": {
1009
30
                    "project": {
1010
30
                        "type": "object",
1011
30
                        "properties": {
1012
30
                            "name": { "type": "string", "description": "Project name" },
1013
30
                            "description": { "type": "string", "description": "Optional project description" },
1014
30
                            "project_type": { "type": "string", "description": "monorepo | single | multi" },
1015
30
                            "repository_url": { "type": "string", "description": "Optional repo URL" }
1016
30
                        }
1017
30
                    },
1018
30
                    "architecture": {
1019
30
                        "type": "object",
1020
30
                        "properties": {
1021
30
                            "style": { "type": "string", "description": "Architecture style (e.g., monolith, microservices)" },
1022
30
                            "deployment_model": { "type": "string", "description": "Deployment model (e.g., serverless, containers, on-prem)" },
1023
30
                            "constraints": {
1024
30
                                "description": "Constraints as list or 'none'",
1025
30
                                "type": "array",
1026
30
                                "items": { "type": "string" }
1027
30
                            }
1028
30
                        }
1029
30
                    },
1030
30
                    "containers": {
1031
30
                        "type": "array",
1032
30
                        "items": {
1033
30
                            "type": "object",
1034
30
                            "properties": {
1035
30
                                "name": { "type": "string" },
1036
30
                                "description": { "type": "string" },
1037
30
                                "path": { "type": "string" },
1038
30
                                "container_kind": { "type": "string", "description": tenet_domain::ContainerKind::HELP },
1039
30
                                "technology": { "type": "string" },
1040
30
                                "framework": { "type": "string" }
1041
30
                            }
1042
30
                        }
1043
30
                    },
1044
30
                    "components": {
1045
30
                        "type": "array",
1046
30
                        "items": {
1047
30
                            "type": "object",
1048
30
                            "properties": {
1049
30
                                "name": { "type": "string" },
1050
30
                                "description": { "type": "string" },
1051
30
                                "path": { "type": "string" },
1052
30
                                "parent_name": { "type": "string" },
1053
30
                                "parent_kind": { "type": "string", "description": tenet_domain::mcp::COMPONENT_PARENT_KIND_DESCRIPTION }
1054
30
                            }
1055
30
                        }
1056
30
                    },
1057
30
                    "stores": {
1058
30
                        "type": "array",
1059
30
                        "items": {
1060
30
                            "type": "object",
1061
30
                            "properties": {
1062
30
                                "name": { "type": "string" },
1063
30
                                "type": { "type": "string" },
1064
30
                                "ownership": { "type": "string", "description": tenet_domain::StoreOwnership::HELP },
1065
30
                                "description": { "type": "string" },
1066
30
                                "tags": { "type": "array", "items": { "type": "string" } }
1067
30
                            }
1068
30
                        }
1069
30
                    },
1070
30
                    "external_systems": {
1071
30
                        "type": "array",
1072
30
                        "items": {
1073
30
                            "type": "object",
1074
30
                            "properties": {
1075
30
                                "name": { "type": "string" },
1076
30
                                "category": { "type": "string" },
1077
30
                                "vendor": { "type": "string" },
1078
30
                                "description": { "type": "string" },
1079
30
                                "tags": { "type": "array", "items": { "type": "string" } }
1080
30
                            }
1081
30
                        }
1082
30
                    },
1083
30
                    "connections": {
1084
30
                        "type": "array",
1085
30
                        "items": {
1086
30
                            "type": "object",
1087
30
                            "properties": {
1088
30
                                "source_name": { "type": "string" },
1089
30
                                "source_kind": { "type": "string", "description": tenet_domain::ComponentParentKind::HELP },
1090
30
                                "target_name": { "type": "string" },
1091
30
                                "target_kind": { "type": "string", "description": tenet_domain::mcp::ARCHITECTURE_LINK_TARGET_KIND_DESCRIPTION },
1092
30
                                "label": { "type": "string" },
1093
30
                                "description": { "type": "string" }
1094
30
                            }
1095
30
                        }
1096
30
                    },
1097
30
                    "confirm": { "type": "boolean", "description": "Set true to create entities" }
1098
30
                },
1099
30
                "required": []
1100
30
            }),
1101
30
        },
1102
30
        ToolDefinition {
1103
30
            name: "link_quality_to_component".to_string(),
1104
30
            description: Some(
1105
30
                "Link a quality attribute to a component with optional notes and component-specific constraint overrides.".to_string(),
1106
30
            ),
1107
30
            input_schema: serde_json::json!({
1108
30
                "type": "object",
1109
30
                "properties": {
1110
30
                    "project": { "type": "string", "description": "Project name" },
1111
30
                    "quality_name": { "type": "string", "description": "Quality attribute name (case-insensitive)" },
1112
30
                    "component_name": { "type": "string", "description": "Component name (case-insensitive)" },
1113
30
                    "component_type": { "type": "string", "description": tenet_domain::QualityLinkComponentType::HELP },
1114
30
                    "override_constraints": {
1115
30
                        "type": "array",
1116
30
                        "items": { "type": "string" },
1117
30
                        "description": "Optional component-specific constraints"
1118
30
                    },
1119
30
                    "notes": { "type": "string", "description": "Optional notes" }
1120
30
                },
1121
30
                "required": ["project", "quality_name", "component_name", "component_type"]
1122
30
            }),
1123
30
        },
1124
30
        ToolDefinition {
1125
30
            name: "unlink_quality_from_component".to_string(),
1126
30
            description: Some(
1127
30
                "Remove a quality attribute link from a component so it no longer appears in working context.".to_string(),
1128
30
            ),
1129
30
            input_schema: serde_json::json!({
1130
30
                "type": "object",
1131
30
                "properties": {
1132
30
                    "project": { "type": "string", "description": "Project name" },
1133
30
                    "quality_name": { "type": "string", "description": "Quality attribute name (case-insensitive)" },
1134
30
                    "component_name": { "type": "string", "description": "Component name (case-insensitive)" },
1135
30
                    "component_type": { "type": "string", "description": tenet_domain::QualityLinkComponentType::HELP }
1136
30
                },
1137
30
                "required": ["project", "quality_name", "component_name", "component_type"]
1138
30
            }),
1139
30
        },
1140
    ]
1141
30
}