elenchus_update_role_config
Update role enforcement settings including strict mode, minimum compliance score, and verifier/critic alternation requirement to control code verification behavior.
Instructions
Update role enforcement configuration. Can enable strict mode, change minimum compliance score, or toggle role alternation requirement.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "elenchus_update_role_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session ID | |
| strictMode | No | Reject non-compliant rounds | |
| minComplianceScore | No | Minimum compliance score (0-100) | |
| requireAlternation | No | Require verifier/critic alternation |
Implementation Reference
- src/tools/role-tools.ts:55-71 (handler)Handler function for the elenchus_update_role_config tool. Calls the core updateRoleConfig function with sessionId and optional config fields (strictMode, minComplianceScore, requireAlternation), then returns the updated config.
export async function updateRoleConfigTool( args: z.infer<typeof UpdateRoleConfigSchema> ): Promise<object | null> { const config = updateRoleConfig(args.sessionId, { strictMode: args.strictMode, minComplianceScore: args.minComplianceScore, requireAlternation: args.requireAlternation }); if (!config) return null; return { sessionId: args.sessionId, updated: true, newConfig: config }; } - src/tools/schemas.ts:217-222 (schema)Zod schema for UpdateRoleConfig. Defines sessionId (required string) and three optional fields: strictMode (boolean), minComplianceScore (number 0-100), requireAlternation (boolean).
export const UpdateRoleConfigSchema = z.object({ sessionId: z.string().describe('Session ID'), strictMode: z.boolean().optional().describe('Reject non-compliant rounds'), minComplianceScore: z.number().optional().describe('Minimum compliance score (0-100)'), requireAlternation: z.boolean().optional().describe('Require verifier/critic alternation') }); - src/tools/role-tools.ts:88-92 (registration)Registration entry in the roleTools map with description, schema reference, and handler reference.
elenchus_update_role_config: { description: 'Update role enforcement configuration. Can enable strict mode, change minimum compliance score, or toggle role alternation requirement.', schema: UpdateRoleConfigSchema, handler: updateRoleConfigTool } - src/roles/index.ts:504-513 (helper)Core updateRoleConfig function that retrieves the session's role state, merges the partial config update, and returns the new config object.
export function updateRoleConfig( sessionId: string, config: Partial<RoleEnforcementConfig> ): RoleEnforcementConfig | null { const state = roleStates.get(sessionId); if (!state) return null; state.config = { ...state.config, ...config }; return state.config; } - src/tools/index.ts:40-52 (registration)Composed tools export that spreads roleTools (including elenchus_update_role_config) into the main tools object.
// Compose all tools into a single export export const tools = { ...sessionLifecycleTools, ...issueManagementTools, ...mediatorTools, ...roleTools, ...reverifyTools, ...diffTools, ...cacheTools, ...pipelineTools, ...safeguardsTools, ...optimizationTools, ...dynamicRoleTools,