Coverage for src / qdrant_loader_mcp_server / mcp / schemas / expand_document.py: 100%
3 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 04:51 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 04:51 +0000
1"""Schema for the expand_document tool."""
3from typing import Any
6def get_expand_document_tool_schema() -> dict[str, Any]:
7 """
8 Returns the schema for the expand_document tool.
9 """
10 return {
11 "name": "expand_document",
12 "description": "Retrieve full document content by document ID for lazy loading",
13 "annotations": {"read-only": True},
14 "inputSchema": {
15 "type": "object",
16 "properties": {
17 "document_id": {
18 "type": "string",
19 "description": "The ID of the document to expand and retrieve full content",
20 },
21 "include_metadata": { # Optional, not used in handler for now
22 "type": "boolean",
23 "description": "Include detailed metadata (optional, default: true)",
24 "default": True,
25 },
26 "include_hierarchy": { # Optional, not used in handler for now
27 "type": "boolean",
28 "description": "Include hierarchy information for Confluence documents (optional, default: true)",
29 "default": True,
30 },
31 "include_attachments": {
32 "type": "boolean",
33 "description": "Include attachment information if available (optional, default: true)",
34 "default": True,
35 },
36 },
37 "required": ["document_id"],
38 "additionalProperties": False,
39 },
40 "outputSchema": {
41 "type": "object",
42 "properties": {
43 "results": {
44 "type": "array",
45 "items": {
46 "type": "object",
47 "properties": {
48 "score": {"type": "number"},
49 "title": {"type": "string"},
50 "content": {"type": "string"},
51 "source_type": {"type": "string"},
52 "metadata": {
53 "type": "object",
54 "properties": {
55 "file_path": {"type": "string"},
56 "project_id": {"type": "string"},
57 "created_at": {"type": "string"},
58 "last_modified": {"type": "string"},
59 },
60 },
61 },
62 },
63 },
64 "total_found": {"type": "integer"},
65 "query_context": {
66 "type": "object",
67 "properties": {
68 "original_query": {"type": "string"},
69 "source_types_filtered": {
70 "type": "array",
71 "items": {"type": "string"},
72 },
73 "project_ids_filtered": {
74 "type": "array",
75 "items": {"type": "string"},
76 },
77 },
78 },
79 },
80 },
81 }