structuredargumentation
Analyze complex questions through formal argumentation structures. Create, critique, and synthesize competing arguments for systematic dialectical reasoning.
Instructions
A detailed tool for systematic dialectical reasoning and argument analysis. This tool helps analyze complex questions through formal argumentation structures. It facilitates the creation, critique, and synthesis of competing arguments.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| claim | Yes | ||
| premises | Yes | ||
| conclusion | Yes | ||
| argumentId | No | Optional unique identifier for this argument | |
| argumentType | Yes | ||
| confidence | Yes | Confidence level in this argument (0.0-1.0) | |
| respondsTo | No | ID of the argument this directly responds to | |
| supports | No | IDs of arguments this supports | |
| contradicts | No | IDs of arguments this contradicts | |
| strengths | No | Notable strong points of the argument | |
| weaknesses | No | Notable weak points of the argument | |
| nextArgumentNeeded | Yes | Whether another argument is needed in the dialectic | |
| suggestedNextTypes | No | Suggested types for the next argument |
Implementation Reference
- The core handler function that processes the structured argumentation input. It validates the data, formats a detailed output for logging, and returns a standardized JSON response with argument details or an error.public processStructuredArgumentation(input: unknown): { content: Array<{ type: string; text: string }>; isError?: boolean } { try { const validatedData = this.validateInputData(input); const processedData: ArgumentData = { ...validatedData, supports: validatedData.supports || [], contradicts: validatedData.contradicts || [], strengths: validatedData.strengths || [], weaknesses: validatedData.weaknesses || [], suggestedNextTypes: validatedData.suggestedNextTypes || [] }; const formattedOutput = this.formatOutput(processedData); console.error(formattedOutput); return { content: [{ type: "text", text: JSON.stringify({ argumentType: processedData.argumentType, claim: processedData.claim, confidence: processedData.confidence, nextArgumentNeeded: processedData.nextArgumentNeeded, argumentId: processedData.argumentId || `arg-${Date.now()}`, status: 'success' }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: error instanceof Error ? error.message : String(error), status: 'failed' }, null, 2) }], isError: true }; } }
- src/index.ts:825-909 (schema)Defines the Tool object for 'structuredargumentation' including name, description, and detailed inputSchema used for MCP validation.const STRUCTURED_ARGUMENTATION_TOOL: Tool = { name: "structuredargumentation", description: `A detailed tool for systematic dialectical reasoning and argument analysis. This tool helps analyze complex questions through formal argumentation structures. It facilitates the creation, critique, and synthesis of competing arguments.`, inputSchema: { type: "object", properties: { claim: { type: "string" }, premises: { type: "array", items: { type: "string" } }, conclusion: { type: "string" }, argumentId: { type: "string", description: "Optional unique identifier for this argument", }, argumentType: { type: "string", enum: [ "thesis", "antithesis", "synthesis", "objection", "rebuttal", ], }, confidence: { type: "number", minimum: 0, maximum: 1, description: "Confidence level in this argument (0.0-1.0)", }, respondsTo: { type: "string", description: "ID of the argument this directly responds to", }, supports: { type: "array", items: { type: "string" }, description: "IDs of arguments this supports", }, contradicts: { type: "array", items: { type: "string" }, description: "IDs of arguments this contradicts", }, strengths: { type: "array", items: { type: "string" }, description: "Notable strong points of the argument", }, weaknesses: { type: "array", items: { type: "string" }, description: "Notable weak points of the argument", }, nextArgumentNeeded: { type: "boolean", description: "Whether another argument is needed in the dialectic", }, suggestedNextTypes: { type: "array", items: { type: "string", enum: [ "thesis", "antithesis", "synthesis", "objection", "rebuttal", ], }, description: "Suggested types for the next argument", }, }, required: [ "claim", "premises", "conclusion", "argumentType", "confidence", "nextArgumentNeeded", ], }, };
- src/index.ts:1150-1163 (registration)Switch case in CallToolRequestHandler that routes calls to the 'structuredargumentation' tool to the StructuredArgumentationServer handler.case "structuredargumentation": { const result = structuredArgumentationServer.processStructuredArgumentation( request.params.arguments ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:996-1012 (registration)Registers the STRUCTURED_ARGUMENTATION_TOOL in the server's capabilities.tools list, making it discoverable via ListTools.capabilities: { tools: { sequentialthinking: SEQUENTIAL_THINKING_TOOL, mentalmodel: MENTAL_MODEL_TOOL, designpattern: DESIGN_PATTERN_TOOL, programmingparadigm: PROGRAMMING_PARADIGM_TOOL, debuggingapproach: DEBUGGING_APPROACH_TOOL, collaborativereasoning: COLLABORATIVE_REASONING_TOOL, decisionframework: DECISION_FRAMEWORK_TOOL, metacognitivemonitoring: METACOGNITIVE_MONITORING_TOOL, scientificmethod: SCIENTIFIC_METHOD_TOOL, structuredargumentation: STRUCTURED_ARGUMENTATION_TOOL, visualreasoning: VISUAL_REASONING_TOOL, }, }, } );
- Validates the input against ArgumentData structure, checking required fields and types, throwing descriptive errors if invalid.private validateInputData(input: unknown): ArgumentData { const data = input as ArgumentData; if (!data.claim || !data.premises || !data.conclusion || !data.argumentType) { throw new Error("Invalid input for StructuredArgumentation: Missing required fields."); } if (typeof data.confidence !== 'number' || data.confidence < 0 || data.confidence > 1) { throw new Error("Invalid confidence value for ArgumentData."); } if (typeof data.nextArgumentNeeded !== 'boolean') { throw new Error("Invalid nextArgumentNeeded value for ArgumentData."); } return data; }