lb_projects_update
Toggle a project's active status to pause or resume Amazon organic ranking campaigns.
Instructions
Update a Listing Bureau project. Currently supports toggling the active status (pause/resume). To archive a project, use lb_projects_archive instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ui_id | Yes | Project unique identifier | |
| active | No | Set active status (true=resume, false=pause) |
Implementation Reference
- src/tools/projects.tools.ts:104-135 (registration)Registration of the lb_projects_update tool via server.tool(), includes schema definition (ui_id, active), hints, and the handler function.
server.tool( "lb_projects_update", "Update a Listing Bureau project. Currently supports toggling the active status (pause/resume). To archive a project, use lb_projects_archive instead.", { ui_id: z.string().describe("Project unique identifier"), active: z.boolean().optional().describe("Set active status (true=resume, false=pause)"), }, { idempotentHint: true }, async (params) => { try { const body: Record<string, unknown> = {}; if (params.active !== undefined) body.action = params.active ? "activate" : "pause"; if (Object.keys(body).length === 0) { return formatErrorResult( new Error("At least one field (active) must be provided"), ); } const res = await client.request<Project>( "PATCH", `/api/v1/projects/${encodeURIComponent(params.ui_id)}`, body, undefined, "lb_projects_update", ); return formatResult(res.data); } catch (e) { return formatErrorResult(e); } }, ); - src/tools/projects.tools.ts:112-135 (handler)Handler for lb_projects_update: builds a body with action 'activate' or 'pause' based on the active param, sends PATCH request to /api/v1/projects/{ui_id}, and returns formatted result.
async (params) => { try { const body: Record<string, unknown> = {}; if (params.active !== undefined) body.action = params.active ? "activate" : "pause"; if (Object.keys(body).length === 0) { return formatErrorResult( new Error("At least one field (active) must be provided"), ); } const res = await client.request<Project>( "PATCH", `/api/v1/projects/${encodeURIComponent(params.ui_id)}`, body, undefined, "lb_projects_update", ); return formatResult(res.data); } catch (e) { return formatErrorResult(e); } }, ); - src/tools/projects.tools.ts:107-110 (schema)Input schema for lb_projects_update: ui_id (string, required) and active (boolean, optional).
{ ui_id: z.string().describe("Project unique identifier"), active: z.boolean().optional().describe("Set active status (true=resume, false=pause)"), }, - src/index.ts:58-58 (registration)Registration call of registerProjectsTools in the main index.ts, which wires lb_projects_update into the MCP server.
registerProjectsTools(server, client);