@icure/cardinal-mcp-server 1.0.1 → 1.1.0

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
  import { z } from "zod";
2
2
  import { dispatch } from "./dispatch.js";
3
- const ADMIN_APIS = ["Group", "User", "Role", "Permission", "System", "Auth", "ApplicationSettings"];
3
+ const ADMIN_APIS = ["Group", "User", "Role", "Permission", "System", "Auth"];
4
4
  export function registerAdminTools(server) {
5
5
  server.tool("cardinal_admin", `Execute admin operations. Covers: ${ADMIN_APIS.join(", ")} APIs. Use search_documentation to discover available methods.`, {
6
6
  api: z.enum(ADMIN_APIS).describe("Which admin API to use"),
@@ -1 +1 @@
1
- {"version":3,"file":"admin-tools.js","sourceRoot":"","sources":["../../src/tools/admin-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,qBAAqB,CAAU,CAAC;AAE7G,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IACnD,MAAM,CAAC,IAAI,CACV,gBAAgB,EAChB,qCAAqC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,gEAAgE,EAC1H;QACC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QAC1D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;QACnF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;KACrG,EACD,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE;QACjC,OAAO,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC,CACD,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"admin-tools.js","sourceRoot":"","sources":["../../src/tools/admin-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAEtF,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IACnD,MAAM,CAAC,IAAI,CACV,gBAAgB,EAChB,qCAAqC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,gEAAgE,EAC1H;QACC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QAC1D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;QACnF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;KACrG,EACD,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE;QACjC,OAAO,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"data-owner-tools.d.ts","sourceRoot":"","sources":["../../src/tools/data-owner-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiBpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QAcvD"}
1
+ {"version":3,"file":"data-owner-tools.d.ts","sourceRoot":"","sources":["../../src/tools/data-owner-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAUpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QAcvD"}
@@ -1,14 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { dispatch } from "./dispatch.js";
3
3
  const DATA_OWNER_APIS = [
4
- "HealthcareParty", "Patient", "Device",
5
- "AccessLog", "CalendarItem", "Classification", "Contact", "Document",
6
- "Form", "HealthElement", "Invoice", "MaintenanceTask", "Message",
7
- "Receipt", "TimeTable", "Topic",
8
- "Agenda", "CalendarItemType", "Code", "DocumentTemplate",
9
- "EntityReference", "EntityTemplate", "FrontEndMigration",
10
- "Insurance", "Keyword", "MedicalLocation", "Place", "Tarification",
11
- "FormTemplate",
4
+ "HealthcareParty", "Patient", "Device"
12
5
  ];
13
6
  const FLAVOUR_VALUES = ["decrypted", "encrypted", "tryAndRecover"];
14
7
  export function registerDataOwnerTools(server) {
@@ -1 +1 @@
1
- {"version":3,"file":"data-owner-tools.js","sourceRoot":"","sources":["../../src/tools/data-owner-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,eAAe,GAAG;IACvB,iBAAiB,EAAE,SAAS,EAAE,QAAQ;IACtC,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU;IACpE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS;IAChE,SAAS,EAAE,WAAW,EAAE,OAAO;IAC/B,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,kBAAkB;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C7B,CAAC;AAEX,MAAM,cAAc,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,CAAU,CAAC;AAE5E,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACvD,MAAM,CAAC,IAAI,CACV,qBAAqB,EACrB,2DAA2D,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,qKAAqK,EAC1P;QACC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACzD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sEAAsE,CAAC;QACnG,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4EAA4E,CAAC;QACjI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;KACrG,EACD,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;QAC1C,OAAO,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACnD,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -14566,18 +14566,18 @@
14566
14566
  },
14567
14567
  {
14568
14568
  "name": "deleteTimeTableById",
14569
- "description": "Deletes a timeTable. If you don't have write access to the timeTable the method will fail.",
14569
+ "description": "",
14570
14570
  "params": [
14571
14571
  {
14572
14572
  "name": "entityId",
14573
14573
  "type": "string",
14574
- "description": "id of the timeTable.",
14574
+ "description": "",
14575
14575
  "optional": false
14576
14576
  },
14577
14577
  {
14578
14578
  "name": "rev",
14579
14579
  "type": "string",
14580
- "description": "the latest known rev of the timeTable to delete",
14580
+ "description": "",
14581
14581
  "optional": false
14582
14582
  }
14583
14583
  ],
@@ -14586,19 +14586,16 @@
14586
14586
  "decrypted",
14587
14587
  "encrypted",
14588
14588
  "tryAndRecover"
14589
- ],
14590
- "throws": [
14591
- "RevisionConflictException if the provided revision doesn't match the latest known revision"
14592
14589
  ]
14593
14590
  },
14594
14591
  {
14595
14592
  "name": "deleteTimeTablesByIds",
14596
- "description": "Deletes many timeTables. Ids that do not correspond to an entity, or that correspond to an entity for which you don't have write access will be ignored.",
14593
+ "description": "",
14597
14594
  "params": [
14598
14595
  {
14599
14596
  "name": "entityIds",
14600
14597
  "type": "Array<StoredDocumentIdentifier>",
14601
- "description": "ids and revisions of the timeTables to delete.",
14598
+ "description": "",
14602
14599
  "optional": false
14603
14600
  }
14604
14601
  ],
@@ -14611,18 +14608,18 @@
14611
14608
  },
14612
14609
  {
14613
14610
  "name": "purgeTimeTableById",
14614
- "description": "Permanently deletes a timeTable.",
14611
+ "description": "",
14615
14612
  "params": [
14616
14613
  {
14617
14614
  "name": "id",
14618
14615
  "type": "string",
14619
- "description": "id of the timeTable to purge",
14616
+ "description": "",
14620
14617
  "optional": false
14621
14618
  },
14622
14619
  {
14623
14620
  "name": "rev",
14624
14621
  "type": "string",
14625
- "description": "latest revision of the timeTable",
14622
+ "description": "",
14626
14623
  "optional": false
14627
14624
  }
14628
14625
  ],
@@ -14631,19 +14628,16 @@
14631
14628
  "decrypted",
14632
14629
  "encrypted",
14633
14630
  "tryAndRecover"
14634
- ],
14635
- "throws": [
14636
- "RevisionConflictException if the provided revision doesn't match the latest known revision"
14637
14631
  ]
14638
14632
  },
14639
14633
  {
14640
14634
  "name": "deleteTimeTable",
14641
- "description": "Deletes a timeTable. If you don't have write access to the timeTable the method will fail.",
14635
+ "description": "",
14642
14636
  "params": [
14643
14637
  {
14644
14638
  "name": "timeTable",
14645
14639
  "type": "TimeTable",
14646
- "description": "the timeTable to delete",
14640
+ "description": "",
14647
14641
  "optional": false
14648
14642
  }
14649
14643
  ],
@@ -14652,19 +14646,16 @@
14652
14646
  "decrypted",
14653
14647
  "encrypted",
14654
14648
  "tryAndRecover"
14655
- ],
14656
- "throws": [
14657
- "RevisionConflictException if the provided timeTable doesn't match the latest known revision"
14658
14649
  ]
14659
14650
  },
14660
14651
  {
14661
14652
  "name": "deleteTimeTables",
14662
- "description": "Deletes many timeTables. Ignores timeTable for which you don't have write access or that don't match the latest revision.",
14653
+ "description": "",
14663
14654
  "params": [
14664
14655
  {
14665
14656
  "name": "timeTables",
14666
14657
  "type": "Array<TimeTable>",
14667
- "description": "the timeTables to delete",
14658
+ "description": "",
14668
14659
  "optional": false
14669
14660
  }
14670
14661
  ],
@@ -14677,12 +14668,12 @@
14677
14668
  },
14678
14669
  {
14679
14670
  "name": "purgeTimeTable",
14680
- "description": "Permanently deletes a timeTable.",
14671
+ "description": "",
14681
14672
  "params": [
14682
14673
  {
14683
14674
  "name": "timeTable",
14684
14675
  "type": "TimeTable",
14685
- "description": "the timeTable to purge.",
14676
+ "description": "",
14686
14677
  "optional": false
14687
14678
  }
14688
14679
  ],
@@ -14691,19 +14682,16 @@
14691
14682
  "decrypted",
14692
14683
  "encrypted",
14693
14684
  "tryAndRecover"
14694
- ],
14695
- "throws": [
14696
- "RevisionConflictException if the provided timeTable doesn't match the latest known revision"
14697
14685
  ]
14698
14686
  },
14699
14687
  {
14700
14688
  "name": "undeleteTimeTable",
14701
- "description": "Restores a timeTable that was marked as deleted.",
14689
+ "description": "",
14702
14690
  "params": [
14703
14691
  {
14704
14692
  "name": "timeTable",
14705
14693
  "type": "TimeTable",
14706
- "description": "the timeTable to undelete",
14694
+ "description": "",
14707
14695
  "optional": false
14708
14696
  }
14709
14697
  ],
@@ -14712,19 +14700,16 @@
14712
14700
  "decrypted",
14713
14701
  "encrypted",
14714
14702
  "tryAndRecover"
14715
- ],
14716
- "throws": [
14717
- "RevisionConflictException if the provided timeTable doesn't match the latest known revision"
14718
14703
  ]
14719
14704
  },
14720
14705
  {
14721
14706
  "name": "modifyTimeTable",
14722
- "description": "Modifies a time-table. You need to have write access to the entity. Flavoured method.",
14707
+ "description": "",
14723
14708
  "params": [
14724
14709
  {
14725
14710
  "name": "entity",
14726
14711
  "type": "TimeTable",
14727
- "description": "a time-table with update content",
14712
+ "description": "",
14728
14713
  "optional": false
14729
14714
  }
14730
14715
  ],
@@ -14737,18 +14722,18 @@
14737
14722
  },
14738
14723
  {
14739
14724
  "name": "undeleteTimeTableById",
14740
- "description": "Restores a timeTable that was marked as deleted.",
14725
+ "description": "",
14741
14726
  "params": [
14742
14727
  {
14743
14728
  "name": "id",
14744
14729
  "type": "string",
14745
- "description": "the id of the entity",
14730
+ "description": "",
14746
14731
  "optional": false
14747
14732
  },
14748
14733
  {
14749
14734
  "name": "rev",
14750
14735
  "type": "string",
14751
- "description": "the latest revision of the entity.",
14736
+ "description": "",
14752
14737
  "optional": false
14753
14738
  }
14754
14739
  ],
@@ -14757,19 +14742,16 @@
14757
14742
  "decrypted",
14758
14743
  "encrypted",
14759
14744
  "tryAndRecover"
14760
- ],
14761
- "throws": [
14762
- "RevisionConflictException if the provided revision doesn't match the latest known revision"
14763
14745
  ]
14764
14746
  },
14765
14747
  {
14766
14748
  "name": "getTimeTable",
14767
- "description": "Get a time-table by its id. You must have read access to the entity. Fails if the id does not correspond to any entity, corresponds to an entity that is not a time-table, or corresponds to an entity for which you don't have read access. Flavoured method.",
14749
+ "description": "",
14768
14750
  "params": [
14769
14751
  {
14770
14752
  "name": "entityId",
14771
14753
  "type": "string",
14772
- "description": "a time-table id.",
14754
+ "description": "",
14773
14755
  "optional": false
14774
14756
  }
14775
14757
  ],
@@ -14782,12 +14764,12 @@
14782
14764
  },
14783
14765
  {
14784
14766
  "name": "getTimeTables",
14785
- "description": "Get multiple time tables by their ids. Ignores all ids that do not correspond to an entity, correspond to an entity that is not a time table, or correspond to an entity for which you don't have read access. Flavoured method.",
14767
+ "description": "",
14786
14768
  "params": [
14787
14769
  {
14788
14770
  "name": "timeTableIds",
14789
14771
  "type": "Array<string>",
14790
- "description": "a list of time table ids",
14772
+ "description": "",
14791
14773
  "optional": false
14792
14774
  }
14793
14775
  ],
@@ -14848,12 +14830,12 @@
14848
14830
  },
14849
14831
  {
14850
14832
  "name": "filterTimeTablesBy",
14851
- "description": "Get an iterator that iterates through all timeTables matching the provided filter, executing multiple requests to the api if needed. This method does not guarantee that the returned data will be ordered when using sortable filter options. Even if the data obtained from an invocation of the method appears to be ordered, any changes to the stored data, or to the internal iCure implementations, may cause future invocations to return unordered data. If you need ordered data use [filterTimeTablesBySorted] instead.",
14833
+ "description": "",
14852
14834
  "params": [
14853
14835
  {
14854
14836
  "name": "filter",
14855
14837
  "type": "BaseFilterOptions<TimeTable>",
14856
- "description": "a timeTable filter",
14838
+ "description": "",
14857
14839
  "optional": false
14858
14840
  }
14859
14841
  ],
@@ -14866,12 +14848,12 @@
14866
14848
  },
14867
14849
  {
14868
14850
  "name": "filterTimeTablesBySorted",
14869
- "description": "Get an iterator that iterates through all timeTables matching the provided filter, executing multiple requests to the api if needed. This method guarantees that the returned data will be ordered using the rules specified by the provided filter, but the operation may take longer than [filterTimeTablesBy].",
14851
+ "description": "",
14870
14852
  "params": [
14871
14853
  {
14872
14854
  "name": "filter",
14873
14855
  "type": "BaseSortableFilterOptions<TimeTable>",
14874
- "description": "a timeTable filter",
14856
+ "description": "",
14875
14857
  "optional": false
14876
14858
  }
14877
14859
  ],
@@ -14884,12 +14866,12 @@
14884
14866
  },
14885
14867
  {
14886
14868
  "name": "createTimeTable",
14887
- "description": "Create a new time-table.",
14869
+ "description": "",
14888
14870
  "params": [
14889
14871
  {
14890
14872
  "name": "entity",
14891
14873
  "type": "TimeTable",
14892
- "description": "a time-table.",
14874
+ "description": "",
14893
14875
  "optional": false
14894
14876
  }
14895
14877
  ],
@@ -14902,12 +14884,12 @@
14902
14884
  },
14903
14885
  {
14904
14886
  "name": "matchTimeTablesBy",
14905
- "description": "Get the ids of all timeTables matching the provided filter. This method does not guarantee that the returned data will be ordered when using sortable filter options. Even if the data obtained from an invocation of the method appears to be ordered, any changes to the stored data, or to the internal iCure implementations, may cause future invocations to return unordered data. If you need ordered data use [matchTimeTablesBySorted] instead.",
14887
+ "description": "",
14906
14888
  "params": [
14907
14889
  {
14908
14890
  "name": "filter",
14909
14891
  "type": "BaseFilterOptions<TimeTable>",
14910
- "description": "a timeTable filter",
14892
+ "description": "",
14911
14893
  "optional": false
14912
14894
  }
14913
14895
  ],
@@ -14920,12 +14902,12 @@
14920
14902
  },
14921
14903
  {
14922
14904
  "name": "matchTimeTablesBySorted",
14923
- "description": "Get the ids of all timeTables matching the provided filter. This method guarantees that the returned data will be ordered using the rules specified by the provided filter, but the operation may take longer than [matchTimeTablesBy].",
14905
+ "description": "",
14924
14906
  "params": [
14925
14907
  {
14926
14908
  "name": "filter",
14927
14909
  "type": "BaseSortableFilterOptions<TimeTable>",
14928
- "description": "a timeTable filter",
14910
+ "description": "",
14929
14911
  "optional": false
14930
14912
  }
14931
14913
  ],
@@ -8403,7 +8403,7 @@ export const METHOD_REGISTRY: Record<string, ApiInfo> = {
8403
8403
  "TimeTable": {
8404
8404
  "apiName": "TimeTableApi",
8405
8405
  "propertyName": "timeTable",
8406
- "isEncryptable": true,
8406
+ "isEncryptable": false,
8407
8407
  "methods": [
8408
8408
  {
8409
8409
  "name": "deleteTimeTableUnsafe",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/cardinal-mcp-server",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "MCP server exposing Cardinal SDK documentation and operational tools",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",