mcp-ticketer 0.1.6__py3-none-any.whl → 0.1.8__py3-none-any.whl

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.

Potentially problematic release.


This version of mcp-ticketer might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  """Version information for mcp-ticketer package."""
2
2
 
3
- __version__ = "0.1.6"
3
+ __version__ = "0.1.8"
4
4
  __version_info__ = tuple(int(part) for part in __version__.split("."))
5
5
 
6
6
  # Package metadata
@@ -65,6 +65,8 @@ class MCPTicketServer:
65
65
  result = await self._handle_queue_status(params)
66
66
  elif method == "tools/list":
67
67
  result = await self._handle_tools_list()
68
+ elif method == "tools/call":
69
+ result = await self._handle_tools_call(params)
68
70
  else:
69
71
  return self._error_response(
70
72
  request_id,
@@ -309,7 +311,7 @@ class MCPTicketServer:
309
311
  "protocolVersion": "2024-11-05",
310
312
  "serverInfo": {
311
313
  "name": "mcp-ticketer",
312
- "version": "0.1.6"
314
+ "version": "0.1.8"
313
315
  },
314
316
  "capabilities": {
315
317
  "tools": {
@@ -325,7 +327,7 @@ class MCPTicketServer:
325
327
  {
326
328
  "name": "ticket_create",
327
329
  "description": "Create a new ticket",
328
- "parameters": {
330
+ "inputSchema": {
329
331
  "type": "object",
330
332
  "properties": {
331
333
  "title": {"type": "string", "description": "Ticket title"},
@@ -340,7 +342,7 @@ class MCPTicketServer:
340
342
  {
341
343
  "name": "ticket_list",
342
344
  "description": "List tickets",
343
- "parameters": {
345
+ "inputSchema": {
344
346
  "type": "object",
345
347
  "properties": {
346
348
  "limit": {"type": "integer", "default": 10},
@@ -352,7 +354,7 @@ class MCPTicketServer:
352
354
  {
353
355
  "name": "ticket_update",
354
356
  "description": "Update a ticket",
355
- "parameters": {
357
+ "inputSchema": {
356
358
  "type": "object",
357
359
  "properties": {
358
360
  "ticket_id": {"type": "string", "description": "Ticket ID"},
@@ -364,7 +366,7 @@ class MCPTicketServer:
364
366
  {
365
367
  "name": "ticket_transition",
366
368
  "description": "Change ticket state",
367
- "parameters": {
369
+ "inputSchema": {
368
370
  "type": "object",
369
371
  "properties": {
370
372
  "ticket_id": {"type": "string"},
@@ -376,7 +378,7 @@ class MCPTicketServer:
376
378
  {
377
379
  "name": "ticket_search",
378
380
  "description": "Search tickets",
379
- "parameters": {
381
+ "inputSchema": {
380
382
  "type": "object",
381
383
  "properties": {
382
384
  "query": {"type": "string"},
@@ -389,7 +391,7 @@ class MCPTicketServer:
389
391
  {
390
392
  "name": "ticket_status",
391
393
  "description": "Check status of queued ticket operation",
392
- "parameters": {
394
+ "inputSchema": {
393
395
  "type": "object",
394
396
  "properties": {
395
397
  "queue_id": {"type": "string", "description": "Queue ID returned from create/update/delete operations"},
@@ -400,6 +402,76 @@ class MCPTicketServer:
400
402
  ]
401
403
  }
402
404
 
405
+ async def _handle_tools_call(self, params: Dict[str, Any]) -> Dict[str, Any]:
406
+ """Handle tool invocation from MCP client.
407
+
408
+ Args:
409
+ params: Contains 'name' and 'arguments' fields
410
+
411
+ Returns:
412
+ MCP formatted response with content array
413
+ """
414
+ tool_name = params.get("name")
415
+ arguments = params.get("arguments", {})
416
+
417
+ try:
418
+ # Route to appropriate handler based on tool name
419
+ if tool_name == "ticket_create":
420
+ result = await self._handle_create(arguments)
421
+ elif tool_name == "ticket_list":
422
+ result = await self._handle_list(arguments)
423
+ elif tool_name == "ticket_update":
424
+ result = await self._handle_update(arguments)
425
+ elif tool_name == "ticket_transition":
426
+ result = await self._handle_transition(arguments)
427
+ elif tool_name == "ticket_search":
428
+ result = await self._handle_search(arguments)
429
+ elif tool_name == "ticket_status":
430
+ result = await self._handle_queue_status(arguments)
431
+ else:
432
+ return {
433
+ "content": [
434
+ {
435
+ "type": "text",
436
+ "text": f"Unknown tool: {tool_name}"
437
+ }
438
+ ],
439
+ "isError": True
440
+ }
441
+
442
+ # Format successful response in MCP content format
443
+ # Handle different response types
444
+ if isinstance(result, list):
445
+ # For list operations, convert Pydantic models to dicts
446
+ result_text = json.dumps(result, indent=2, default=str)
447
+ elif isinstance(result, dict):
448
+ # For dict responses (create, update, etc.)
449
+ result_text = json.dumps(result, indent=2, default=str)
450
+ else:
451
+ result_text = str(result)
452
+
453
+ return {
454
+ "content": [
455
+ {
456
+ "type": "text",
457
+ "text": result_text
458
+ }
459
+ ],
460
+ "isError": False
461
+ }
462
+
463
+ except Exception as e:
464
+ # Format error response
465
+ return {
466
+ "content": [
467
+ {
468
+ "type": "text",
469
+ "text": f"Error calling tool {tool_name}: {str(e)}"
470
+ }
471
+ ],
472
+ "isError": True
473
+ }
474
+
403
475
  async def run(self) -> None:
404
476
  """Run the MCP server, reading from stdin and writing to stdout."""
405
477
  self.running = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-ticketer
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary: Universal ticket management interface for AI agents with MCP support
5
5
  Author-email: MCP Ticketer Team <support@mcp-ticketer.io>
6
6
  Maintainer-email: MCP Ticketer Team <support@mcp-ticketer.io>
@@ -1,5 +1,5 @@
1
1
  mcp_ticketer/__init__.py,sha256=ayPQdFr6msypD06_G96a1H0bdFCT1m1wDtv8MZBpY4I,496
2
- mcp_ticketer/__version__.py,sha256=PcEP5mcdLQHmV2Fnln4H1r_7bShqiqfUXoEAc7QsgMI,1114
2
+ mcp_ticketer/__version__.py,sha256=xaUaMuuCEFDRyWYQ--OHg6JhbB17oO3kulskm7AkcVA,1114
3
3
  mcp_ticketer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  mcp_ticketer/adapters/__init__.py,sha256=_QRLaX38EUsL-kMvJITY0lYHvrq_ip9Qw4Q1YLavJSo,283
5
5
  mcp_ticketer/adapters/aitrackdown.py,sha256=ICNimTtF6rPajuVoVEpmdw2TfjYjnWvao8prUwukNn0,15210
@@ -20,16 +20,16 @@ mcp_ticketer/core/mappers.py,sha256=8I4jcqDqoQEdWlteDMpVeVF3Wo0fDCkmFPRr8oNv8gA,
20
20
  mcp_ticketer/core/models.py,sha256=K-bLuU_DNNVgjHnVFzAIbSa0kJwT2I3Hj24sCklwIYo,4374
21
21
  mcp_ticketer/core/registry.py,sha256=fwje0fnjp0YKPZ0SrVWk82SMNLs7CD0JlHQmx7SigNo,3537
22
22
  mcp_ticketer/mcp/__init__.py,sha256=Bvzof9vBu6VwcXcIZK8RgKv6ycRV9tDlO-9TUmd8zqQ,122
23
- mcp_ticketer/mcp/server.py,sha256=pQBmmvyT6-tdw05nyat45591uDK9A0Ka-b6_BrpjgxU,16915
23
+ mcp_ticketer/mcp/server.py,sha256=1sl_JZCwqlgOS53cisVNGIg6a2p7H2geC4c6h7g-UvA,19574
24
24
  mcp_ticketer/queue/__init__.py,sha256=xHBoUwor8ZdO8bIHc7nP25EsAp5Si5Co4g_8ybb7fes,230
25
25
  mcp_ticketer/queue/__main__.py,sha256=kQd6iOCKbbFqpRdbIRavuI4_G7-oE898JE4a0yLEYPE,108
26
26
  mcp_ticketer/queue/manager.py,sha256=79AH9oUxdBXH3lmJ3kIlFf2GQkWHL6XB6u5JqVWPq60,7571
27
27
  mcp_ticketer/queue/queue.py,sha256=UgbIChWPiyI7BJNQ9DYA92D2jVMMtmVWBzotI5ML51A,11394
28
28
  mcp_ticketer/queue/run_worker.py,sha256=HFoykfDpOoz8OUxWbQ2Fka_UlGrYwjPVZ-DEimGFH9o,802
29
29
  mcp_ticketer/queue/worker.py,sha256=cVjHR_kfnGKAkiUg0HuXCnbKeKNBBEuj0XZHgIuIn4k,14017
30
- mcp_ticketer-0.1.6.dist-info/licenses/LICENSE,sha256=KOVrunjtILSzY-2N8Lqa3-Q8dMaZIG4LrlLTr9UqL08,1073
31
- mcp_ticketer-0.1.6.dist-info/METADATA,sha256=W0yo-ingwOCSQlF_Z5xrpoOvOY9M02YgmHTHB50YKHo,11177
32
- mcp_ticketer-0.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
33
- mcp_ticketer-0.1.6.dist-info/entry_points.txt,sha256=o1IxVhnHnBNG7FZzbFq-Whcs1Djbofs0qMjiUYBLx2s,60
34
- mcp_ticketer-0.1.6.dist-info/top_level.txt,sha256=WnAG4SOT1Vm9tIwl70AbGG_nA217YyV3aWFhxLH2rxw,13
35
- mcp_ticketer-0.1.6.dist-info/RECORD,,
30
+ mcp_ticketer-0.1.8.dist-info/licenses/LICENSE,sha256=KOVrunjtILSzY-2N8Lqa3-Q8dMaZIG4LrlLTr9UqL08,1073
31
+ mcp_ticketer-0.1.8.dist-info/METADATA,sha256=cD0ozxekpO4uT0ychGnrtCNJ7Tig8NwrotX-T2Ri_RA,11177
32
+ mcp_ticketer-0.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
33
+ mcp_ticketer-0.1.8.dist-info/entry_points.txt,sha256=o1IxVhnHnBNG7FZzbFq-Whcs1Djbofs0qMjiUYBLx2s,60
34
+ mcp_ticketer-0.1.8.dist-info/top_level.txt,sha256=WnAG4SOT1Vm9tIwl70AbGG_nA217YyV3aWFhxLH2rxw,13
35
+ mcp_ticketer-0.1.8.dist-info/RECORD,,