Open History to see the last commit
1import { toolDefinition } from '@tanstack/ai'
2import { z } from 'zod'
3
4// Tool definition for selecting add-ons
5export const selectAddOnsToolDef = toolDefinition({
6 name: 'selectAddOns',
7 description:
8 'Select one or more add-ons by their IDs. This will enable the specified add-ons for the project. Only pass add-ons that are currently not selected.',
9 inputSchema: z.object({
10 addOnIds: z
11 .array(z.string())
12 .describe('Array of add-on IDs to select/enable'),
13 }),
14 outputSchema: z.object({
15 success: z.boolean(),
16 selectedAddOns: z.array(z.string()),
17 message: z.string(),
18 }),
19})
20
21// Tool definition for unselecting add-ons
22export const unselectAddOnsToolDef = toolDefinition({
23 name: 'unselectAddOns',
24 description:
25 'Unselect one or more add-ons by their IDs. This will disable the specified add-ons for the project. Only pass add-ons that are currently selected and can be disabled (enabled=true).',
26 inputSchema: z.object({
27 addOnIds: z
28 .array(z.string())
29 .describe('Array of add-on IDs to unselect/disable'),
30 }),
31 outputSchema: z.object({
32 success: z.boolean(),
33 unselectedAddOns: z.array(z.string()),
34 message: z.string(),
35 }),
36})
37