fix: update all tests and MCP catalog tool for manufacturerId schema migration

This commit is contained in:
2026-04-18 16:30:11 +02:00
parent a508773809
commit 0b4715b80c
7 changed files with 135 additions and 41 deletions

View File

@@ -22,10 +22,10 @@ function errorResult(message: string): ToolResult {
}
const catalogItemInputSchema = {
brand: z.string().describe("Brand or manufacturer name"),
manufacturerSlug: z.string().describe("Manufacturer slug (e.g. 'revelate-designs', 'apidura')"),
model: z
.string()
.describe("Model name — combined with brand forms the unique identifier"),
.describe("Model name — combined with manufacturerSlug forms the unique identifier"),
category: z
.string()
.optional()
@@ -80,7 +80,7 @@ export const catalogToolDefinitions = [
export function registerCatalogTools(db: Db) {
return {
upsert_catalog_item: async (args: {
brand: string;
manufacturerSlug: string;
model: string;
category?: string;
weightGrams?: number;
@@ -105,7 +105,7 @@ export function registerCatalogTools(db: Db) {
bulk_upsert_catalog: async (args: {
items: Array<{
brand: string;
manufacturerSlug: string;
model: string;
category?: string;
weightGrams?: number;