Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)));
    }
  • 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 };
    }
  • 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: {},
      },
    }),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IgorGanapolsky/mcp-memory-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server