Coverage for src/qdrant_loader_mcp_server/mcp/schemas/detect_conflicts.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-09-08 06:06 +0000

1from typing import Any 

2 

3 

4def get_detect_conflicts_tool_schema() -> dict[str, Any]: 

5 return { 

6 "name": "detect_conflicts", 

7 "description": "Detect conflicts and contradictions between documents", 

8 "annotations": {"read-only": True, "compute-intensive": True}, 

9 "inputSchema": { 

10 "type": "object", 

11 "properties": { 

12 "query": { 

13 "type": "string", 

14 "description": "Search query to get documents for conflict analysis", 

15 }, 

16 "limit": { 

17 "type": "integer", 

18 "description": "Maximum number of documents to analyze", 

19 "default": 10, 

20 }, 

21 "source_types": { 

22 "type": "array", 

23 "items": {"type": "string"}, 

24 "description": "Optional list of source types to filter by", 

25 }, 

26 "project_ids": { 

27 "type": "array", 

28 "items": {"type": "string"}, 

29 "description": "Optional list of project IDs to filter by", 

30 }, 

31 }, 

32 "required": ["query"], 

33 }, 

34 "outputSchema": { 

35 "type": "object", 

36 "properties": { 

37 "conflicts_detected": { 

38 "type": "array", 

39 "items": { 

40 "type": "object", 

41 "properties": { 

42 "conflict_id": {"type": "string"}, 

43 "document_1": { 

44 "type": "object", 

45 "properties": { 

46 "title": {"type": "string"}, 

47 "content_preview": {"type": "string"}, 

48 "source_type": {"type": "string"}, 

49 }, 

50 }, 

51 "document_2": { 

52 "type": "object", 

53 "properties": { 

54 "title": {"type": "string"}, 

55 "content_preview": {"type": "string"}, 

56 "source_type": {"type": "string"}, 

57 }, 

58 }, 

59 "conflict_type": {"type": "string"}, 

60 "conflict_score": {"type": "number"}, 

61 "conflict_description": {"type": "string"}, 

62 "conflicting_statements": { 

63 "type": "array", 

64 "items": { 

65 "type": "object", 

66 "properties": { 

67 "from_doc1": {"type": "string"}, 

68 "from_doc2": {"type": "string"}, 

69 }, 

70 }, 

71 }, 

72 }, 

73 }, 

74 }, 

75 "conflict_summary": { 

76 "type": "object", 

77 "properties": { 

78 "total_documents_analyzed": {"type": "integer"}, 

79 "conflicts_found": {"type": "integer"}, 

80 "conflict_types": { 

81 "type": "array", 

82 "items": {"type": "string"}, 

83 }, 

84 "highest_conflict_score": {"type": "number"}, 

85 }, 

86 }, 

87 "analysis_metadata": { 

88 "type": "object", 

89 "properties": { 

90 "query_used": {"type": "string"}, 

91 "analysis_date": {"type": "string"}, 

92 "processing_time_ms": {"type": "number"}, 

93 }, 

94 }, 

95 }, 

96 }, 

97 }