find_concept_contradictions
Detect contradictions in concept definitions across different versions of a manuscript to ensure consistency and accuracy in writing projects.
Instructions
Detect contradictions in concept definitions across versions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | No | Path to manuscript directory (defaults to current directory) | |
| concept_name | Yes | Concept to check for contradictions |
Implementation Reference
- src/WritersAid.ts:699-719 (handler)Main handler function that executes the core tool logic: queries the concept tracker for contradictions in concept definitions across versions and formats the response with version details and contradiction explanations.findConceptContradictions(options: { conceptName: string }) { const contradictions = this.conceptTracker.findContradictions(options.conceptName); return { conceptName: options.conceptName, contradictions: contradictions.map((c) => ({ version1: { versionNumber: c.version1.versionNumber, definition: c.version1.definition, timestamp: new Date(c.version1.timestamp).toISOString(), }, version2: { versionNumber: c.version2.versionNumber, definition: c.version2.definition, timestamp: new Date(c.version2.timestamp).toISOString(), }, contradiction: c.contradiction, })), total: contradictions.length, }; }
- src/tools/WriterToolHandlers.ts:473-477 (handler)Specific tool handler method that extracts the 'concept_name' from input args and delegates execution to WritersAid.findConceptContradictions.private async findConceptContradictions(args: Record<string, unknown>) { const conceptName = args.concept_name as string; return this.writersAid.findConceptContradictions({ conceptName }); }
- src/tools/WriterToolHandlers.ts:86-87 (registration)Tool registration in the central handleTool switch statement, routing calls to the specific handler method.case "find_concept_contradictions": return this.findConceptContradictions(args);
- Tool schema definition specifying the name, description, and input schema (requiring 'concept_name', optional 'project_path').{ name: "find_concept_contradictions", description: "Detect contradictions in concept definitions across versions", inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" }, concept_name: { type: "string", description: "Concept to check for contradictions" }, }, required: ["concept_name"], }, },