Skip to main content
Glama

review.security.compare

Compare MCP and ReviewExtension configurations to maintain single source of truth and prevent configuration conflicts.

Instructions

Compare MCP config with ReviewExtention config to ensure SSOT

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYes

Implementation Reference

  • Handler logic for the 'review.security.compare' tool: loads current security config, performs comparison via helper, and returns JSON result.
    case "review.security.compare": {
      const currentConfig = await loadSecurityConfig(args.cwd as string);
      const comparison = await compareWithReviewExtention(args.cwd as string, currentConfig);
      
      return {
        content: [
          { 
            type: "text", 
            text: JSON.stringify({
              currentSource: currentConfig.source,
              matching: comparison.matching,
              differences: comparison.differences
            }) 
          }
        ]
      };
    }
  • Core implementation: reloads config from ReviewExtention Ruby script, compares key fields (maxFileSize, allowedExtensions, allowedPaths), computes differences.
    export async function compareWithReviewExtention(
      cwd: string,
      currentConfig: SecurityConfig
    ): Promise<{ matching: boolean; differences: string[] }> {
      
      const reviewExtConfig = await loadFromReviewExtention(cwd);
      
      if (!reviewExtConfig) {
        return { matching: false, differences: ["ReviewExtention config not available"] };
      }
      
      const differences: string[] = [];
      
      if (currentConfig.maxFileSize !== reviewExtConfig.maxFileSize) {
        differences.push(`Max file size: MCP=${currentConfig.maxFileSize}, ReviewExt=${reviewExtConfig.maxFileSize}`);
      }
      
      const extDiff = arrayDifference(currentConfig.allowedExtensions, reviewExtConfig.allowedExtensions);
      if (extDiff.length > 0) {
        differences.push(`Allowed extensions differ: ${extDiff.join(", ")}`);
      }
      
      const pathDiff = arrayDifference(currentConfig.allowedPaths, reviewExtConfig.allowedPaths);
      if (pathDiff.length > 0) {
        differences.push(`Allowed paths differ: ${pathDiff.join(", ")}`);
      }
      
      return {
        matching: differences.length === 0,
        differences
      };
    }
  • Tool schema definition including name, description, and input schema requiring 'cwd'.
    {
      name: "review.security.compare",
      description: "Compare MCP config with ReviewExtention config to ensure SSOT",
      inputSchema: {
        type: "object",
        properties: { cwd: { type: "string" } },
        required: ["cwd"]
      }
    }
  • Utility function to compute symmetric difference between two string arrays for config comparison.
    function arrayDifference(arr1: string[], arr2: string[]): string[] {
      const set1 = new Set(arr1);
      const set2 = new Set(arr2);
      const diff: string[] = [];
      
      for (const item of set1) {
        if (!set2.has(item)) diff.push(`+${item}`);
      }
      for (const item of set2) {
        if (!set1.has(item)) diff.push(`-${item}`);
      }
      
      return diff;
    }
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 mentions 'compare' and 'ensure SSOT', which implies a read-only validation operation, but doesn't specify if it's safe, what permissions are needed, whether it makes changes, or what the output looks like. For a security-related tool with zero annotation coverage, this is a significant gap in transparency.

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 states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly. However, it could be more structured by including key details, but it earns points for brevity.

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

Completeness2/5

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

Given the complexity of a security comparison tool with no annotations, no output schema, and a parameter with 0% coverage, the description is incomplete. It doesn't explain what 'SSOT' entails, what configs are compared, what happens if discrepancies are found, or how to interpret results. For such a tool, more context is needed to be adequately helpful.

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

Parameters2/5

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

The description provides no information about the single parameter 'cwd'. With 0% schema description coverage, the parameter is undocumented in both the schema and the description. The description fails to compensate for this gap by not explaining what 'cwd' means or how it should be used in the comparison process.

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

Purpose3/5

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

The description states the tool compares MCP config with ReviewExtension config to ensure SSOT (Single Source of Truth), which gives a vague purpose. It mentions 'compare' and 'ensure SSOT' but doesn't specify what resources or data are being compared, nor does it distinguish from siblings like 'review.security.config' or 'review.security.validate-mapfile'. The purpose is understandable but lacks specificity.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, and with siblings like 'review.security.config' and 'review.security.validate-mapfile', there's no indication of how this tool differs or when it should be chosen over them. The description lacks any usage instructions.

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/dsgarage/ReviewMCP'

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