Skip to main content
Glama

developer_rules

Access developer rules and checklists to maintain high-quality, secure code across security, performance, and maintainability categories.

Instructions

Provides comprehensive developer rules and checklists for maintaining high-quality, secure code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesCategory of rules

Implementation Reference

  • Main execution function for the 'developer_rules' tool. Generates markdown checklists for developer best practices in categories like security, performance, and maintainability.
    export function developerRulesHandler(args: any) {
        const { category } = args;
    
        const rules = `# Developer Rules & Best Practices
    
    ## Category: ${category}
    
    ---
    
    ${category === "security" || category === "all" ? `
    ## 🔒 Security Rules
    
    ### Dependencies
    - [ ] Run \`npm audit\` before every release
    - [ ] Enable automated security updates (Dependabot)
    - [ ] Never use deprecated packages
    - [ ] Review dependency changelogs before updating
    - [ ] Pin production dependencies to exact versions
    
    ### Code Security
    - [ ] Validate ALL user inputs (server-side)
    - [ ] Use parameterized queries (prevent SQL injection)
    - [ ] Escape output (prevent XSS)
    - [ ] Implement proper authentication (OAuth, JWT)
    - [ ] Use HTTPS everywhere
    - [ ] Set security headers (CSP, HSTS, X-Frame-Options)
    
    ### Secrets
    - [ ] NEVER commit secrets to git
    - [ ] Use environment variables
    - [ ] Rotate keys regularly
    - [ ] Use secret managers (Vault, AWS Secrets)
    
    ### Docker Security
    - [ ] Scan images: \`docker scout cves <image>\`
    - [ ] Use official base images
    - [ ] Run as non-root user
    - [ ] Keep images minimal (Alpine)
    ` : ""}
    
    ${category === "performance" || category === "all" ? `
    ## âš¡ Performance Rules
    
    ### Code
    - [ ] Profile before optimizing
    - [ ] Use appropriate data structures
    - [ ] Avoid N+1 queries
    - [ ] Implement caching where appropriate
    - [ ] Lazy load heavy resources
    
    ### Frontend
    - [ ] Bundle & minify assets
    - [ ] Optimize images (WebP, lazy loading)
    - [ ] Use CDN for static assets
    - [ ] Implement code splitting
    - [ ] Add proper caching headers
    
    ### Backend
    - [ ] Use connection pooling
    - [ ] Implement request rate limiting
    - [ ] Add database indexes
    - [ ] Use async/await properly
    - [ ] Monitor memory usage
    ` : ""}
    
    ${category === "maintainability" || category === "all" ? `
    ## 🔧 Maintainability Rules
    
    ### Code Quality
    - [ ] Follow language style guides
    - [ ] Use linters (ESLint, Pylint, etc.)
    - [ ] Write self-documenting code
    - [ ] Keep functions small (<50 lines)
    - [ ] DRY - Don't Repeat Yourself
    
    ### Documentation
    - [ ] Maintain README.md
    - [ ] Document public APIs
    - [ ] Write clear commit messages
    - [ ] Create Architecture Decision Records
    
    ### Testing
    - [ ] Write tests before/with code
    - [ ] Aim for >80% coverage
    - [ ] Test edge cases
    - [ ] Run tests in CI/CD
    
    ### Git
    - [ ] Use feature branches
    - [ ] Write descriptive PRs
    - [ ] Review code before merging
    - [ ] Keep commits atomic
    ` : ""}
    
    ---
    
    ## Automated Enforcement
    
    ### Pre-commit Hooks
    \`\`\`bash
    npx husky install
    npx husky add .husky/pre-commit "npm run lint && npm test"
    \`\`\`
    
    ### CI/CD Checks
    - Lint on every push
    - Test on every PR
    - Security scan weekly
    - Dependency updates automated
    `;
    
        return { content: [{ type: "text", text: rules }] };
    }
  • Zod input schema definition for the 'developer_rules' tool, specifying the 'category' parameter.
    export const developerRulesSchema = {
        name: "developer_rules",
        description: "Provides comprehensive developer rules and checklists for maintaining high-quality, secure code.",
        inputSchema: z.object({
            category: z.enum(["security", "performance", "maintainability", "all"]).describe("Category of rules")
        })
    };
  • src/server.ts:122-122 (registration)
    Registration of the 'developer_rules' tool in the HTTP server's tool registry map.
    ["developer_rules", { schema: developerRulesSchema, handler: developerRulesHandler }],
  • src/index.ts:117-117 (registration)
    Registration of the 'developer_rules' tool in the MCP server's tool registry map.
    ["developer_rules", { schema: developerRulesSchema, handler: developerRulesHandler }],
  • src/server.ts:56-61 (registration)
    Import statement bringing in the schema and handler for 'developer_rules' from fullstack.ts in the server file.
        trackProjectSchema, trackProjectHandler,
        checkDependenciesSchema, checkDependenciesHandler,
        generateGitHubActionsSchema, generateGitHubActionsHandler,
        fullStackScaffoldSchema, fullStackScaffoldHandler,
        developerRulesSchema, developerRulesHandler
    } from "./tools/fullstack.js";
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'provides' rules and checklists, implying a read-only operation, but doesn't clarify if it's a lookup, generation, or analysis tool, nor does it mention permissions, rate limits, or output format details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary elaboration. It could be slightly more specific but doesn't waste words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter with full schema coverage) and lack of annotations or output schema, the description is minimally adequate. However, it doesn't fully compensate for the absence of behavioral details or output information, leaving gaps in understanding how the tool behaves.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for its single parameter 'category' with an enum, so the schema fully documents it. The description doesn't add any parameter-specific details beyond what the schema provides, resulting in a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Provides comprehensive developer rules and checklists for maintaining high-quality, secure code.' It specifies the verb ('provides') and resource ('developer rules and checklists'), though it doesn't explicitly differentiate from sibling tools like 'lint_code' or 'validate_code' which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'lint_code' or 'validate_code' that might serve similar purposes, nor does it provide context about prerequisites or exclusions for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/millsydotdev/Code-MCP'

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