// Tool handlers receive Kazzle-Tool-Context — read with toolContext(req) from // @kazzle/app/tools. Return { type: 'action_required', ... } only for thread // calls; from the Tools API return a normal domain error. See documents/apps.md. import { z } from 'zod'; import type { KazzleTool } from '@kazzle/app/tools'; export const SaveBookmarkInput = z.object({ url: z.string().url().describe('URL to save.'), title: z.string().optional().describe('Optional human-readable title for the bookmark.'), }).strict(); export const tools = [ { name: 'save_bookmark', displayName: 'Save bookmark', description: 'Save a bookmark URL and return a confirmation.', input: SaveBookmarkInput, target: { type: 'app', component: '{{APP_NAME}}', path: '/tools/save-bookmark', method: 'POST', body: '${input}', }, }, ] as const satisfies readonly KazzleTool[];