get_reliability_rules
Retrieve active prevention rules and success patterns to enhance system reliability and prevent failures in memory management.
Instructions
Retrieve active prevention rules and success patterns. Aliased to prevention_rules.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- adapters/mcp/server-stdio.js:384-387 (handler)The handler for 'prevention_rules' (aliased from 'get_reliability_rules') which calls 'writePreventionRules'.
case 'prevention_rules': { const outputPath = args.outputPath ? resolveSafePath(args.outputPath) : undefined; return toTextResult(writePreventionRules(outputPath, Number(args.minOccurrences || 2))); } - scripts/feedback-loop.js:1097-1113 (helper)The implementation of 'writePreventionRules' which generates the markdown and registers it with the context system.
function writePreventionRules(filePath, minOccurrences = 2) { const { PREVENTION_RULES_PATH } = getFeedbackPaths(); const outPath = filePath || PREVENTION_RULES_PATH; const markdown = buildPreventionRules(minOccurrences); ensureDir(path.dirname(outPath)); fs.writeFileSync(outPath, `${markdown}\n`); const contextFs = getContextFsModule(); if (contextFs && typeof contextFs.registerPreventionRules === 'function') { try { contextFs.registerPreventionRules(markdown, { minOccurrences, outputPath: outPath }); } catch { // Non-critical } } return { path: outPath, markdown }; } - scripts/tool-registry.js:195-202 (registration)Definition and registration of the 'get_reliability_rules' tool.
readOnlyTool({ name: 'get_reliability_rules', description: 'Retrieve active prevention rules and success patterns. Aliased to prevention_rules.', inputSchema: { type: 'object', properties: {}, }, }),