UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","description"]}}]'::jsonb) WHERE name = 'manage_journal_entry';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","template_name"]}}]'::jsonb) WHERE name = 'manage_accounting_template';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"add"}}},"then":{"required":["action","account_code","account_name","account_type","account_category","normal_balance"]}}]'::jsonb) WHERE name = 'manage_chart_of_accounts';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","code","name"]}}]'::jsonb) WHERE name = 'manage_analytic_account';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","name"]}}]'::jsonb) WHERE name = 'manage_vendor';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","counterparty_name","title"]}}]'::jsonb) WHERE name = 'manage_contract';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","name"]}}]'::jsonb) WHERE name = 'manage_employee';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","employee_id","start_date","end_date"]}}]'::jsonb) WHERE name = 'manage_leave';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","title"]}}]'::jsonb) WHERE name = 'manage_job_posting';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","name"]}}]'::jsonb) WHERE name = 'manage_project';
UPDATE public.agent_skills SET tool_definition = jsonb_set(tool_definition, '{function,parameters,allOf}', '[{"if":{"properties":{"action":{"const":"create"}}},"then":{"required":["action","project_id","title"]}}]'::jsonb) WHERE name = 'manage_project_task';