Skip to main content
Glama
evalops

Deep Code Reasoning MCP Server

by evalops

continue_conversation

Extend ongoing code analysis conversations by providing session ID and follow-up message. Enable inclusion of code snippets for detailed responses. Integrates Claude Code and Google's Gemini AI for comprehensive debugging and long-trace analysis.

Instructions

Continue an ongoing analysis conversation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_code_snippetsNoWhether to include code snippets in response
messageYesClaude's response or follow-up question
session_idYesID of the conversation session

Implementation Reference

  • Top-level MCP tool handler for 'continue_conversation' that validates input and delegates to DeepCodeReasonerV2.continueConversation.
    case 'continue_conversation': {
      const parsed = ContinueConversationSchema.parse(args);
      const result = await deepReasoner.continueConversation(
        parsed.session_id,
        parsed.message,
        parsed.include_code_snippets,
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Zod input schema validation for the continue_conversation tool parameters.
    const ContinueConversationSchema = z.object({
      session_id: z.string(),
      message: z.string(),
      include_code_snippets: z.boolean().optional(),
    });
  • src/index.ts:362-383 (registration)
    Registration of the continue_conversation tool in the MCP server's tools list with description and input schema.
    {
      name: 'continue_conversation',
      description: 'Continue an ongoing analysis conversation',
      inputSchema: {
        type: 'object',
        properties: {
          session_id: {
            type: 'string',
            description: 'ID of the conversation session',
          },
          message: {
            type: 'string',
            description: 'Claude\'s response or follow-up question',
          },
          include_code_snippets: {
            type: 'boolean',
            description: 'Whether to include code snippets in response',
          },
        },
        required: ['session_id', 'message'],
      },
    },
  • Handler in DeepCodeReasonerV2 managing session locking, history tracking, and delegating to ConversationalGeminiService.continueConversation.
    async continueConversation(
      sessionId: string,
      message: string,
      includeCodeSnippets?: boolean,
    ): Promise<{
      response: string;
      analysisProgress: number;
      canFinalize: boolean;
      status: string;
    }> {
      // Acquire lock before processing
      const lockAcquired = this.conversationManager.acquireLock(sessionId);
      if (!lockAcquired) {
        throw new ConversationLockedError(sessionId);
      }
    
      try {
        // Validate session
        const session = this.conversationManager.getSession(sessionId);
        if (!session) {
          throw new SessionNotFoundError(sessionId);
        }
    
        // Add Claude's message to conversation history
        this.conversationManager.addTurn(sessionId, 'claude', message);
    
        // Continue with Gemini
        const { response, analysisProgress, canFinalize } = await this.conversationalGemini.continueConversation(
          sessionId,
          message,
          includeCodeSnippets,
        );
    
        // Track Gemini's response
        this.conversationManager.addTurn(sessionId, 'gemini', response);
    
        // Update progress
        this.conversationManager.updateProgress(sessionId, {
          confidenceLevel: analysisProgress,
        });
    
        return {
          response,
          analysisProgress,
          canFinalize,
          status: session.status,
        };
      } catch (error) {
        console.error('Failed to continue conversation:', error);
        throw error;
      } finally {
        // Always release lock
        this.conversationManager.releaseLock(sessionId);
      }
    }
  • Core handler implementing the Gemini API call for continuing the conversation, including prompt sanitization and response processing.
      async continueConversation(
        sessionId: string,
        message: string,
        includeCodeSnippets?: boolean,
      ): Promise<{ response: string; analysisProgress: number; canFinalize: boolean }> {
        const chat = this.activeSessions.get(sessionId);
        const context = this.sessionContexts.get(sessionId);
    
        if (!chat || !context) {
          throw new SessionNotFoundError(sessionId);
        }
    
        // Sanitize the incoming message
        const sanitizedMessage = PromptSanitizer.sanitizeString(message);
    
        // Check for potential injection attempts
        if (PromptSanitizer.containsInjectionAttempt(message)) {
          console.warn(`Potential injection attempt in session ${sessionId}:`, message.substring(0, 100));
        }
    
        // Process Claude's message with safety wrapper
        let processedMessage = `REMINDER: The following is a message from Claude in our ongoing analysis conversation. Focus on the technical analysis task.
    
    <CLAUDE_MESSAGE>
    ${sanitizedMessage}
    </CLAUDE_MESSAGE>`;
    
        if (includeCodeSnippets && this.hasCodeReference(message)) {
          const enrichedContent = this.enrichMessageWithCode(sanitizedMessage, context.codeFiles);
          processedMessage += `\n\n${enrichedContent}`;
        }
    
        // Send message to Gemini
        const result = await chat.sendMessage(processedMessage);
        const response = result.response.text();
    
        // Calculate analysis progress
        const progress = this.calculateProgress(chat, context);
        const canFinalize = progress >= 0.8;
    
        return {
          response,
          analysisProgress: progress,
          canFinalize,
        };
      }
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. 'Continue' implies a stateful interaction, but the description doesn't reveal what 'continue' does—whether it sends a message, updates a session, triggers analysis, or returns data. It lacks details on permissions, side effects, or response format, leaving significant gaps for an agent to understand the tool's behavior.

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 with no wasted words. It's front-loaded with the core action, though it could be more informative. The brevity is appropriate but borders on under-specification given the tool's complexity.

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 tool's likely complexity (involving ongoing conversations with parameters like session_id and message), no annotations, and no output schema, the description is incomplete. It doesn't explain what 'continue' means in practice, what the tool returns, or how it fits into the broader conversation workflow, making it inadequate for an agent to use effectively.

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?

Schema description coverage is 100%, so the schema fully documents the three parameters (session_id, message, include_code_snippets). The description adds no meaning beyond this, such as explaining how parameters interact (e.g., 'message' is Claude's input to continue the conversation) or providing usage examples. Baseline 3 is appropriate when schema does the heavy lifting.

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 'Continue an ongoing analysis conversation' states a verb ('Continue') and resource ('ongoing analysis conversation'), providing a basic purpose. However, it's vague about what 'continue' entails operationally and doesn't distinguish this tool from sibling tools like 'get_conversation_status' or 'finalize_conversation', which also relate to conversation management.

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 specify prerequisites (e.g., requires an existing session started with 'start_conversation'), exclusions, or contextual cues for choosing it over other conversation-related tools in the sibling list.

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