ims-mcp 1.0.2__tar.gz → 1.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ims-mcp
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: Model Context Protocol server for IMS (Instruction Management Systems)
5
5
  Author: Igor Solomatov
6
6
  License-Expression: MIT
@@ -229,13 +229,16 @@ List documents with pagination and optional tag filtering.
229
229
  - `offset` (int, optional): Documents to skip (default: 0)
230
230
  - `limit` (int, optional): Max documents (default: 100)
231
231
  - `document_ids` (list[str], optional): Specific IDs to retrieve
232
- - `compact_view` (bool, optional): Show only ID and title (default: False)
232
+ - `compact_view` (bool, optional): Show only ID and title (default: True)
233
233
  - `tags` (list[str], optional): Filter by tags (e.g., `["agents", "r1"]`)
234
234
  - `match_all_tags` (bool, optional): If True, document must have ALL tags; if False (default), document must have ANY tag
235
235
 
236
236
  **Examples:**
237
237
  ```python
238
- # List all documents
238
+ # List all documents (compact view - ID and title only)
239
+ list_documents(offset=0, limit=10)
240
+
241
+ # List with full details
239
242
  list_documents(offset=0, limit=10, compact_view=False)
240
243
 
241
244
  # Filter by tags (ANY mode - documents with "research" OR "ml")
@@ -202,13 +202,16 @@ List documents with pagination and optional tag filtering.
202
202
  - `offset` (int, optional): Documents to skip (default: 0)
203
203
  - `limit` (int, optional): Max documents (default: 100)
204
204
  - `document_ids` (list[str], optional): Specific IDs to retrieve
205
- - `compact_view` (bool, optional): Show only ID and title (default: False)
205
+ - `compact_view` (bool, optional): Show only ID and title (default: True)
206
206
  - `tags` (list[str], optional): Filter by tags (e.g., `["agents", "r1"]`)
207
207
  - `match_all_tags` (bool, optional): If True, document must have ALL tags; if False (default), document must have ANY tag
208
208
 
209
209
  **Examples:**
210
210
  ```python
211
- # List all documents
211
+ # List all documents (compact view - ID and title only)
212
+ list_documents(offset=0, limit=10)
213
+
214
+ # List with full details
212
215
  list_documents(offset=0, limit=10, compact_view=False)
213
216
 
214
217
  # Filter by tags (ANY mode - documents with "research" OR "ml")
@@ -11,7 +11,7 @@ Environment Variables:
11
11
  Note: Environment variables use R2R_ prefix for compatibility with underlying R2R SDK.
12
12
  """
13
13
 
14
- __version__ = "1.0.2"
14
+ __version__ = "1.0.4"
15
15
  __author__ = "Igor Solomatov"
16
16
 
17
17
  from ims_mcp.server import mcp
@@ -15,6 +15,7 @@ configuration is needed when running via uvx or other launchers.
15
15
  """
16
16
 
17
17
  import os
18
+ import sys
18
19
  import uuid
19
20
  from r2r import R2RClient
20
21
 
@@ -38,6 +39,21 @@ def get_authenticated_client() -> R2RClient:
38
39
  if _authenticated_client is not None:
39
40
  return _authenticated_client
40
41
 
42
+ # Log startup info (only on first call)
43
+ from ims_mcp import __version__
44
+ base_url = os.getenv('R2R_API_BASE') or os.getenv('R2R_BASE_URL') or 'http://localhost:7272'
45
+ collection = os.getenv('R2R_COLLECTION', 'default')
46
+ api_key = os.getenv('R2R_API_KEY', '')
47
+ email = os.getenv('R2R_EMAIL', '')
48
+ password = os.getenv('R2R_PASSWORD', '')
49
+
50
+ print(f"[ims-mcp v{__version__}]", file=sys.stderr)
51
+ print(f" server={base_url}", file=sys.stderr)
52
+ print(f" collection={collection}", file=sys.stderr)
53
+ print(f" api_key={api_key[:3] + '...' if api_key else 'none'}", file=sys.stderr)
54
+ print(f" email={email if email else 'none'}", file=sys.stderr)
55
+ print(f" password={password[:3] + '...' if password else 'none'}", file=sys.stderr)
56
+
41
57
  # Create new client
42
58
  client = R2RClient()
43
59
 
@@ -47,11 +63,11 @@ def get_authenticated_client() -> R2RClient:
47
63
 
48
64
  if email and password:
49
65
  try:
50
- # Login to get access token
51
- result = client.users.login(email=email, password=password)
52
- # Set the access token for subsequent requests
53
- client.access_token = result.results.access_token.token
66
+ # Login - R2RClient automatically handles token internally
67
+ client.users.login(email=email, password=password)
68
+ print(f"[ims-mcp] Login successful", file=sys.stderr)
54
69
  except Exception as e:
70
+ print(f"[ims-mcp] Login failed: {e}", file=sys.stderr)
55
71
  # If login fails, continue without authentication (might work for local servers)
56
72
  pass
57
73
 
@@ -325,7 +341,7 @@ async def list_documents(
325
341
  offset: float = 0, # Use float to accept JSON "number" type, convert to int internally
326
342
  limit: float = 100, # Use float to accept JSON "number" type, convert to int internally
327
343
  document_ids: list[str] | None = None,
328
- compact_view: bool = False,
344
+ compact_view: bool = True,
329
345
  tags: list[str] | None = None,
330
346
  match_all_tags: bool = False,
331
347
  ) -> str:
@@ -336,7 +352,7 @@ async def list_documents(
336
352
  offset: Number of documents to skip (default: 0)
337
353
  limit: Maximum number of documents to return (default: 100, max: 100)
338
354
  document_ids: Optional list of specific document IDs to retrieve
339
- compact_view: Show only ID and title (default: False - shows all details)
355
+ compact_view: Show only ID and title (default: True - compact view)
340
356
  tags: Optional list of tags to filter by (e.g., ["agents", "r1"])
341
357
  match_all_tags: If True, document must have ALL tags; if False (default), document must have ANY tag
342
358
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ims-mcp
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: Model Context Protocol server for IMS (Instruction Management Systems)
5
5
  Author: Igor Solomatov
6
6
  License-Expression: MIT
@@ -229,13 +229,16 @@ List documents with pagination and optional tag filtering.
229
229
  - `offset` (int, optional): Documents to skip (default: 0)
230
230
  - `limit` (int, optional): Max documents (default: 100)
231
231
  - `document_ids` (list[str], optional): Specific IDs to retrieve
232
- - `compact_view` (bool, optional): Show only ID and title (default: False)
232
+ - `compact_view` (bool, optional): Show only ID and title (default: True)
233
233
  - `tags` (list[str], optional): Filter by tags (e.g., `["agents", "r1"]`)
234
234
  - `match_all_tags` (bool, optional): If True, document must have ALL tags; if False (default), document must have ANY tag
235
235
 
236
236
  **Examples:**
237
237
  ```python
238
- # List all documents
238
+ # List all documents (compact view - ID and title only)
239
+ list_documents(offset=0, limit=10)
240
+
241
+ # List with full details
239
242
  list_documents(offset=0, limit=10, compact_view=False)
240
243
 
241
244
  # Filter by tags (ANY mode - documents with "research" OR "ml")
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ims-mcp"
7
- version = "1.0.2"
7
+ version = "1.0.4"
8
8
  description = "Model Context Protocol server for IMS (Instruction Management Systems)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes
File without changes