@cyanheads/ris-austria-mcp-server 0.1.5

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.
Files changed (154) hide show
  1. package/AGENTS.md +401 -0
  2. package/CLAUDE.md +401 -0
  3. package/Dockerfile +125 -0
  4. package/LICENSE +201 -0
  5. package/README.md +309 -0
  6. package/changelog/0.1.x/0.1.0.md +25 -0
  7. package/changelog/0.1.x/0.1.1.md +24 -0
  8. package/changelog/0.1.x/0.1.2.md +16 -0
  9. package/changelog/0.1.x/0.1.3.md +11 -0
  10. package/changelog/0.1.x/0.1.4.md +11 -0
  11. package/changelog/0.1.x/0.1.5.md +18 -0
  12. package/changelog/template.md +129 -0
  13. package/dist/config/server-config.d.ts +19 -0
  14. package/dist/config/server-config.d.ts.map +1 -0
  15. package/dist/config/server-config.js +35 -0
  16. package/dist/config/server-config.js.map +1 -0
  17. package/dist/index.d.ts +7 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +37 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/mcp-server/resources/definitions/ris-document.resource.d.ts +30 -0
  22. package/dist/mcp-server/resources/definitions/ris-document.resource.d.ts.map +1 -0
  23. package/dist/mcp-server/resources/definitions/ris-document.resource.js +75 -0
  24. package/dist/mcp-server/resources/definitions/ris-document.resource.js.map +1 -0
  25. package/dist/mcp-server/tools/definitions/_shared.d.ts +8 -0
  26. package/dist/mcp-server/tools/definitions/_shared.d.ts.map +1 -0
  27. package/dist/mcp-server/tools/definitions/_shared.js +10 -0
  28. package/dist/mcp-server/tools/definitions/_shared.js.map +1 -0
  29. package/dist/mcp-server/tools/definitions/ris-get-document.tool.d.ts +189 -0
  30. package/dist/mcp-server/tools/definitions/ris-get-document.tool.d.ts.map +1 -0
  31. package/dist/mcp-server/tools/definitions/ris-get-document.tool.js +504 -0
  32. package/dist/mcp-server/tools/definitions/ris-get-document.tool.js.map +1 -0
  33. package/dist/mcp-server/tools/definitions/ris-list-reference.tool.d.ts +42 -0
  34. package/dist/mcp-server/tools/definitions/ris-list-reference.tool.d.ts.map +1 -0
  35. package/dist/mcp-server/tools/definitions/ris-list-reference.tool.js +316 -0
  36. package/dist/mcp-server/tools/definitions/ris-list-reference.tool.js.map +1 -0
  37. package/dist/mcp-server/tools/definitions/ris-lookup-citation.tool.d.ts +80 -0
  38. package/dist/mcp-server/tools/definitions/ris-lookup-citation.tool.d.ts.map +1 -0
  39. package/dist/mcp-server/tools/definitions/ris-lookup-citation.tool.js +529 -0
  40. package/dist/mcp-server/tools/definitions/ris-lookup-citation.tool.js.map +1 -0
  41. package/dist/mcp-server/tools/definitions/ris-search-announcements.tool.d.ts +118 -0
  42. package/dist/mcp-server/tools/definitions/ris-search-announcements.tool.d.ts.map +1 -0
  43. package/dist/mcp-server/tools/definitions/ris-search-announcements.tool.js +389 -0
  44. package/dist/mcp-server/tools/definitions/ris-search-announcements.tool.js.map +1 -0
  45. package/dist/mcp-server/tools/definitions/ris-search-case-law.tool.d.ts +178 -0
  46. package/dist/mcp-server/tools/definitions/ris-search-case-law.tool.d.ts.map +1 -0
  47. package/dist/mcp-server/tools/definitions/ris-search-case-law.tool.js +495 -0
  48. package/dist/mcp-server/tools/definitions/ris-search-case-law.tool.js.map +1 -0
  49. package/dist/mcp-server/tools/definitions/ris-search-drafts.tool.d.ts +80 -0
  50. package/dist/mcp-server/tools/definitions/ris-search-drafts.tool.d.ts.map +1 -0
  51. package/dist/mcp-server/tools/definitions/ris-search-drafts.tool.js +264 -0
  52. package/dist/mcp-server/tools/definitions/ris-search-drafts.tool.js.map +1 -0
  53. package/dist/mcp-server/tools/definitions/ris-search-gazette.tool.d.ts +147 -0
  54. package/dist/mcp-server/tools/definitions/ris-search-gazette.tool.d.ts.map +1 -0
  55. package/dist/mcp-server/tools/definitions/ris-search-gazette.tool.js +509 -0
  56. package/dist/mcp-server/tools/definitions/ris-search-gazette.tool.js.map +1 -0
  57. package/dist/mcp-server/tools/definitions/ris-search-legislation.tool.d.ts +145 -0
  58. package/dist/mcp-server/tools/definitions/ris-search-legislation.tool.d.ts.map +1 -0
  59. package/dist/mcp-server/tools/definitions/ris-search-legislation.tool.js +466 -0
  60. package/dist/mcp-server/tools/definitions/ris-search-legislation.tool.js.map +1 -0
  61. package/dist/mcp-server/tools/definitions/ris-track-changes.tool.d.ts +73 -0
  62. package/dist/mcp-server/tools/definitions/ris-track-changes.tool.d.ts.map +1 -0
  63. package/dist/mcp-server/tools/definitions/ris-track-changes.tool.js +265 -0
  64. package/dist/mcp-server/tools/definitions/ris-track-changes.tool.js.map +1 -0
  65. package/dist/services/ris/normalizer.d.ts +40 -0
  66. package/dist/services/ris/normalizer.d.ts.map +1 -0
  67. package/dist/services/ris/normalizer.js +480 -0
  68. package/dist/services/ris/normalizer.js.map +1 -0
  69. package/dist/services/ris/reference/applications.d.ts +529 -0
  70. package/dist/services/ris/reference/applications.d.ts.map +1 -0
  71. package/dist/services/ris/reference/applications.js +520 -0
  72. package/dist/services/ris/reference/applications.js.map +1 -0
  73. package/dist/services/ris/reference/changed-since-intervals.d.ts +42 -0
  74. package/dist/services/ris/reference/changed-since-intervals.d.ts.map +1 -0
  75. package/dist/services/ris/reference/changed-since-intervals.js +16 -0
  76. package/dist/services/ris/reference/changed-since-intervals.js.map +1 -0
  77. package/dist/services/ris/reference/citation-formats.d.ts +39 -0
  78. package/dist/services/ris/reference/citation-formats.d.ts.map +1 -0
  79. package/dist/services/ris/reference/citation-formats.js +39 -0
  80. package/dist/services/ris/reference/citation-formats.js.map +1 -0
  81. package/dist/services/ris/reference/collections.d.ts +82 -0
  82. package/dist/services/ris/reference/collections.d.ts.map +1 -0
  83. package/dist/services/ris/reference/collections.js +102 -0
  84. package/dist/services/ris/reference/collections.js.map +1 -0
  85. package/dist/services/ris/reference/courts.d.ts +201 -0
  86. package/dist/services/ris/reference/courts.d.ts.map +1 -0
  87. package/dist/services/ris/reference/courts.js +198 -0
  88. package/dist/services/ris/reference/courts.js.map +1 -0
  89. package/dist/services/ris/reference/decision-kinds.d.ts +78 -0
  90. package/dist/services/ris/reference/decision-kinds.d.ts.map +1 -0
  91. package/dist/services/ris/reference/decision-kinds.js +117 -0
  92. package/dist/services/ris/reference/decision-kinds.js.map +1 -0
  93. package/dist/services/ris/reference/decision-types.d.ts +36 -0
  94. package/dist/services/ris/reference/decision-types.d.ts.map +1 -0
  95. package/dist/services/ris/reference/decision-types.js +29 -0
  96. package/dist/services/ris/reference/decision-types.js.map +1 -0
  97. package/dist/services/ris/reference/district-authorities.d.ts +314 -0
  98. package/dist/services/ris/reference/district-authorities.d.ts.map +1 -0
  99. package/dist/services/ris/reference/district-authorities.js +212 -0
  100. package/dist/services/ris/reference/district-authorities.js.map +1 -0
  101. package/dist/services/ris/reference/gazette-parts.d.ts +73 -0
  102. package/dist/services/ris/reference/gazette-parts.d.ts.map +1 -0
  103. package/dist/services/ris/reference/gazette-parts.js +58 -0
  104. package/dist/services/ris/reference/gazette-parts.js.map +1 -0
  105. package/dist/services/ris/reference/index.d.ts +23 -0
  106. package/dist/services/ris/reference/index.d.ts.map +1 -0
  107. package/dist/services/ris/reference/index.js +23 -0
  108. package/dist/services/ris/reference/index.js.map +1 -0
  109. package/dist/services/ris/reference/issuing-bodies.d.ts +642 -0
  110. package/dist/services/ris/reference/issuing-bodies.d.ts.map +1 -0
  111. package/dist/services/ris/reference/issuing-bodies.js +616 -0
  112. package/dist/services/ris/reference/issuing-bodies.js.map +1 -0
  113. package/dist/services/ris/reference/justiz-subject-areas.d.ts +133 -0
  114. package/dist/services/ris/reference/justiz-subject-areas.d.ts.map +1 -0
  115. package/dist/services/ris/reference/justiz-subject-areas.js +67 -0
  116. package/dist/services/ris/reference/justiz-subject-areas.js.map +1 -0
  117. package/dist/services/ris/reference/law-types.d.ts +46 -0
  118. package/dist/services/ris/reference/law-types.d.ts.map +1 -0
  119. package/dist/services/ris/reference/law-types.js +41 -0
  120. package/dist/services/ris/reference/law-types.js.map +1 -0
  121. package/dist/services/ris/reference/ministries.d.ts +360 -0
  122. package/dist/services/ris/reference/ministries.d.ts.map +1 -0
  123. package/dist/services/ris/reference/ministries.js +408 -0
  124. package/dist/services/ris/reference/ministries.js.map +1 -0
  125. package/dist/services/ris/reference/search-syntax.d.ts +66 -0
  126. package/dist/services/ris/reference/search-syntax.d.ts.map +1 -0
  127. package/dist/services/ris/reference/search-syntax.js +65 -0
  128. package/dist/services/ris/reference/search-syntax.js.map +1 -0
  129. package/dist/services/ris/reference/section-types.d.ts +33 -0
  130. package/dist/services/ris/reference/section-types.d.ts.map +1 -0
  131. package/dist/services/ris/reference/section-types.js +29 -0
  132. package/dist/services/ris/reference/section-types.js.map +1 -0
  133. package/dist/services/ris/reference/stages.d.ts +41 -0
  134. package/dist/services/ris/reference/stages.d.ts.map +1 -0
  135. package/dist/services/ris/reference/stages.js +27 -0
  136. package/dist/services/ris/reference/stages.js.map +1 -0
  137. package/dist/services/ris/reference/states.d.ts +90 -0
  138. package/dist/services/ris/reference/states.d.ts.map +1 -0
  139. package/dist/services/ris/reference/states.js +85 -0
  140. package/dist/services/ris/reference/states.js.map +1 -0
  141. package/dist/services/ris/request-builder.d.ts +195 -0
  142. package/dist/services/ris/request-builder.d.ts.map +1 -0
  143. package/dist/services/ris/request-builder.js +673 -0
  144. package/dist/services/ris/request-builder.js.map +1 -0
  145. package/dist/services/ris/ris-service.d.ts +65 -0
  146. package/dist/services/ris/ris-service.d.ts.map +1 -0
  147. package/dist/services/ris/ris-service.js +200 -0
  148. package/dist/services/ris/ris-service.js.map +1 -0
  149. package/dist/services/ris/types.d.ts +651 -0
  150. package/dist/services/ris/types.d.ts.map +1 -0
  151. package/dist/services/ris/types.js +11 -0
  152. package/dist/services/ris/types.js.map +1 -0
  153. package/package.json +108 -0
  154. package/server.json +111 -0
@@ -0,0 +1,145 @@
1
+ /**
2
+ * @fileoverview ris_search_legislation — one search surface over Austrian consolidated
3
+ * federal law (BrKons), consolidated state law (LrKons), municipal law (Gr), and English
4
+ * translations of selected federal laws (Erv). `scope`, `municipality`, and `language`
5
+ * route to the owning application; conditional filters are guarded locally before any
6
+ * upstream call. The flagship behavior: `in_force_as_of` defaults to today (Austria) so
7
+ * "what does the law say" questions never silently search all historical versions — the
8
+ * applied date is echoed in enrichment.
9
+ * @module mcp-server/tools/definitions/ris-search-legislation
10
+ */
11
+ import { z } from '@cyanheads/mcp-ts-core';
12
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
13
+ import type { LegislationApplication } from '../../../services/ris/request-builder.js';
14
+ import type { RisHit } from '../../../services/ris/types.js';
15
+ export declare const LegislationRecordSchema: z.ZodObject<{
16
+ document_number: z.ZodString;
17
+ application: z.ZodString;
18
+ title: z.ZodOptional<z.ZodString>;
19
+ short_title: z.ZodOptional<z.ZodString>;
20
+ abbreviation: z.ZodOptional<z.ZodString>;
21
+ section_label: z.ZodOptional<z.ZodString>;
22
+ law_id: z.ZodOptional<z.ZodString>;
23
+ law_url: z.ZodOptional<z.ZodString>;
24
+ in_force_from: z.ZodOptional<z.ZodString>;
25
+ in_force_until: z.ZodOptional<z.ZodString>;
26
+ promulgation: z.ZodOptional<z.ZodString>;
27
+ type: z.ZodOptional<z.ZodString>;
28
+ indexes: z.ZodArray<z.ZodString>;
29
+ eli: z.ZodOptional<z.ZodString>;
30
+ celex_references: z.ZodArray<z.ZodString>;
31
+ municipality: z.ZodOptional<z.ZodString>;
32
+ content_urls: z.ZodObject<{
33
+ xml: z.ZodOptional<z.ZodString>;
34
+ html: z.ZodOptional<z.ZodString>;
35
+ pdf: z.ZodOptional<z.ZodString>;
36
+ rtf: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>;
38
+ }, z.core.$strip>;
39
+ export type LegislationRecord = z.infer<typeof LegislationRecordSchema>;
40
+ /** Map a normalized RIS hit to the tool's record shape. */
41
+ export declare function toRecord(hit: RisHit, fallbackApplication: LegislationApplication): LegislationRecord;
42
+ export declare const risSearchLegislation: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
43
+ query: z.ZodOptional<z.ZodString>;
44
+ title: z.ZodOptional<z.ZodString>;
45
+ scope: z.ZodDefault<z.ZodEnum<{
46
+ burgenland: "burgenland";
47
+ kaernten: "kaernten";
48
+ niederoesterreich: "niederoesterreich";
49
+ oberoesterreich: "oberoesterreich";
50
+ salzburg: "salzburg";
51
+ steiermark: "steiermark";
52
+ tirol: "tirol";
53
+ vorarlberg: "vorarlberg";
54
+ wien: "wien";
55
+ federal: "federal";
56
+ }>>;
57
+ municipality: z.ZodOptional<z.ZodString>;
58
+ language: z.ZodDefault<z.ZodEnum<{
59
+ german: "german";
60
+ english: "english";
61
+ }>>;
62
+ in_force_as_of: z.ZodOptional<z.ZodString>;
63
+ include_all_versions: z.ZodOptional<z.ZodBoolean>;
64
+ entered_force_from: z.ZodOptional<z.ZodString>;
65
+ entered_force_to: z.ZodOptional<z.ZodString>;
66
+ left_force_from: z.ZodOptional<z.ZodString>;
67
+ left_force_to: z.ZodOptional<z.ZodString>;
68
+ section_from: z.ZodOptional<z.ZodString>;
69
+ section_to: z.ZodOptional<z.ZodString>;
70
+ section_type: z.ZodOptional<z.ZodEnum<{
71
+ Alle: "Alle";
72
+ Artikel: "Artikel";
73
+ Paragraph: "Paragraph";
74
+ Anlage: "Anlage";
75
+ }>>;
76
+ law_id: z.ZodOptional<z.ZodString>;
77
+ index: z.ZodOptional<z.ZodString>;
78
+ changed_since: z.ZodOptional<z.ZodEnum<{
79
+ one_week: "one_week";
80
+ two_weeks: "two_weeks";
81
+ one_month: "one_month";
82
+ three_months: "three_months";
83
+ six_months: "six_months";
84
+ one_year: "one_year";
85
+ }>>;
86
+ sort_by: z.ZodOptional<z.ZodEnum<{
87
+ in_force_date: "in_force_date";
88
+ section: "section";
89
+ }>>;
90
+ sort_direction: z.ZodOptional<z.ZodEnum<{
91
+ ascending: "ascending";
92
+ descending: "descending";
93
+ }>>;
94
+ page: z.ZodOptional<z.ZodNumber>;
95
+ page_size: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<20>, z.ZodLiteral<50>, z.ZodLiteral<100>]>>;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ results: z.ZodArray<z.ZodObject<{
98
+ document_number: z.ZodString;
99
+ application: z.ZodString;
100
+ title: z.ZodOptional<z.ZodString>;
101
+ short_title: z.ZodOptional<z.ZodString>;
102
+ abbreviation: z.ZodOptional<z.ZodString>;
103
+ section_label: z.ZodOptional<z.ZodString>;
104
+ law_id: z.ZodOptional<z.ZodString>;
105
+ law_url: z.ZodOptional<z.ZodString>;
106
+ in_force_from: z.ZodOptional<z.ZodString>;
107
+ in_force_until: z.ZodOptional<z.ZodString>;
108
+ promulgation: z.ZodOptional<z.ZodString>;
109
+ type: z.ZodOptional<z.ZodString>;
110
+ indexes: z.ZodArray<z.ZodString>;
111
+ eli: z.ZodOptional<z.ZodString>;
112
+ celex_references: z.ZodArray<z.ZodString>;
113
+ municipality: z.ZodOptional<z.ZodString>;
114
+ content_urls: z.ZodObject<{
115
+ xml: z.ZodOptional<z.ZodString>;
116
+ html: z.ZodOptional<z.ZodString>;
117
+ pdf: z.ZodOptional<z.ZodString>;
118
+ rtf: z.ZodOptional<z.ZodString>;
119
+ }, z.core.$strip>;
120
+ }, z.core.$strip>>;
121
+ }, z.core.$strip>, readonly [{
122
+ readonly reason: "scope_filter_mismatch";
123
+ readonly code: JsonRpcErrorCode.ValidationError;
124
+ readonly when: "A filter was combined with a scope, municipality, or language that does not support it, or mutually exclusive version filters were combined — rejected locally before any upstream call; the message names the offending pair.";
125
+ readonly recovery: "Drop the named filter or adjust scope: municipality needs a state scope and supports query/title/in_force_as_of; english supports query/title under scope: federal. Version filters are exclusive — pick in_force_as_of, include_all_versions, OR a force-window.";
126
+ }, {
127
+ readonly reason: "invalid_query";
128
+ readonly code: JsonRpcErrorCode.ValidationError;
129
+ readonly when: "RIS rejected a parameter value — the in-band Client error message is passed through verbatim; it names the invalid element and its valid values.";
130
+ readonly recovery: "Correct the parameter RIS names in the message. Ground valid codes with ris_list_reference (topic: states, section_types, changed_since_intervals, or search_syntax).";
131
+ }, {
132
+ readonly reason: "upstream_error";
133
+ readonly code: JsonRpcErrorCode.ServiceUnavailable;
134
+ readonly when: "RIS is unreachable, returned a server error, or served an HTML error page.";
135
+ readonly retryable: true;
136
+ readonly recovery: "RIS is temporarily unavailable — retry after a short delay. If it persists, reduce page_size or narrow the query.";
137
+ }], {
138
+ readonly totalCount: z.ZodNumber;
139
+ readonly page: z.ZodNumber;
140
+ readonly pageSize: z.ZodNumber;
141
+ readonly truncated: z.ZodOptional<z.ZodBoolean>;
142
+ readonly appliedInForceAsOf: z.ZodOptional<z.ZodString>;
143
+ readonly notice: z.ZodOptional<z.ZodString>;
144
+ }>;
145
+ //# sourceMappingURL=ris-search-legislation.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ris-search-legislation.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/ris-search-legislation.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,OAAO,KAAK,EAEV,sBAAsB,EAGvB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAuCtD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;iBAkEyD,CAAC;AAE9F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAaxE,2DAA2D;AAC3D,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,EACX,mBAAmB,EAAE,sBAAsB,GAC1C,iBAAiB,CA0CnB;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0X/B,CAAC"}
@@ -0,0 +1,466 @@
1
+ /**
2
+ * @fileoverview ris_search_legislation — one search surface over Austrian consolidated
3
+ * federal law (BrKons), consolidated state law (LrKons), municipal law (Gr), and English
4
+ * translations of selected federal laws (Erv). `scope`, `municipality`, and `language`
5
+ * route to the owning application; conditional filters are guarded locally before any
6
+ * upstream call. The flagship behavior: `in_force_as_of` defaults to today (Austria) so
7
+ * "what does the law say" questions never silently search all historical versions — the
8
+ * applied date is echoed in enrichment.
9
+ * @module mcp-server/tools/definitions/ris-search-legislation
10
+ */
11
+ import { tool, z } from '@cyanheads/mcp-ts-core';
12
+ import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
13
+ import { RIS_CHANGED_SINCE_INTERVALS, RIS_STATES } from '../../../services/ris/reference/index.js';
14
+ import { getRisService } from '../../../services/ris/ris-service.js';
15
+ import { isoDateString } from './_shared.js';
16
+ const STATE_CODES = RIS_STATES.map((s) => s.code);
17
+ const SCOPE_VALUES = ['federal', ...STATE_CODES];
18
+ const CHANGED_SINCE_CODES = RIS_CHANGED_SINCE_INTERVALS.map((i) => i.code);
19
+ /** Heuristic: the query/title looks like a legal citation (§ / gazette number / GZ shape). */
20
+ const CITATION_SHAPE = /§|\b(?:bgbl|lgbl|rgbl|stgbl|gbl[öo]|vfslg|vwslg)\b|\b\d{1,4}\/\d{2,4}\b|\b\d{4}-\d\.\d{3}\.\d{3}\b/iu;
21
+ /** Today's date in Austria (Europe/Vienna), ISO `YYYY-MM-DD`. */
22
+ function todayInAustria() {
23
+ return new Intl.DateTimeFormat('en-CA', {
24
+ day: '2-digit',
25
+ month: '2-digit',
26
+ timeZone: 'Europe/Vienna',
27
+ year: 'numeric',
28
+ }).format(new Date());
29
+ }
30
+ /** Map an empty string from a form-based client to `undefined`. */
31
+ function meaningful(value) {
32
+ return value !== undefined && value !== '' ? value : undefined;
33
+ }
34
+ const ContentUrlsSchema = z
35
+ .object({
36
+ xml: z.string().optional().describe('XML rendition URL (RIS Nutzdaten schema).'),
37
+ html: z.string().optional().describe('HTML rendition URL.'),
38
+ pdf: z.string().optional().describe('PDF rendition URL.'),
39
+ rtf: z.string().optional().describe('RTF rendition URL.'),
40
+ })
41
+ .describe('Rendition URLs of the main document. Municipal and translation hits may be sparse.');
42
+ export const LegislationRecordSchema = z
43
+ .object({
44
+ document_number: z
45
+ .string()
46
+ .describe('Technical RIS document number (e.g. NOR40262691, GEMRE_WI_…, ERV_1999_1_165) — pass together with application to ris_get_document.'),
47
+ application: z
48
+ .string()
49
+ .describe('RIS application the record belongs to: BrKons (federal), LrKons (state), Gr (municipal), or Erv (English translation).'),
50
+ title: z.string().optional().describe('Full document title, HTML markup stripped.'),
51
+ short_title: z.string().optional().describe('Short title (Kurztitel), where assigned.'),
52
+ abbreviation: z
53
+ .string()
54
+ .optional()
55
+ .describe('Official abbreviation, where the record carries one.'),
56
+ section_label: z
57
+ .string()
58
+ .optional()
59
+ .describe('§ / Artikel / Anlage label of this document (ArtikelParagraphAnlage).'),
60
+ law_id: z
61
+ .string()
62
+ .optional()
63
+ .describe('Law-level grouping key (Gesetzesnummer) — filter by law_id to fetch every section of the same law.'),
64
+ law_url: z
65
+ .string()
66
+ .optional()
67
+ .describe('RIS web view of the whole law (GesamteRechtsvorschriftUrl) — for humans.'),
68
+ in_force_from: z
69
+ .string()
70
+ .optional()
71
+ .describe('Date this version entered force (Inkrafttretensdatum).'),
72
+ in_force_until: z
73
+ .string()
74
+ .optional()
75
+ .describe('Date this version left force (Ausserkrafttretensdatum). Absent while in force.'),
76
+ promulgation: z
77
+ .string()
78
+ .optional()
79
+ .describe('Promulgation reference (Kundmachungsorgan), e.g. "BGBl. I Nr. 165/1999".'),
80
+ type: z
81
+ .string()
82
+ .optional()
83
+ .describe('Norm type code (BG, V, K, …) — glossary: ris_list_reference topic law_types.'),
84
+ indexes: z
85
+ .array(z.string().describe('One Systematik index entry, e.g. "10/10 Datenschutz".'))
86
+ .describe('Systematik classification entries (Index). Empty when unclassified.'),
87
+ eli: z
88
+ .string()
89
+ .optional()
90
+ .describe('European Legislation Identifier, where assigned (federal coverage is best).'),
91
+ celex_references: z
92
+ .array(z.string().describe('One CELEX number of a transposed EU act.'))
93
+ .describe('CELEX numbers parsed from the record — the EU-transposition hook for eur-lex chaining. Empty when none.'),
94
+ municipality: z
95
+ .string()
96
+ .optional()
97
+ .describe('Municipality the norm belongs to (municipal law only).'),
98
+ content_urls: ContentUrlsSchema,
99
+ })
100
+ .describe('One consolidated-law document — one § / Artikel / Anlage — or one translation.');
101
+ /** Pick the four core rendition URLs off a normalized hit. */
102
+ function pickContentUrls(hit) {
103
+ const { html, pdf, rtf, xml } = hit.contentUrls;
104
+ return {
105
+ ...(xml !== undefined && { xml }),
106
+ ...(html !== undefined && { html }),
107
+ ...(pdf !== undefined && { pdf }),
108
+ ...(rtf !== undefined && { rtf }),
109
+ };
110
+ }
111
+ /** Map a normalized RIS hit to the tool's record shape. */
112
+ export function toRecord(hit, fallbackApplication) {
113
+ const base = {
114
+ application: hit.application ?? fallbackApplication,
115
+ celex_references: [],
116
+ content_urls: pickContentUrls(hit),
117
+ document_number: hit.documentNumber,
118
+ indexes: [],
119
+ };
120
+ const md = hit.metadata;
121
+ if (md.controller === 'Bundesrecht' || md.controller === 'Landesrecht') {
122
+ return {
123
+ ...base,
124
+ ...('abbreviation' in md && md.abbreviation !== undefined
125
+ ? { abbreviation: md.abbreviation }
126
+ : {}),
127
+ celex_references: [...md.celexReferences],
128
+ ...(md.eli !== undefined && { eli: md.eli }),
129
+ ...(md.inForceFrom !== undefined && { in_force_from: md.inForceFrom }),
130
+ ...(md.inForceUntil !== undefined && { in_force_until: md.inForceUntil }),
131
+ indexes: [...md.indexes],
132
+ ...(md.lawId !== undefined && { law_id: md.lawId }),
133
+ ...(md.lawUrl !== undefined && { law_url: md.lawUrl }),
134
+ ...(md.promulgation !== undefined && { promulgation: md.promulgation }),
135
+ ...(md.sectionLabel !== undefined && { section_label: md.sectionLabel }),
136
+ ...(md.shortTitle !== undefined && { short_title: md.shortTitle }),
137
+ ...(md.title !== undefined && { title: md.title }),
138
+ ...(md.normType !== undefined && { type: md.normType }),
139
+ };
140
+ }
141
+ if (md.controller === 'Gemeinden') {
142
+ return {
143
+ ...base,
144
+ ...(md.abbreviation !== undefined && { abbreviation: md.abbreviation }),
145
+ ...(md.inForceFrom !== undefined && { in_force_from: md.inForceFrom }),
146
+ indexes: [...md.indexes],
147
+ ...(md.municipality !== undefined && { municipality: md.municipality }),
148
+ ...(md.shortTitle !== undefined && { short_title: md.shortTitle }),
149
+ ...(md.title !== undefined && { title: md.title }),
150
+ ...(md.normType !== undefined && { type: md.normType }),
151
+ };
152
+ }
153
+ return base;
154
+ }
155
+ export const risSearchLegislation = tool('ris_search_legislation', {
156
+ title: 'Search Austrian Legislation',
157
+ description: 'Search Austrian consolidated law and English translations: federal law (scope: federal, the default), one Bundesland (scope: burgenland … wien), municipal law (municipality plus a state scope — selected norms in 6 Bundesländer), or English translations of selected federal laws (language: english, federal only, ~138 documents). One document is one § / Artikel / Anlage; fetch a whole law by filtering law_id. Searches apply the version in force today in Austria by default — set in_force_as_of for another date, include_all_versions: true for full version history, or an entered_force / left_force window for new-law and repeal tracking; the three version filters are mutually exclusive, and the applied date is echoed back in the result. query is full text (boolean UND/ODER/NICHT or AND/OR/NOT, trailing-only * wildcard); title matches title, short title, and abbreviation ("DSG"). For a specific citation like "§ 6 DSG", ris_lookup_citation resolves it deterministically instead. Consolidated text is informational, not legally binding — the authentic gazette artifact lives in ris_search_gazette.',
158
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
159
+ input: z.object({
160
+ query: z
161
+ .string()
162
+ .optional()
163
+ .describe('Full-text search (Suchworte). Boolean operators UND/ODER/NICHT or AND/OR/NOT, parentheses, quoted phrases; wildcard * is trailing-only ("Datenschutz*", never "*schutz"). Syntax: ris_list_reference topic search_syntax.'),
164
+ title: z
165
+ .string()
166
+ .optional()
167
+ .describe('Title search (Titel) — matches title, short title, and official abbreviation ("ABGB", "DSG"). Phrase field: * allowed leading or trailing with ≥2 characters beside it.'),
168
+ scope: z
169
+ .enum(SCOPE_VALUES)
170
+ .default('federal')
171
+ .describe('Jurisdiction: federal (default) searches consolidated federal law; a Bundesland searches that state’s consolidated law (or, with municipality set, its municipal law).'),
172
+ municipality: z
173
+ .string()
174
+ .optional()
175
+ .describe('Municipality name for municipal law (e.g. "Graz" — RIS’s spelling, not "Stadt Graz"). Requires a state scope; combines only with query, title, and in_force_as_of. Coverage is selected norms in 6 Bundesländer (no Burgenland/Tirol/Vorarlberg).'),
176
+ language: z
177
+ .enum(['german', 'english'])
178
+ .default('german')
179
+ .describe('german (default) searches the authoritative German corpus; english searches the ~138 unofficial English translations of selected federal laws (requires scope: federal; combines only with query and title).'),
180
+ in_force_as_of: isoDateString
181
+ .optional()
182
+ .describe('Return only the version in force on this date (YYYY-MM-DD). DEFAULTS TO TODAY in Austria — omitting it never searches all historical versions; opt into that with include_all_versions.'),
183
+ include_all_versions: z
184
+ .boolean()
185
+ .optional()
186
+ .describe('true searches every historical version (no in-force date filter) — version-history research. Overrides in_force_as_of; mutually exclusive with the force-window filters.'),
187
+ entered_force_from: isoDateString
188
+ .optional()
189
+ .describe('Provisions that entered force on/after this date (YYYY-MM-DD) — new-law tracking. Federal/state consolidated law only; mutually exclusive with in_force_as_of and include_all_versions.'),
190
+ entered_force_to: isoDateString
191
+ .optional()
192
+ .describe('Provisions that entered force on/before this date (YYYY-MM-DD).'),
193
+ left_force_from: isoDateString
194
+ .optional()
195
+ .describe('Provisions that left force on/after this date (YYYY-MM-DD) — repeal tracking. Same exclusivity as entered_force_from.'),
196
+ left_force_to: isoDateString
197
+ .optional()
198
+ .describe('Provisions that left force on/before this date (YYYY-MM-DD).'),
199
+ section_from: z
200
+ .string()
201
+ .optional()
202
+ .describe('Start of a § / Artikel / Anlage number range, digits with optional letter ("6", "1a"). Federal/state consolidated law only.'),
203
+ section_to: z
204
+ .string()
205
+ .optional()
206
+ .describe('End of the section range. Equal to section_from for a single section.'),
207
+ section_type: z
208
+ .enum(['Alle', 'Artikel', 'Paragraph', 'Anlage'])
209
+ .optional()
210
+ .describe('Which section kind the range addresses. Defaults to Paragraph when a section range is set. Values: ris_list_reference topic section_types.'),
211
+ law_id: z
212
+ .string()
213
+ .optional()
214
+ .describe('Law-level grouping key (Gesetzesnummer, e.g. 10001597 = DSG) — exact match; returns every section of that law. Federal/state consolidated law only.'),
215
+ index: z
216
+ .string()
217
+ .optional()
218
+ .describe('Systematik classification filter (e.g. "10/10 Datenschutz"). Federal/state consolidated law only.'),
219
+ changed_since: z
220
+ .enum(CHANGED_SINCE_CODES)
221
+ .optional()
222
+ .describe('Coarse recency filter — documents changed in RIS within the interval. For exact windows and deletions use ris_track_changes.'),
223
+ sort_by: z
224
+ .enum(['section', 'in_force_date'])
225
+ .optional()
226
+ .describe('Sort column: section (§/Artikel/Anlage label) or in_force_date. Default: upstream order. Federal/state consolidated law only.'),
227
+ sort_direction: z
228
+ .enum(['ascending', 'descending'])
229
+ .optional()
230
+ .describe('Sort direction; applies with sort_by.'),
231
+ page: z.number().int().min(1).optional().describe('1-based result page. Default 1.'),
232
+ page_size: z
233
+ .union([z.literal(10), z.literal(20), z.literal(50), z.literal(100)])
234
+ .optional()
235
+ .describe('Documents per page — RIS accepts 10, 20, 50, or 100. Default 20.'),
236
+ }),
237
+ output: z.object({
238
+ results: z
239
+ .array(LegislationRecordSchema)
240
+ .describe('Matching documents for the requested page. Totals and paging in enrichment.'),
241
+ }),
242
+ enrichment: {
243
+ totalCount: z.number().describe('Total matching documents across all pages.'),
244
+ page: z.number().describe('1-based page number RIS served.'),
245
+ pageSize: z.number().describe('Page size RIS applied.'),
246
+ truncated: z
247
+ .boolean()
248
+ .optional()
249
+ .describe('Present and true when more pages exist beyond this one — raise page to continue.'),
250
+ appliedInForceAsOf: z
251
+ .string()
252
+ .optional()
253
+ .describe('The in-force date the server actually applied (defaulted to today in Austria when omitted). Absent when include_all_versions, a force-window, or language: english searched without a date filter.'),
254
+ notice: z
255
+ .string()
256
+ .optional()
257
+ .describe('Zero-hit guidance — names the likely cause and the concrete next call.'),
258
+ },
259
+ errors: [
260
+ {
261
+ reason: 'scope_filter_mismatch',
262
+ code: JsonRpcErrorCode.ValidationError,
263
+ when: 'A filter was combined with a scope, municipality, or language that does not support it, or mutually exclusive version filters were combined — rejected locally before any upstream call; the message names the offending pair.',
264
+ recovery: 'Drop the named filter or adjust scope: municipality needs a state scope and supports query/title/in_force_as_of; english supports query/title under scope: federal. Version filters are exclusive — pick in_force_as_of, include_all_versions, OR a force-window.',
265
+ },
266
+ {
267
+ reason: 'invalid_query',
268
+ code: JsonRpcErrorCode.ValidationError,
269
+ when: 'RIS rejected a parameter value — the in-band Client error message is passed through verbatim; it names the invalid element and its valid values.',
270
+ recovery: 'Correct the parameter RIS names in the message. Ground valid codes with ris_list_reference (topic: states, section_types, changed_since_intervals, or search_syntax).',
271
+ },
272
+ {
273
+ reason: 'upstream_error',
274
+ code: JsonRpcErrorCode.ServiceUnavailable,
275
+ when: 'RIS is unreachable, returned a server error, or served an HTML error page.',
276
+ retryable: true,
277
+ recovery: 'RIS is temporarily unavailable — retry after a short delay. If it persists, reduce page_size or narrow the query.',
278
+ },
279
+ ],
280
+ async handler(input, ctx) {
281
+ const query = meaningful(input.query);
282
+ const title = meaningful(input.title);
283
+ const municipality = meaningful(input.municipality);
284
+ const explicitAsOf = meaningful(input.in_force_as_of);
285
+ const enteredForceFrom = meaningful(input.entered_force_from);
286
+ const enteredForceTo = meaningful(input.entered_force_to);
287
+ const leftForceFrom = meaningful(input.left_force_from);
288
+ const leftForceTo = meaningful(input.left_force_to);
289
+ const sectionFrom = meaningful(input.section_from);
290
+ const sectionTo = meaningful(input.section_to);
291
+ const lawId = meaningful(input.law_id);
292
+ const index = meaningful(input.index);
293
+ const { language, scope } = input;
294
+ const includeAllVersions = input.include_all_versions === true;
295
+ const fail = (message) => ctx.fail('scope_filter_mismatch', message, { ...ctx.recoveryFor('scope_filter_mismatch') });
296
+ if (language === 'english' && scope !== 'federal') {
297
+ throw fail(`language: 'english' is served by the federal Erv application — got scope: '${scope}'.`);
298
+ }
299
+ if (municipality !== undefined && scope === 'federal') {
300
+ throw fail(`municipality ("${municipality}") requires a state scope — got scope: 'federal'. Set scope to the municipality's Bundesland.`);
301
+ }
302
+ const application = language === 'english'
303
+ ? 'Erv'
304
+ : municipality !== undefined
305
+ ? 'Gr'
306
+ : scope === 'federal'
307
+ ? 'BrKons'
308
+ : 'LrKons';
309
+ const consolidatedOnly = [
310
+ ['section_from', sectionFrom],
311
+ ['section_to', sectionTo],
312
+ ['section_type', input.section_type],
313
+ ['law_id', lawId],
314
+ ['index', index],
315
+ ['entered_force_from', enteredForceFrom],
316
+ ['entered_force_to', enteredForceTo],
317
+ ['left_force_from', leftForceFrom],
318
+ ['left_force_to', leftForceTo],
319
+ ['sort_by', input.sort_by],
320
+ ['sort_direction', input.sort_direction],
321
+ ];
322
+ if (application === 'Gr' || application === 'Erv') {
323
+ const offending = consolidatedOnly.find(([, value]) => value !== undefined);
324
+ if (offending) {
325
+ throw fail(application === 'Gr'
326
+ ? `${offending[0]} cannot be combined with municipality ("${municipality}") — municipal law supports query, title, and in_force_as_of only.`
327
+ : `${offending[0]} cannot be combined with language: 'english' — English translations support query and title only.`);
328
+ }
329
+ if (application === 'Erv' && explicitAsOf !== undefined) {
330
+ throw fail(`in_force_as_of cannot be combined with language: 'english' — English translations carry no version dates and support query and title only.`);
331
+ }
332
+ }
333
+ const windowParam = enteredForceFrom !== undefined
334
+ ? 'entered_force_from'
335
+ : enteredForceTo !== undefined
336
+ ? 'entered_force_to'
337
+ : leftForceFrom !== undefined
338
+ ? 'left_force_from'
339
+ : leftForceTo !== undefined
340
+ ? 'left_force_to'
341
+ : undefined;
342
+ if (windowParam !== undefined && (explicitAsOf !== undefined || includeAllVersions)) {
343
+ throw fail(`${windowParam} cannot be combined with ${includeAllVersions ? 'include_all_versions' : 'in_force_as_of'} — version filters are exclusive: pick in_force_as_of, include_all_versions, OR a force-window.`);
344
+ }
345
+ const appliedInForceAsOf = application === 'Erv' || includeAllVersions || windowParam !== undefined
346
+ ? undefined
347
+ : (explicitAsOf ?? todayInAustria());
348
+ const params = {
349
+ application,
350
+ ...(query !== undefined && { query }),
351
+ ...(title !== undefined && { title }),
352
+ ...(scope !== 'federal' && { state: scope }),
353
+ ...(municipality !== undefined && { municipality }),
354
+ ...(appliedInForceAsOf !== undefined && { inForceAsOf: appliedInForceAsOf }),
355
+ ...(enteredForceFrom !== undefined && { enteredForceFrom }),
356
+ ...(enteredForceTo !== undefined && { enteredForceTo }),
357
+ ...(leftForceFrom !== undefined && { leftForceFrom }),
358
+ ...(leftForceTo !== undefined && { leftForceTo }),
359
+ ...(sectionFrom !== undefined && { sectionFrom }),
360
+ ...(sectionTo !== undefined && { sectionTo }),
361
+ ...(input.section_type !== undefined && { sectionType: input.section_type }),
362
+ ...(lawId !== undefined && { lawId }),
363
+ ...(index !== undefined && { index }),
364
+ ...(input.changed_since !== undefined && { changedSince: input.changed_since }),
365
+ ...(input.sort_by !== undefined && { sortBy: input.sort_by }),
366
+ ...(input.sort_direction !== undefined && { sortDirection: input.sort_direction }),
367
+ ...(input.page !== undefined && { page: input.page }),
368
+ ...(input.page_size !== undefined && { pageSize: input.page_size }),
369
+ };
370
+ // Map in-band RIS errors onto this tool's declared contract so reason +
371
+ // recovery reach the wire (service-level throws carry neither).
372
+ const result = await getRisService()
373
+ .searchLegislation(params, ctx)
374
+ .catch((err) => {
375
+ if (err instanceof McpError && err.code === JsonRpcErrorCode.InvalidParams) {
376
+ throw ctx.fail('invalid_query', err.message, { ...ctx.recoveryFor('invalid_query') });
377
+ }
378
+ if (err instanceof McpError && err.code === JsonRpcErrorCode.ServiceUnavailable) {
379
+ throw ctx.fail('upstream_error', err.message, { ...ctx.recoveryFor('upstream_error') });
380
+ }
381
+ throw err;
382
+ });
383
+ ctx.log.info('Legislation search completed', {
384
+ application,
385
+ hits: result.hits.length,
386
+ total: result.total,
387
+ });
388
+ ctx.enrich.total(result.total);
389
+ ctx.enrich({ page: result.page, pageSize: result.pageSize });
390
+ if (result.total > (result.page - 1) * result.pageSize + result.hits.length) {
391
+ ctx.enrich({ truncated: true });
392
+ }
393
+ if (appliedInForceAsOf !== undefined)
394
+ ctx.enrich({ appliedInForceAsOf });
395
+ if (result.total === 0) {
396
+ const fragments = ['0 documents matched.'];
397
+ if (appliedInForceAsOf !== undefined) {
398
+ fragments.push(`Only versions in force on ${appliedInForceAsOf} were searched — a repealed or not-yet-enacted provision returns nothing. Set include_all_versions: true to search all historical versions.`);
399
+ }
400
+ if (query !== undefined) {
401
+ fragments.push("query wildcards are trailing-only ('Datenschutz*', never '*schutz'); boolean operators UND/ODER/NICHT or AND/OR/NOT. Syntax reference: ris_list_reference topic search_syntax.");
402
+ }
403
+ if (title !== undefined) {
404
+ fragments.push("title matches title, short title, and abbreviation — try the official abbreviation ('DSG') with a trailing *.");
405
+ }
406
+ if (municipality !== undefined) {
407
+ fragments.push("Municipal coverage is selected norms in 6 Bundesländer (no Burgenland/Tirol/Vorarlberg) — coverage: ris_list_reference topic applications. The municipality name must match RIS's spelling ('Graz', not 'Stadt Graz').");
408
+ }
409
+ if (language === 'english') {
410
+ fragments.push('Erv holds ~138 selected translations only — absence means untranslated, not nonexistent. Search the German original instead (language: german).');
411
+ }
412
+ if ([query, title].some((text) => text !== undefined && CITATION_SHAPE.test(text))) {
413
+ fragments.push('For a specific citation, ris_lookup_citation resolves it deterministically instead of keyword search.');
414
+ }
415
+ ctx.enrich.notice(fragments.join(' '));
416
+ }
417
+ return { results: result.hits.map((hit) => toRecord(hit, application)) };
418
+ },
419
+ // format() populates content[] — the markdown twin of structuredContent. Every output
420
+ // field renders here; totals, paging, and notices ride the enrichment trailer.
421
+ format: (result) => {
422
+ if (result.results.length === 0) {
423
+ return [{ type: 'text', text: '_No documents on this page._' }];
424
+ }
425
+ const blocks = result.results.map((r) => {
426
+ const lines = [`## ${r.title ?? r.short_title ?? r.document_number}`];
427
+ lines.push(`**Document:** ${r.document_number} (${r.application})`);
428
+ const identity = [];
429
+ if (r.short_title !== undefined)
430
+ identity.push(`**Short title:** ${r.short_title}`);
431
+ if (r.abbreviation !== undefined)
432
+ identity.push(`**Abbreviation:** ${r.abbreviation}`);
433
+ if (r.section_label !== undefined)
434
+ identity.push(`**Section:** ${r.section_label}`);
435
+ if (r.type !== undefined)
436
+ identity.push(`**Type:** ${r.type}`);
437
+ if (identity.length > 0)
438
+ lines.push(identity.join(' | '));
439
+ if (r.law_id !== undefined || r.law_url !== undefined) {
440
+ lines.push(`**Law:** ${[r.law_id !== undefined ? `id ${r.law_id}` : undefined, r.law_url].filter((part) => part !== undefined).join(' — ')}`);
441
+ }
442
+ if (r.in_force_from !== undefined || r.in_force_until !== undefined) {
443
+ lines.push(`**In force:** ${r.in_force_from ?? 'unknown'} → ${r.in_force_until ?? 'still in force'}`);
444
+ }
445
+ if (r.promulgation !== undefined)
446
+ lines.push(`**Promulgated:** ${r.promulgation}`);
447
+ if (r.municipality !== undefined)
448
+ lines.push(`**Municipality:** ${r.municipality}`);
449
+ if (r.indexes.length > 0)
450
+ lines.push(`**Index:** ${r.indexes.join('; ')}`);
451
+ if (r.eli !== undefined)
452
+ lines.push(`**ELI:** ${r.eli}`);
453
+ if (r.celex_references.length > 0) {
454
+ lines.push(`**CELEX:** ${r.celex_references.join(', ')}`);
455
+ }
456
+ const urls = ['html', 'pdf', 'rtf', 'xml']
457
+ .filter((key) => r.content_urls[key] !== undefined)
458
+ .map((key) => `[${key.toUpperCase()}](${r.content_urls[key]})`);
459
+ if (urls.length > 0)
460
+ lines.push(`**Text:** ${urls.join(' · ')}`);
461
+ return lines.join('\n');
462
+ });
463
+ return [{ type: 'text', text: blocks.join('\n\n') }];
464
+ },
465
+ });
466
+ //# sourceMappingURL=ris-search-legislation.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ris-search-legislation.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/ris-search-legislation.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,2BAA2B,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAO5F,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAsC,CAAC;AACvF,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,GAAG,WAAW,CAAmC,CAAC;AACnF,MAAM,mBAAmB,GAAG,2BAA2B,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAGxE,CAAC;AAEF,8FAA8F;AAC9F,MAAM,cAAc,GAClB,sGAAsG,CAAC;AAEzG,iEAAiE;AACjE,SAAS,cAAc;IACrB,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QACtC,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;AACxB,CAAC;AAED,mEAAmE;AACnE,SAAS,UAAU,CAAC,KAAyB;IAC3C,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC;AAED,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