Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix(resources): updateAbility recertifyEveryDays optional to match MCP schema test

Sidwebworkse7c67aa8b751
diff --git a/apps/erp/app/modules/resources/resources.service.ts b/apps/erp/app/modules/resources/resources.service.ts
index c2583e582a..8582a65219 100644
--- a/apps/erp/app/modules/resources/resources.service.ts
+++ b/apps/erp/app/modules/resources/resources.service.ts
@@ -1256,11 +1256,11 @@ export async function updateAbility(
client: SupabaseClient<Database>,
id: string,
ability: {
- // Name is not stored — it derives from the linked process. Only the
- // recertification cadence is editable on an ability, and it is always
- // sent (as null to clear), so it is a required field of the update.
+ // Name is not stored — it derives from the linked process; it appears in
+ // the MCP schema for caller context only. The recertification cadence is
+ // the one editable field. Both are optional in the published schema.
name?: string;
- recertifyEveryDays: number | null;
+ recertifyEveryDays?: number | null;
}
) {
return client.from("ability").update(ability).eq("id", id);
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json b/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json
index 9124c2bbac..f72297facc 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json
+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-manifest.digest.json
@@ -1162,7 +1162,7 @@
{"name":"resources_insertMaintenanceDispatch","classification":"WRITE","paramCount":14,"schema":"b192bab74c65","response":"ede36af7307d","injectAuth":"companyId+createdBy+updatedBy","permission":"resources:create","paginates":false},
{"name":"resources_processDeactivate","classification":"WRITE","paramCount":1,"schema":"01edb53077b2","response":"bcde375ebd4c","injectAuth":"companyId","permission":"resources:update","paginates":false},
{"name":"resources_resolveEmployeeAbilityExpiresAt","classification":"WRITE","paramCount":3,"schema":"ec5fc6dfaa43","response":"174e29b899b9","injectAuth":"companyId","permission":"resources:update","paginates":false},
- {"name":"resources_updateAbility","classification":"WRITE","paramCount":2,"schema":"b92248235d76","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"resources:update","paginates":false},
+ {"name":"resources_updateAbility","classification":"WRITE","paramCount":2,"schema":"331c98a989f9","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"resources:update","paginates":false},
{"name":"resources_updateMaintenanceDispatch","classification":"WRITE","paramCount":18,"schema":"02877e9f1f8d","response":"3797626bd17e","injectAuth":"companyId+updatedBy","permission":"resources:update","paginates":false},
{"name":"resources_updateSuggestionEmoji","classification":"WRITE","paramCount":2,"schema":"dc61bce0f764","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"resources:update","paginates":false},
{"name":"resources_updateSuggestionTags","classification":"WRITE","paramCount":2,"schema":"ab3b2e298cdb","response":"bcde375ebd4c","injectAuth":"companyId+updatedBy","permission":"resources:update","paginates":false},