Skip to main content
Glama
evalops

Deep Code Reasoning MCP Server

by evalops

cross_system_impact

Analyze the impact of code changes across distributed systems using Gemini AI. Identify breaking, performance, and behavioral effects by specifying files and services for comprehensive cross-boundary debugging.

Instructions

Use Gemini to analyze changes across service boundaries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
change_scopeYes
impact_typesNo

Implementation Reference

  • Core handler function that performs the cross-system impact analysis: reads changed files and related service files (Services, Controllers, Clients), gathers code content, and delegates to Gemini service for analysis.
    async analyzeCrossSystemImpact(
      changeScope: string[],
      impactTypes?: string[],
    ): Promise<{
      analysis: string;
      filesAnalyzed: string[];
      impactTypes: string[];
    }> {
      const codeFiles = new Map<string, string>();
    
      // Read all files in change scope
      for (const file of changeScope) {
        try {
          const content = await this.codeReader.readFile(file);
          codeFiles.set(file, content);
    
          // Also read related service files
          const relatedFiles = await this.codeReader.findRelatedFiles(file, ['Service', 'Controller', 'Client']);
          for (const related of relatedFiles) {
            const relatedContent = await this.codeReader.readFile(related);
            codeFiles.set(related, relatedContent);
          }
        } catch (error) {
          console.error(`Failed to read ${file}:`, error);
        }
      }
    
      // Use Gemini for cross-system analysis
      const analysis = await this.geminiService.performCrossSystemAnalysis(
        codeFiles,
        changeScope,
      );
    
      return {
        analysis,
        filesAnalyzed: Array.from(codeFiles.keys()),
        impactTypes: impactTypes || ['breaking', 'performance', 'behavioral'],
      };
    }
  • Zod schema defining input validation for the cross_system_impact tool, matching the MCP inputSchema.
    const CrossSystemImpactSchema = z.object({
      change_scope: z.object({
        files: z.array(z.string()),
        service_names: z.array(z.string()).optional(),
      }),
      impact_types: z.array(z.enum(['breaking', 'performance', 'behavioral'])).optional(),
    });
  • src/index.ts:256-276 (registration)
    MCP tool registration in ListTools handler, defining name, description, and inputSchema for cross_system_impact.
      name: 'cross_system_impact',
      description: 'Use Gemini to analyze changes across service boundaries',
      inputSchema: {
        type: 'object',
        properties: {
          change_scope: {
            type: 'object',
            properties: {
              files: { type: 'array', items: { type: 'string' } },
              service_names: { type: 'array', items: { type: 'string' } },
            },
            required: ['files'],
          },
          impact_types: {
            type: 'array',
            items: { type: 'string', enum: ['breaking', 'performance', 'behavioral'] },
          },
        },
        required: ['change_scope'],
      },
    },
  • MCP CallTool request handler case that parses input, validates files, calls the deepReasoner handler, and formats response.
    case 'cross_system_impact': {
      const parsed = CrossSystemImpactSchema.parse(args);
    
      // Validate file paths
      const validatedFiles = InputValidator.validateFilePaths(parsed.change_scope.files);
      if (validatedFiles.length === 0) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'No valid file paths provided',
        );
      }
    
      const result = await deepReasoner.analyzeCrossSystemImpact(
        validatedFiles,
        parsed.impact_types,
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
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 using Gemini (implying AI/ML analysis) but doesn't describe what the tool actually does behaviorally—e.g., whether it makes API calls, processes data locally, requires specific permissions, has rate limits, or what the output format might be. The description is too high-level to guide an agent on how the tool behaves.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration. Every word earns its place.

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 (2 parameters with nested objects, 0% schema coverage, no annotations, no output schema), the description is incomplete. It doesn't explain what the tool returns, how to interpret parameters, or behavioral details. For an analysis tool with undocumented inputs and no structured guidance, more context is needed to be useful.

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 schema has 0% description coverage, so parameters are undocumented in the schema. The description doesn't mention any parameters or their meanings. It doesn't explain what 'change_scope' or 'impact_types' represent, leaving the agent to guess based on property names alone. For a tool with 2 parameters and nested objects, this is a significant gap.

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 uses Gemini to analyze changes across service boundaries, which provides a general purpose (analyze changes) and resource (service boundaries). However, it's vague about what specific analysis is performed and doesn't distinguish this from sibling tools like 'escalate_analysis' or 'trace_execution_path' that might also involve analysis. The phrase 'analyze changes' is somewhat generic.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or exclusions. Given sibling tools like 'escalate_analysis' and 'hypothesis_test' that might overlap in analysis functions, there's no differentiation to help an agent choose correctly.

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

Related 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/evalops/deep-code-reasoning-mcp'

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