Coverage for src/qdrant_loader_mcp_server/mcp/schemas/find_complementary.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_find_complementary_tool_schema() -> dict[str, Any]: 

5 return { 

6 "name": "find_complementary_content", 

7 "description": "Find content that complements a target document", 

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

9 "inputSchema": { 

10 "type": "object", 

11 "properties": { 

12 "target_query": { 

13 "type": "string", 

14 "description": "Query to find the target document", 

15 }, 

16 "context_query": { 

17 "type": "string", 

18 "description": "Query to get contextual documents", 

19 }, 

20 "max_recommendations": { 

21 "type": "integer", 

22 "description": "Maximum number of recommendations", 

23 "default": 5, 

24 }, 

25 "source_types": { 

26 "type": "array", 

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

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

29 }, 

30 "project_ids": { 

31 "type": "array", 

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

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

34 }, 

35 }, 

36 "required": ["target_query", "context_query"], 

37 }, 

38 "outputSchema": { 

39 "type": "object", 

40 "properties": { 

41 "complementary_content": { 

42 "type": "array", 

43 "items": { 

44 "type": "object", 

45 "properties": { 

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

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

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

49 "complementary_score": {"type": "number"}, 

50 "complementary_reason": {"type": "string"}, 

51 "relationship_type": {"type": "string"}, 

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

53 "metadata": { 

54 "type": "object", 

55 "properties": { 

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

57 "created_date": {"type": "string"}, 

58 "author": {"type": "string"}, 

59 }, 

60 }, 

61 }, 

62 }, 

63 }, 

64 "target_document": { 

65 "type": "object", 

66 "properties": { 

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

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

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

70 }, 

71 }, 

72 "complementary_summary": { 

73 "type": "object", 

74 "properties": { 

75 "total_analyzed": {"type": "integer"}, 

76 "complementary_found": {"type": "integer"}, 

77 "highest_score": {"type": "number"}, 

78 "relationship_types": { 

79 "type": "array", 

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

81 }, 

82 }, 

83 }, 

84 }, 

85 }, 

86 }