77 BulkDeleteCatalogItemsParamsSchema ,
88 CreateCatalogParamsSchema ,
99 DeleteCatalogItemParamsSchema ,
10+ DeleteCatalogParamsSchema ,
1011 GetCatalogFieldMappingsParamsSchema ,
1112 GetCatalogItemParamsSchema ,
1213 GetCatalogItemsParamsSchema ,
@@ -17,7 +18,6 @@ import {
1718 UpdateCatalogItemParamsSchema ,
1819} from "@iterable/api" ;
1920import type { Tool } from "@modelcontextprotocol/sdk/types.js" ;
20- import { z } from "zod" ;
2121
2222import { createTool } from "../schema-utils.js" ;
2323
@@ -27,7 +27,7 @@ export function createCatalogTools(client: IterableClient): Tool[] {
2727 name : "create_catalog" ,
2828 description : "Create a new catalog" ,
2929 schema : CreateCatalogParamsSchema ,
30- execute : ( params ) => client . createCatalog ( params . catalogName ) ,
30+ execute : ( params ) => client . createCatalog ( params ) ,
3131 } ) ,
3232 createTool ( {
3333 name : "update_catalog_items" ,
@@ -39,15 +39,13 @@ export function createCatalogTools(client: IterableClient): Tool[] {
3939 name : "get_catalog_item" ,
4040 description : "Get a specific catalog item by ID" ,
4141 schema : GetCatalogItemParamsSchema ,
42- execute : ( params ) =>
43- client . getCatalogItem ( params . catalogName , params . itemId ) ,
42+ execute : ( params ) => client . getCatalogItem ( params ) ,
4443 } ) ,
4544 createTool ( {
4645 name : "delete_catalog_item" ,
4746 description : "Delete a specific catalog item by ID" ,
4847 schema : DeleteCatalogItemParamsSchema ,
49- execute : ( params ) =>
50- client . deleteCatalogItem ( params . catalogName , params . itemId ) ,
48+ execute : ( params ) => client . deleteCatalogItem ( params ) ,
5149 } ) ,
5250 createTool ( {
5351 name : "get_catalogs" ,
@@ -71,10 +69,8 @@ export function createCatalogTools(client: IterableClient): Tool[] {
7169 createTool ( {
7270 name : "delete_catalog" ,
7371 description : "Delete a catalog" ,
74- schema : z . object ( {
75- catalogName : z . string ( ) . describe ( "Name of the catalog to delete" ) ,
76- } ) ,
77- execute : ( params ) => client . deleteCatalog ( params . catalogName ) ,
72+ schema : DeleteCatalogParamsSchema ,
73+ execute : ( params ) => client . deleteCatalog ( params ) ,
7874 } ) ,
7975 createTool ( {
8076 name : "update_catalog_field_mappings" ,
0 commit comments