Skip to main content
Glama
chirag127
by chirag127

collaborativereasoning

Simulate expert collaboration to tackle complex problems by coordinating diverse perspectives and integrating insights through structured reasoning frameworks.

Instructions

A detailed tool for simulating expert collaboration with diverse perspectives. This tool helps models tackle complex problems by coordinating multiple viewpoints. It provides a framework for structured collaborative reasoning and perspective integration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
personasYes
contributionsYes
stageYes
activePersonaIdYes
nextPersonaIdNo
consensusPointsNo
disagreementsNo
keyInsightsNo
openQuestionsNo
finalRecommendationNo
sessionIdYesUnique identifier for this collaboration session
iterationYesCurrent iteration of the collaboration
suggestedContributionTypesNo
nextContributionNeededYesWhether another contribution is needed

Implementation Reference

  • Implementation of the CollaborativeReasoningServer class which handles processing the collaborative reasoning task.
    export class CollaborativeReasoningServer {
      private validateInputData(input: unknown): CollaborativeReasoningData {
        const data = input as CollaborativeReasoningData;
        if (!data.topic || !data.personas || !data.contributions || !data.stage || !data.activePersonaId || !data.sessionId) {
          throw new Error("Invalid input for CollaborativeReasoning: Missing required fields.");
        }
        if (typeof data.iteration !== 'number' || data.iteration < 0) {
            throw new Error("Invalid iteration value for CollaborativeReasoningData.");
        }
        if (typeof data.nextContributionNeeded !== 'boolean') {
            throw new Error("Invalid nextContributionNeeded value for CollaborativeReasoningData.");
        }
        return data;
      }
    
      private formatOutput(data: CollaborativeReasoningData): string {
        const { topic, personas, contributions, stage, activePersonaId, iteration } = data;
        
        let output = `\n${chalk.bold.blue('Collaborative Reasoning Session')}\n`;
        output += `${chalk.bold.green('Topic:')} ${topic}\n`;
        output += `${chalk.bold.yellow('Stage:')} ${stage} (Iteration: ${iteration})\n`;
        
        // Active persona
        const activePersona = personas.find(p => p.id === activePersonaId);
        if (activePersona) {
          output += `\n${chalk.bold.magenta('Active Persona:')} ${activePersona.name}\n`;
          output += `${chalk.bold.cyan('Expertise:')} ${activePersona.expertise.join(', ')}\n`;
          output += `${chalk.bold.cyan('Perspective:')} ${activePersona.perspective}\n`;
        }
        
        // Contributions
        if (contributions.length > 0) {
          output += `\n${chalk.bold.green('Contributions:')}\n`;
          
          for (const contribution of contributions) {
            const persona = personas.find(p => p.id === contribution.personaId);
            const personaName = persona ? persona.name : contribution.personaId;
            
            output += `${chalk.bold(`${personaName} (${contribution.type}, confidence: ${contribution.confidence.toFixed(2)}):`)} `;
            output += `${contribution.content}\n\n`;
          }
        }
        
        // Consensus points
        if (data.consensusPoints && data.consensusPoints.length > 0) {
          output += `\n${chalk.bold.green('Consensus Points:')}\n`;
          data.consensusPoints.forEach((point, i) => {
            output += `${chalk.bold(`${i+1}.`)} ${point}\n`;
          });
        }
        
        // Key insights
        if (data.keyInsights && data.keyInsights.length > 0) {
          output += `\n${chalk.bold.yellow('Key Insights:')}\n`;
          data.keyInsights.forEach((insight, i) => {
            output += `${chalk.bold(`${i+1}.`)} ${insight}\n`;
          });
        }
        
        // Final recommendation
        if (data.finalRecommendation) {
          output += `\n${chalk.bold.cyan('Final Recommendation:')}\n${data.finalRecommendation}\n`;
        }
        
        return output;
      }
    
      public processCollaborativeReasoning(input: unknown): CollaborativeReasoningData {
        const validatedData = this.validateInputData(input);
        
        // Log formatted output to console
        const formattedOutput = this.formatOutput(validatedData);
        console.error(formattedOutput);
        
        return validatedData;
      }
    }
  • The tool registration handler in src/index.ts that invokes the collaborativeReasoningServer instance.
    case "collaborativereasoning": {
        const result =
            collaborativeReasoningServer.processCollaborativeReasoning(
                request.params.arguments
            );
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(result, null, 2),
                },
            ],
        };
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.2

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool's function as a simulation framework but lacks details on operational traits: it doesn't mention if it's stateful (e.g., requires session management), has side effects, involves iterative processes, or handles errors. For a complex tool with 15 parameters, 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 appropriately concise with three sentences that are front-loaded: the first sentence introduces the core purpose, followed by supporting details. There's no unnecessary repetition or fluff, making it efficient, though it could be more structured with bullet points or clearer sections given the 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 high complexity (15 parameters, nested structures), lack of annotations, and no output schema, the description is incomplete. It doesn't address how the tool behaves, what it returns, or detailed usage scenarios. For a sophisticated simulation tool, this leaves critical gaps in understanding its full context and operation.

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 low at 20%, with only a few parameters like 'sessionId' and 'iteration' having descriptions. The tool description adds no specific meaning about parameters beyond the general context of collaboration. It doesn't explain how parameters like 'personas' or 'contributions' should be structured or used, leaving most semantics undocumented. This meets the baseline for minimal compensation given the coverage 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 is for 'simulating expert collaboration with diverse perspectives' and 'tackling complex problems by coordinating multiple viewpoints,' which gives a general purpose. However, it's vague about the specific action (e.g., whether it initiates, continues, or summarizes collaboration) and doesn't clearly distinguish it from sibling tools like 'structuredargumentation' or 'decisionframework,' which might overlap in problem-solving contexts.

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 explicit guidance is provided on when to use this tool versus alternatives. The description mentions 'complex problems' and 'structured collaborative reasoning,' but it doesn't specify prerequisites, exclusions, or compare it to siblings such as 'sequentialthinking' or 'metacognitivemonitoring.' This leaves the agent without clear direction for tool selection.

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