update_brand
Modify brand metadata for AI platform monitoring, including classification, description, category, or search prompts to track visibility.
Instructions
Update brand metadata: type, category, description, or monitoring prompts. All fields optional, only pass what you want to change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brandId | Yes | The brand ID to update | |
| type | No | Brand classification | |
| category | No | Business category (e.g. 'AI Resume Builder') | |
| description | No | Brand description (2 to 3 sentences) | |
| prompts | No | Exactly 3 search prompts to monitor |
Implementation Reference
- src/tools/brands.ts:134-147 (handler)The handler function that executes the 'update_brand' tool logic.
async ({ brandId, ...data }) => { try { const body = Object.fromEntries( Object.entries(data).filter(([, v]) => v !== undefined) ); const result = await client.patch<ApiResponse<BrandUpdateResult>>( `/brands/${encId(brandId)}`, body ); return jsonText(result.data); } catch (err) { return errorText(err); } } - src/tools/brands.ts:111-132 (schema)The input schema definition for the 'update_brand' tool.
inputSchema: z.object({ brandId: z.string().describe("The brand ID to update"), type: z .enum(["PERSON", "PRODUCT", "COMPANY", "SHOP"]) .optional() .describe("Brand classification"), category: z .string() .max(100) .optional() .describe("Business category (e.g. 'AI Resume Builder')"), description: z .string() .max(500) .optional() .describe("Brand description (2 to 3 sentences)"), prompts: z .array(z.string().min(5).max(200)) .length(3) .optional() .describe("Exactly 3 search prompts to monitor"), }), - src/tools/brands.ts:105-148 (registration)Registration of the 'update_brand' tool with the MCP server.
server.registerTool( "update_brand", { description: "Update brand metadata: type, category, description, or monitoring prompts. All fields optional, only pass what you want to change.", annotations: { idempotentHint: true }, inputSchema: z.object({ brandId: z.string().describe("The brand ID to update"), type: z .enum(["PERSON", "PRODUCT", "COMPANY", "SHOP"]) .optional() .describe("Brand classification"), category: z .string() .max(100) .optional() .describe("Business category (e.g. 'AI Resume Builder')"), description: z .string() .max(500) .optional() .describe("Brand description (2 to 3 sentences)"), prompts: z .array(z.string().min(5).max(200)) .length(3) .optional() .describe("Exactly 3 search prompts to monitor"), }), }, async ({ brandId, ...data }) => { try { const body = Object.fromEntries( Object.entries(data).filter(([, v]) => v !== undefined) ); const result = await client.patch<ApiResponse<BrandUpdateResult>>( `/brands/${encId(brandId)}`, body ); return jsonText(result.data); } catch (err) { return errorText(err); } } );