Skip to main content
Glama

lc_rule_instructions

Generate step-by-step instructions for creating custom rules in your codebase to automate processes and enforce standards.

Instructions

Provides step-by-step instructions for creating custom rules. Args: root_path: Root directory path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
root_pathYes

Implementation Reference

  • Handler function for the lc_rule_instructions tool, registered via @mcp.tool() decorator. It creates an ExecutionEnvironment from the root_path and delegates to commands.get_focus_help(env) to retrieve the instructions.
    @mcp.tool() def lc_rule_instructions(root_path: str) -> str: """Provides step-by-step instructions for creating custom rules. Args: root_path: Root directory path """ env = ExecutionEnvironment.create(Path(root_path)) with env.activate(): return commands.get_focus_help(env)
  • Helper function called by the tool handler. It instantiates a ContextGenerator with specific settings and returns its focus_help() output.
    def get_focus_help(env: ExecutionEnvironment) -> str: settings = ContextSettings.create(False, False, True, False) generator = ContextGenerator.create(env.config, env.state.file_selection, settings) return generator.focus_help()
  • The core logic of the tool: retrieves the content of the 'lc/ins-rule-framework' rule, which provides the step-by-step instructions for creating custom rules.
    def focus_help(self) -> str: rule_provider = RuleProvider.create(self.spec.project_layout) return rule_provider.get_rule_content("lc/ins-rule-framework") or ""

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/cyberchitta/llm-context.py'

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