@identitate-md/mcp 1.0.5 → 1.0.7
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.
- package/README.md +35 -23
- package/dist/tools/get-brand-colors.d.ts.map +1 -1
- package/dist/tools/get-brand-colors.js +23 -35
- package/dist/tools/get-brand-colors.js.map +1 -1
- package/dist/tools/get-institution.d.ts.map +1 -1
- package/dist/tools/get-institution.js +9 -19
- package/dist/tools/get-institution.js.map +1 -1
- package/dist/tools/get-logo.d.ts.map +1 -1
- package/dist/tools/get-logo.js +32 -46
- package/dist/tools/get-logo.js.map +1 -1
- package/dist/tools/list-categories.d.ts.map +1 -1
- package/dist/tools/list-categories.js +3 -10
- package/dist/tools/list-categories.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +54 -44
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/tool-response.d.ts +53 -0
- package/dist/tools/tool-response.d.ts.map +1 -0
- package/dist/tools/tool-response.js +39 -0
- package/dist/tools/tool-response.js.map +1 -0
- package/dist/types.d.ts +1 -117
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@identitate-md/mcp)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
+
The MCP server metadata for the [official MCP Registry](https://registry.modelcontextprotocol.io/) is in [`server.json`](./server.json).
|
|
9
|
+
|
|
8
10
|
Use Moldovan government brand assets directly from Claude, Cursor, Windsurf, and any other MCP-compatible AI assistant.
|
|
9
11
|
|
|
10
12
|
## Setup
|
|
@@ -47,6 +49,22 @@ Add to your MCP settings:
|
|
|
47
49
|
|
|
48
50
|
## Tools
|
|
49
51
|
|
|
52
|
+
Every tool is read-only. MCP clients receive both structured JSON and a text
|
|
53
|
+
fallback. The structured payload uses this envelope:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"result": {},
|
|
58
|
+
"catalog": {
|
|
59
|
+
"schemaVersion": "3.0.0",
|
|
60
|
+
"generatedAt": "2026-10-10T00:00:00.000Z"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Use `catalog.generatedAt` to tell how current the bundled catalog is. Errors
|
|
66
|
+
include an error at `result.error` and, where possible, valid alternatives.
|
|
67
|
+
|
|
50
68
|
### `search_institutions`
|
|
51
69
|
|
|
52
70
|
Search institutions by name, keyword, or category.
|
|
@@ -57,7 +75,9 @@ Search institutions by name, keyword, or category.
|
|
|
57
75
|
| `category` | string (optional) | Filter by category ID (see below) |
|
|
58
76
|
| `limit` | number (default: 10) | Max results (1–50) |
|
|
59
77
|
|
|
60
|
-
|
|
78
|
+
Use `list_categories` for the current category IDs and labels. Search results
|
|
79
|
+
include a match reason, relevance rank, catalog quality, last-updated date, and
|
|
80
|
+
the canonical logo URL when one is available.
|
|
61
81
|
|
|
62
82
|
---
|
|
63
83
|
|
|
@@ -69,13 +89,16 @@ Get full brand data for an institution by ID.
|
|
|
69
89
|
|-----------|------|-------------|
|
|
70
90
|
| `id` | string | Institution ID, e.g. `md-guvern` |
|
|
71
91
|
|
|
72
|
-
Returns
|
|
92
|
+
Returns the complete catalog record, resolved logo URLs, and the public JSON
|
|
93
|
+
source URL.
|
|
73
94
|
|
|
74
95
|
---
|
|
75
96
|
|
|
76
97
|
### `get_logo`
|
|
77
98
|
|
|
78
|
-
Get a logo URL (and optionally SVG content) for a specific institution, layout,
|
|
99
|
+
Get a logo URL (and optionally SVG content) for a specific institution, layout,
|
|
100
|
+
and variant. If the requested layout or variant is missing, the response lists
|
|
101
|
+
available options and suggests a usable fallback when one exists.
|
|
79
102
|
|
|
80
103
|
| Parameter | Type | Default | Description |
|
|
81
104
|
|-----------|------|---------|-------------|
|
|
@@ -114,32 +137,21 @@ Search for all institutions in the "minister" category.
|
|
|
114
137
|
Show me the SVG content of the Parlamentul Republicii Moldova symbol logo.
|
|
115
138
|
```
|
|
116
139
|
|
|
117
|
-
##
|
|
118
|
-
|
|
119
|
-
28 Moldovan government institutions are available, including:
|
|
120
|
-
|
|
121
|
-
- `md-guvern` — Guvernul Republicii Moldova
|
|
122
|
-
- `md-parlament` — Parlamentul Republicii Moldova
|
|
123
|
-
- `md-bnm` — Banca Națională a Moldovei
|
|
124
|
-
- `md-mia` — MIA Plăți Instant
|
|
125
|
-
- `md-mj` — Ministerul Justiției
|
|
126
|
-
- `md-mec` — Ministerul Educației și Cercetării
|
|
127
|
-
- `md-mf` — Ministerul Finanțelor
|
|
128
|
-
- `md-ms` — Ministerul Sănătății
|
|
129
|
-
- `md-mae` — Ministerul Afacerilor Externe
|
|
130
|
-
- `md-age` — Agenția de Guvernare Electronică
|
|
131
|
-
- `md-bns` — Biroul Național de Statistică
|
|
132
|
-
- `md-primaria-chisinau` — Primăria Municipiului Chișinău
|
|
133
|
-
- `md-stema` — Stema Republicii Moldova
|
|
134
|
-
- and more...
|
|
140
|
+
## Institution data
|
|
135
141
|
|
|
136
|
-
|
|
142
|
+
The catalog is updated independently of this package. Query
|
|
143
|
+
`list_categories` or `search_institutions` for current records, or fetch the
|
|
144
|
+
[machine-readable JSON index](https://identitate.md/api/institutions.json).
|
|
145
|
+
Each institution also has a focused JSON endpoint at
|
|
146
|
+
`https://identitate.md/api/institutions/{id}.json`.
|
|
137
147
|
|
|
138
148
|
## Links
|
|
139
149
|
|
|
140
150
|
- **Website**: [identitate.md](https://identitate.md)
|
|
151
|
+
- **Agent guide**: [identitate.md/llms.txt](https://identitate.md/llms.txt)
|
|
152
|
+
- **MCP manifest**: [identitate.md/api/manifest.json](https://identitate.md/api/manifest.json)
|
|
141
153
|
- **Logos package**: [@identitate-md/logos](https://www.npmjs.com/package/@identitate-md/logos)
|
|
142
|
-
- **GitHub**: [github.com/
|
|
154
|
+
- **GitHub**: [github.com/ZLDR/IdentitateMD](https://github.com/ZLDR/IdentitateMD)
|
|
143
155
|
|
|
144
156
|
## License
|
|
145
157
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-brand-colors.d.ts","sourceRoot":"","sources":["../../src/tools/get-brand-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-brand-colors.d.ts","sourceRoot":"","sources":["../../src/tools/get-brand-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAqCpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6D9D"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { getById } from "../data.js";
|
|
3
|
+
import { readOnlyToolConfig, toolResponse } from "./tool-response.js";
|
|
3
4
|
function toRgbString(rgb) {
|
|
4
5
|
return `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`;
|
|
5
6
|
}
|
|
@@ -26,38 +27,29 @@ function formatColor(color, format) {
|
|
|
26
27
|
return base;
|
|
27
28
|
}
|
|
28
29
|
export function registerGetBrandColors(server) {
|
|
29
|
-
server.
|
|
30
|
-
id: z.string().describe("Institution ID, e.g. 'md-age'"),
|
|
30
|
+
server.registerTool("get_brand_colors", readOnlyToolConfig("Get brand colors", "Get an institution's published color palette as HEX, RGB, or CSS custom properties. Results retain the source color name and usage role; an empty palette means no colors are currently documented.", {
|
|
31
|
+
id: z.string().describe("Institution ID from search_institutions, e.g. 'md-age'"),
|
|
31
32
|
format: z
|
|
32
33
|
.enum(["hex", "rgb", "css"])
|
|
33
34
|
.default("hex")
|
|
34
|
-
.describe("Output format: hex (default), rgb, or css
|
|
35
|
+
.describe("Output format: hex (default), rgb, or css custom properties"),
|
|
35
36
|
usage: z
|
|
36
37
|
.enum(["primary", "secondary", "accent", "neutral"])
|
|
37
38
|
.optional()
|
|
38
|
-
.describe("
|
|
39
|
-
}, ({ id, format, usage }) => {
|
|
39
|
+
.describe("Optional filter by usage role"),
|
|
40
|
+
}), ({ id, format, usage }) => {
|
|
40
41
|
const inst = getById(id);
|
|
41
42
|
if (!inst) {
|
|
42
|
-
return {
|
|
43
|
-
content: [{ type: "text", text: JSON.stringify({ error: `Institution '${id}' not found.` }) }],
|
|
44
|
-
isError: true,
|
|
45
|
-
};
|
|
43
|
+
return toolResponse({ error: `Institution '${id}' not found.`, suggestion: "Search by institution name with search_institutions." }, true);
|
|
46
44
|
}
|
|
47
45
|
if (!inst.colors || inst.colors.length === 0) {
|
|
48
|
-
return {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
colors: [],
|
|
56
|
-
note: "No brand colors defined for this institution.",
|
|
57
|
-
}),
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
};
|
|
46
|
+
return toolResponse({
|
|
47
|
+
id: inst.id,
|
|
48
|
+
name: inst.name,
|
|
49
|
+
format,
|
|
50
|
+
colors: [],
|
|
51
|
+
note: "No brand colors are documented for this institution in the current catalog.",
|
|
52
|
+
});
|
|
61
53
|
}
|
|
62
54
|
let colors = inst.colors;
|
|
63
55
|
if (usage) {
|
|
@@ -67,19 +59,15 @@ export function registerGetBrandColors(server) {
|
|
|
67
59
|
const cssBlock = format === "css"
|
|
68
60
|
? `:root {\n${formatted.map((c) => ` ${c.cssVar}`).join(";\n")};\n}`
|
|
69
61
|
: undefined;
|
|
70
|
-
return {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}, null, 2),
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
};
|
|
62
|
+
return toolResponse({
|
|
63
|
+
id: inst.id,
|
|
64
|
+
name: inst.name,
|
|
65
|
+
format,
|
|
66
|
+
usage: usage ?? null,
|
|
67
|
+
colors: formatted,
|
|
68
|
+
...(cssBlock ? { cssBlock } : {}),
|
|
69
|
+
source: "https://identitate.md/api/institutions.json",
|
|
70
|
+
});
|
|
83
71
|
});
|
|
84
72
|
}
|
|
85
73
|
//# sourceMappingURL=get-brand-colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-brand-colors.js","sourceRoot":"","sources":["../../src/tools/get-brand-colors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"get-brand-colors.js","sourceRoot":"","sources":["../../src/tools/get-brand-colors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,SAAS,WAAW,CAAC,GAA6B;IAChD,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AAChD,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,OAAO,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AACzF,CAAC;AAED,SAAS,WAAW,CAClB,KAAY,EACZ,MAA6B;IAE7B,MAAM,IAAI,GAA4B;QACpC,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC;IAEF,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,KAAK,CA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;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-institution.d.ts","sourceRoot":"","sources":["../../src/tools/get-institution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-institution.d.ts","sourceRoot":"","sources":["../../src/tools/get-institution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmBpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA4C9D"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { getById } from "../data.js";
|
|
3
|
+
import { readOnlyToolConfig, toolResponse } from "./tool-response.js";
|
|
3
4
|
/** Resolve an AssetUrls value to a local path string or null */
|
|
4
5
|
function assetToLocal(asset) {
|
|
5
6
|
if (!asset)
|
|
@@ -14,20 +15,12 @@ function toAbsoluteUrl(path) {
|
|
|
14
15
|
return path.startsWith("http") ? path : `https://identitate.md${path}`;
|
|
15
16
|
}
|
|
16
17
|
export function registerGetInstitution(server) {
|
|
17
|
-
server.
|
|
18
|
+
server.registerTool("get_institution", readOnlyToolConfig("Get institution details", "Get the complete structured brand record for one institution. Use an exact ID returned by search_institutions, such as md-age or md-mj.", {
|
|
18
19
|
id: z.string().describe("Institution ID, e.g. 'md-age' or 'md-mj'"),
|
|
19
|
-
}, ({ id }) => {
|
|
20
|
+
}), ({ id }) => {
|
|
20
21
|
const inst = getById(id);
|
|
21
22
|
if (!inst) {
|
|
22
|
-
return {
|
|
23
|
-
content: [
|
|
24
|
-
{
|
|
25
|
-
type: "text",
|
|
26
|
-
text: JSON.stringify({ error: `Institution '${id}' not found.` }, null, 2),
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
isError: true,
|
|
30
|
-
};
|
|
23
|
+
return toolResponse({ error: `Institution '${id}' not found.`, suggestion: "Search by institution name with search_institutions." }, true);
|
|
31
24
|
}
|
|
32
25
|
// Build enriched response with absolute logo URLs
|
|
33
26
|
const logoUrls = {};
|
|
@@ -46,14 +39,11 @@ export function registerGetInstitution(server) {
|
|
|
46
39
|
logoUrls[groupKey] = variants;
|
|
47
40
|
}
|
|
48
41
|
}
|
|
49
|
-
return {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
};
|
|
42
|
+
return toolResponse({
|
|
43
|
+
...inst,
|
|
44
|
+
logoUrls,
|
|
45
|
+
source: "https://identitate.md/api/institutions.json",
|
|
46
|
+
});
|
|
57
47
|
});
|
|
58
48
|
}
|
|
59
49
|
//# sourceMappingURL=get-institution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-institution.js","sourceRoot":"","sources":["../../src/tools/get-institution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"get-institution.js","sourceRoot":"","sources":["../../src/tools/get-institution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,gEAAgE;AAChE,SAAS,YAAY,CACnB,KAA0F;IAE1F,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC;AACrB,CAAC;AAED,SAAS,aAAa,CAAC,IAAmB;IACxC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,OA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C;gBACnF,CAAC;YACH,CAAC;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrC,QAAQ,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;YAChC,CAAC;QACH,CAAC;QAED,OAAO,YAAY,CAAC;YAClB,GAAG,IAAI;YACP,QAAQ;YACR,MAAM,EAAE,6CAA6C;SACtD,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-logo.d.ts","sourceRoot":"","sources":["../../src/tools/get-logo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-logo.d.ts","sourceRoot":"","sources":["../../src/tools/get-logo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAoBpE,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA4FvD"}
|
package/dist/tools/get-logo.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { readFileSync, existsSync } from "fs";
|
|
3
3
|
import { getById, resolveLogoPath } from "../data.js";
|
|
4
|
+
import { readOnlyToolConfig, toolResponse } from "./tool-response.js";
|
|
4
5
|
function assetToLocal(asset) {
|
|
5
6
|
if (!asset)
|
|
6
7
|
return null;
|
|
@@ -15,12 +16,12 @@ function toCdnUrl(localPath) {
|
|
|
15
16
|
: `https://identitate.md${localPath}`;
|
|
16
17
|
}
|
|
17
18
|
export function registerGetLogo(server) {
|
|
18
|
-
server.
|
|
19
|
-
id: z.string().describe("Institution ID, e.g. 'md-age'"),
|
|
19
|
+
server.registerTool("get_logo", readOnlyToolConfig("Get institution logo", "Get a stable logo URL for an institution, layout, and color variant. If the requested option is unavailable, the response lists available layouts and variants and suggests the closest available variant.", {
|
|
20
|
+
id: z.string().describe("Institution ID from search_institutions, e.g. 'md-age'"),
|
|
20
21
|
layout: z
|
|
21
22
|
.enum(["main", "horizontal", "vertical", "symbol"])
|
|
22
23
|
.default("main")
|
|
23
|
-
.describe("Logo layout (default: main)"),
|
|
24
|
+
.describe("Logo layout (default: main, the institution's primary logo)"),
|
|
24
25
|
variant: z
|
|
25
26
|
.enum(["color", "white", "black", "monochrome", "dark_mode"])
|
|
26
27
|
.default("color")
|
|
@@ -28,43 +29,32 @@ export function registerGetLogo(server) {
|
|
|
28
29
|
fetch_svg: z
|
|
29
30
|
.boolean()
|
|
30
31
|
.default(false)
|
|
31
|
-
.describe("
|
|
32
|
-
}, ({ id, layout, variant, fetch_svg }) => {
|
|
32
|
+
.describe("Include bundled raw SVG content when available; no network request is made"),
|
|
33
|
+
}), ({ id, layout, variant, fetch_svg }) => {
|
|
33
34
|
const inst = getById(id);
|
|
34
35
|
if (!inst) {
|
|
35
|
-
return {
|
|
36
|
-
content: [{ type: "text", text: JSON.stringify({ error: `Institution '${id}' not found.` }) }],
|
|
37
|
-
isError: true,
|
|
38
|
-
};
|
|
36
|
+
return toolResponse({ error: `Institution '${id}' not found.`, suggestion: "Search by institution name with search_institutions." }, true);
|
|
39
37
|
}
|
|
40
38
|
const group = inst.assets[layout];
|
|
41
39
|
if (!group) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
isError: true,
|
|
52
|
-
};
|
|
40
|
+
const availableLayouts = ["main", "horizontal", "vertical", "symbol"].filter((key) => typeof inst.assets[key] === "object" && inst.assets[key] !== null);
|
|
41
|
+
return toolResponse({
|
|
42
|
+
error: `Layout '${layout}' not available for '${id}'.`,
|
|
43
|
+
requestedLayout: layout,
|
|
44
|
+
availableLayouts,
|
|
45
|
+
suggestion: availableLayouts.includes("main") ? "Use layout 'main'." : "Choose one of the available layouts.",
|
|
46
|
+
}, true);
|
|
53
47
|
}
|
|
54
48
|
const localPath = assetToLocal(group[variant]);
|
|
55
49
|
if (!localPath) {
|
|
56
50
|
const available = ["color", "white", "black", "monochrome", "dark_mode"].filter((v) => group[v] != null);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
isError: true,
|
|
67
|
-
};
|
|
51
|
+
const suggestedVariant = available.includes("color") ? "color" : available[0];
|
|
52
|
+
return toolResponse({
|
|
53
|
+
error: `Variant '${variant}' not available for '${id}' '${layout}'.`,
|
|
54
|
+
requestedVariant: variant,
|
|
55
|
+
availableVariants: available,
|
|
56
|
+
...(suggestedVariant ? { suggestedVariant } : {}),
|
|
57
|
+
}, true);
|
|
68
58
|
}
|
|
69
59
|
const url = toCdnUrl(localPath);
|
|
70
60
|
let svg;
|
|
@@ -74,21 +64,17 @@ export function registerGetLogo(server) {
|
|
|
74
64
|
svg = readFileSync(fsPath, "utf-8");
|
|
75
65
|
}
|
|
76
66
|
}
|
|
77
|
-
return {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, null, 2),
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
};
|
|
67
|
+
return toolResponse({
|
|
68
|
+
url,
|
|
69
|
+
layout: group.type,
|
|
70
|
+
variant,
|
|
71
|
+
institution: inst.name,
|
|
72
|
+
institutionId: inst.id,
|
|
73
|
+
availableLayouts: ["main", "horizontal", "vertical", "symbol"].filter((key) => typeof inst.assets[key] === "object" && inst.assets[key] !== null),
|
|
74
|
+
availableVariants: ["color", "white", "black", "monochrome", "dark_mode"].filter((availableVariant) => group[availableVariant] != null),
|
|
75
|
+
...(svg !== undefined ? { svg } : {}),
|
|
76
|
+
source: "https://identitate.md/api/institutions.json",
|
|
77
|
+
});
|
|
92
78
|
});
|
|
93
79
|
}
|
|
94
80
|
//# sourceMappingURL=get-logo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-logo.js","sourceRoot":"","sources":["../../src/tools/get-logo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"get-logo.js","sourceRoot":"","sources":["../../src/tools/get-logo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,SAAS,YAAY,CAAC,KAA4B;IAChD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK,CAAC,KAAK,CAAC;AACrB,CAAC;AAED,mFAAmF;AACnF,SAAS,QAAQ,CAAC,SAAiB;IACjC,OAAO,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;QACjC,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,wBAAwB,SAAS,EAAE,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,MAAiB;IAC/C,MAAM,CAAC,YAAY,CACjB,UAAU,EACV,kBAAkB,CAChB,sBAAsB,EACtB,4MAA4M,EAC5M;QACE,EAAE,EAAE,CAAC,CAAC,MAAM,EA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,MAAM,EAAE,KAAK,CAAC,IAAI;YAClB,OAAO;YACP,WAAW,EAAE,IAAI,CAAC,IAAI;YACtB,aAAa,EAAE,IAAI,CAAC,EAAE;YACtB,gBAAgB,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,MAAM,CACnE,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,CAC3E;YACD,iBAAiB,EAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,CAAW,CAAC,MAAM,CACzF,CAAC,gBAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,IAAI,CACtD;YACD,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACrC,MAAM,EAAE,6CAA6C;SACtD,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-categories.d.ts","sourceRoot":"","sources":["../../src/tools/list-categories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"list-categories.d.ts","sourceRoot":"","sources":["../../src/tools/list-categories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAY9D"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { getCategories } from "../data.js";
|
|
2
|
+
import { readOnlyToolConfig, toolResponse } from "./tool-response.js";
|
|
2
3
|
export function registerListCategories(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
return {
|
|
6
|
-
content: [
|
|
7
|
-
{
|
|
8
|
-
type: "text",
|
|
9
|
-
text: JSON.stringify(categories, null, 2),
|
|
10
|
-
},
|
|
11
|
-
],
|
|
12
|
-
};
|
|
4
|
+
server.registerTool("list_categories", readOnlyToolConfig("List institution categories", "List the current category IDs, Romanian labels, and institution counts. Use an ID as the category filter in search_institutions.", {}), () => {
|
|
5
|
+
return toolResponse(getCategories());
|
|
13
6
|
});
|
|
14
7
|
}
|
|
15
8
|
//# sourceMappingURL=list-categories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-categories.js","sourceRoot":"","sources":["../../src/tools/list-categories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"list-categories.js","sourceRoot":"","sources":["../../src/tools/list-categories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtE,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,YAAY,CACjB,iBAAiB,EACjB,kBAAkB,CAChB,6BAA6B,EAC7B,kIAAkI,EAClI,EAAE,CACH,EACD,GAAG,EAAE;QACH,OAAO,YAAY,CAAC,aAAa,EAAE,CAAC,CAAC;IACvC,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiCpE,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAqEtD"}
|
package/dist/tools/search.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { getAll } from "../data.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { getAll, getCategories } from "../data.js";
|
|
3
|
+
import { readOnlyToolConfig, toolResponse } from "./tool-response.js";
|
|
4
|
+
/** Normalize diacritics so Romanian names work with or without accents. */
|
|
5
|
+
function normalize(value) {
|
|
6
|
+
return value
|
|
7
|
+
.trim()
|
|
6
8
|
.toLowerCase()
|
|
7
9
|
.normalize("NFD")
|
|
8
10
|
.replace(/\p{Diacritic}/gu, "");
|
|
@@ -14,66 +16,74 @@ function score(inst, query) {
|
|
|
14
16
|
const short = normalize(inst.shortname ?? "");
|
|
15
17
|
const keywords = (inst.meta.keywords ?? []).map(normalize);
|
|
16
18
|
if (id === q)
|
|
17
|
-
return 100;
|
|
19
|
+
return { score: 100, match: "exact_id" };
|
|
18
20
|
if (short === q)
|
|
19
|
-
return 80;
|
|
21
|
+
return { score: 80, match: "exact_shortname" };
|
|
20
22
|
if (id.includes(q))
|
|
21
|
-
return 70;
|
|
23
|
+
return { score: 70, match: "id" };
|
|
22
24
|
if (short.includes(q))
|
|
23
|
-
return 65;
|
|
25
|
+
return { score: 65, match: "shortname" };
|
|
24
26
|
if (name.includes(q))
|
|
25
|
-
return 50;
|
|
26
|
-
if (keywords.some((
|
|
27
|
-
return 30;
|
|
28
|
-
|
|
27
|
+
return { score: 50, match: "name" };
|
|
28
|
+
if (keywords.some((keyword) => keyword.includes(q))) {
|
|
29
|
+
return { score: 30, match: "keyword" };
|
|
30
|
+
}
|
|
31
|
+
return { score: 0, match: "none" };
|
|
29
32
|
}
|
|
30
33
|
export function registerSearch(server) {
|
|
31
|
-
server.
|
|
34
|
+
server.registerTool("search_institutions", readOnlyToolConfig("Search institutions", "Find Moldovan public institutions by name, acronym, ID, keyword, or category. Romanian diacritics are optional. Returns ranked results with the reason each result matched. Use get_institution or get_logo with a returned ID for details.", {
|
|
32
35
|
query: z
|
|
33
36
|
.string()
|
|
34
37
|
.optional()
|
|
35
|
-
.describe("Name, keyword, or partial ID
|
|
38
|
+
.describe("Name, acronym, keyword, or partial ID; diacritics are optional"),
|
|
36
39
|
category: z
|
|
37
40
|
.string()
|
|
38
41
|
.optional()
|
|
39
|
-
.describe("
|
|
42
|
+
.describe("Category ID from list_categories; may be combined with query"),
|
|
40
43
|
limit: z
|
|
41
44
|
.number()
|
|
42
45
|
.int()
|
|
43
46
|
.min(1)
|
|
44
47
|
.max(50)
|
|
45
48
|
.default(10)
|
|
46
|
-
.describe("Maximum
|
|
47
|
-
}, ({ query, category, limit }) => {
|
|
49
|
+
.describe("Maximum result count (1–50, default 10)"),
|
|
50
|
+
}), ({ query, category, limit }) => {
|
|
51
|
+
const categories = getCategories();
|
|
52
|
+
if (category && !categories.some((entry) => entry.id === category)) {
|
|
53
|
+
return toolResponse({
|
|
54
|
+
error: `Unknown category '${category}'.`,
|
|
55
|
+
availableCategories: categories,
|
|
56
|
+
}, true);
|
|
57
|
+
}
|
|
48
58
|
let institutions = getAll();
|
|
49
59
|
if (category) {
|
|
50
|
-
institutions = institutions.filter((
|
|
51
|
-
}
|
|
52
|
-
if (query) {
|
|
53
|
-
const scored = institutions
|
|
54
|
-
.map((i) => ({ inst: i, score: score(i, query) }))
|
|
55
|
-
.filter((x) => x.score > 0)
|
|
56
|
-
.sort((a, b) => b.score - a.score);
|
|
57
|
-
institutions = scored.slice(0, limit).map((x) => x.inst);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
institutions = institutions.slice(0, limit);
|
|
60
|
+
institutions = institutions.filter((institution) => institution.category === category);
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
62
|
+
const queryValue = query?.trim() ?? "";
|
|
63
|
+
const ranked = queryValue
|
|
64
|
+
? institutions
|
|
65
|
+
.map((institution) => ({ institution, ...score(institution, queryValue) }))
|
|
66
|
+
.filter((match) => match.score > 0)
|
|
67
|
+
.sort((a, b) => b.score - a.score || a.institution.name.localeCompare(b.institution.name, "ro"))
|
|
68
|
+
: institutions.map((institution) => ({ institution, score: null, match: "browse" }));
|
|
69
|
+
return toolResponse({
|
|
70
|
+
query: queryValue || null,
|
|
71
|
+
category: category ?? null,
|
|
72
|
+
total: ranked.length,
|
|
73
|
+
results: ranked.slice(0, limit).map(({ institution, score: relevance, match }) => ({
|
|
74
|
+
id: institution.id,
|
|
75
|
+
name: institution.name,
|
|
76
|
+
shortname: institution.shortname,
|
|
77
|
+
category: institution.category,
|
|
78
|
+
description: institution.description,
|
|
79
|
+
quality: institution.meta.quality ?? "unknown",
|
|
80
|
+
lastUpdated: institution.meta.last_updated,
|
|
81
|
+
match,
|
|
82
|
+
relevance,
|
|
83
|
+
catalogUrl: `https://identitate.md/catalog/${institution.slug}`,
|
|
84
|
+
mainLogoUrl: resolveMainLogoUrl(institution),
|
|
85
|
+
})),
|
|
86
|
+
});
|
|
77
87
|
});
|
|
78
88
|
}
|
|
79
89
|
function resolveMainLogoUrl(inst) {
|
|
@@ -85,6 +95,6 @@ function resolveMainLogoUrl(inst) {
|
|
|
85
95
|
: null;
|
|
86
96
|
if (!path)
|
|
87
97
|
return null;
|
|
88
|
-
return `https://identitate.md${path}`;
|
|
98
|
+
return path.startsWith("http") ? path : `https://identitate.md${path}`;
|
|
89
99
|
}
|
|
90
100
|
//# sourceMappingURL=search.js.map
|
package/dist/tools/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAA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
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const toolOutputSchema: {
|
|
3
|
+
result: z.ZodUnknown;
|
|
4
|
+
catalog: z.ZodObject<{
|
|
5
|
+
schemaVersion: z.ZodString;
|
|
6
|
+
generatedAt: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
schemaVersion: string;
|
|
9
|
+
generatedAt: string;
|
|
10
|
+
}, {
|
|
11
|
+
schemaVersion: string;
|
|
12
|
+
generatedAt: string;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export declare function readOnlyToolConfig(title: string, description: string, inputSchema: Record<string, z.ZodTypeAny>): {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
inputSchema: Record<string, z.ZodTypeAny>;
|
|
19
|
+
outputSchema: {
|
|
20
|
+
result: z.ZodUnknown;
|
|
21
|
+
catalog: z.ZodObject<{
|
|
22
|
+
schemaVersion: z.ZodString;
|
|
23
|
+
generatedAt: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
schemaVersion: string;
|
|
26
|
+
generatedAt: string;
|
|
27
|
+
}, {
|
|
28
|
+
schemaVersion: string;
|
|
29
|
+
generatedAt: string;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
annotations: {
|
|
33
|
+
readOnlyHint: boolean;
|
|
34
|
+
destructiveHint: boolean;
|
|
35
|
+
idempotentHint: boolean;
|
|
36
|
+
openWorldHint: boolean;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare function toolResponse(result: unknown, isError?: boolean): {
|
|
40
|
+
isError?: boolean | undefined;
|
|
41
|
+
content: {
|
|
42
|
+
type: "text";
|
|
43
|
+
text: string;
|
|
44
|
+
}[];
|
|
45
|
+
structuredContent: {
|
|
46
|
+
result: unknown;
|
|
47
|
+
catalog: {
|
|
48
|
+
schemaVersion: string;
|
|
49
|
+
generatedAt: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=tool-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-response.d.ts","sourceRoot":"","sources":["../../src/tools/tool-response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;CAM5B,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;EAc1C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,UAAQ;;;;;;;;;;;;;EAe5D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getIndex } from "../data.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const toolOutputSchema = {
|
|
4
|
+
result: z.unknown(),
|
|
5
|
+
catalog: z.object({
|
|
6
|
+
schemaVersion: z.string(),
|
|
7
|
+
generatedAt: z.string(),
|
|
8
|
+
}),
|
|
9
|
+
};
|
|
10
|
+
export function readOnlyToolConfig(title, description, inputSchema) {
|
|
11
|
+
return {
|
|
12
|
+
title,
|
|
13
|
+
description,
|
|
14
|
+
inputSchema,
|
|
15
|
+
outputSchema: toolOutputSchema,
|
|
16
|
+
annotations: {
|
|
17
|
+
readOnlyHint: true,
|
|
18
|
+
destructiveHint: false,
|
|
19
|
+
idempotentHint: true,
|
|
20
|
+
openWorldHint: false,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function toolResponse(result, isError = false) {
|
|
25
|
+
const index = getIndex();
|
|
26
|
+
const output = {
|
|
27
|
+
result,
|
|
28
|
+
catalog: {
|
|
29
|
+
schemaVersion: index.schemaVersion,
|
|
30
|
+
generatedAt: index.generatedAt,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
content: [{ type: "text", text: JSON.stringify(output, null, 2) }],
|
|
35
|
+
structuredContent: output,
|
|
36
|
+
...(isError ? { isError: true } : {}),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=tool-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-response.js","sourceRoot":"","sources":["../../src/tools/tool-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;QACzB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;KACxB,CAAC;CACH,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAChC,KAAa,EACb,WAAmB,EACnB,WAAyC;IAEzC,OAAO;QACL,KAAK;QACL,WAAW;QACX,WAAW;QACX,YAAY,EAAE,gBAAgB;QAC9B,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAe,EAAE,OAAO,GAAG,KAAK;IAC3D,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG;QACb,MAAM;QACN,OAAO,EAAE;YACP,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B;KACF,CAAC;IAEF,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QAC3E,iBAAiB,EAAE,MAAM;QACzB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtC,CAAC;AACJ,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,118 +1,2 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export type LogoColorVariant = "color" | "dark_mode" | "white" | "black" | "monochrome";
|
|
3
|
-
export type LogoLayout = "horizontal" | "vertical" | "symbol";
|
|
4
|
-
export type ColorUsage = "primary" | "secondary" | "accent" | "neutral";
|
|
5
|
-
export interface Location {
|
|
6
|
-
country_code: string;
|
|
7
|
-
county?: string;
|
|
8
|
-
city?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface Color {
|
|
11
|
-
name: string;
|
|
12
|
-
hex: string;
|
|
13
|
-
rgb?: [number, number, number];
|
|
14
|
-
cmyk?: [number, number, number, number];
|
|
15
|
-
pantone?: string;
|
|
16
|
-
usage?: ColorUsage;
|
|
17
|
-
}
|
|
18
|
-
export interface Typography {
|
|
19
|
-
primary: {
|
|
20
|
-
family: string;
|
|
21
|
-
url?: string;
|
|
22
|
-
weights?: number[];
|
|
23
|
-
};
|
|
24
|
-
secondary?: {
|
|
25
|
-
family: string;
|
|
26
|
-
url?: string;
|
|
27
|
-
weights?: number[];
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export type AssetUrls = string | {
|
|
31
|
-
cdn_primary?: string;
|
|
32
|
-
cdn_fallback?: string;
|
|
33
|
-
local: string;
|
|
34
|
-
};
|
|
35
|
-
export interface LogoAssetGroup {
|
|
36
|
-
type: LogoLayout;
|
|
37
|
-
color?: AssetUrls;
|
|
38
|
-
dark_mode?: AssetUrls;
|
|
39
|
-
white?: AssetUrls;
|
|
40
|
-
black?: AssetUrls;
|
|
41
|
-
monochrome?: AssetUrls;
|
|
42
|
-
alternatives?: Array<{
|
|
43
|
-
label: string;
|
|
44
|
-
path: AssetUrls;
|
|
45
|
-
preview?: "checkerboard" | "dark";
|
|
46
|
-
}>;
|
|
47
|
-
png?: {
|
|
48
|
-
path: AssetUrls;
|
|
49
|
-
width: number;
|
|
50
|
-
height: number;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export interface Assets {
|
|
54
|
-
main: LogoAssetGroup;
|
|
55
|
-
horizontal?: LogoAssetGroup;
|
|
56
|
-
vertical?: LogoAssetGroup;
|
|
57
|
-
symbol?: LogoAssetGroup;
|
|
58
|
-
favicon?: string;
|
|
59
|
-
[key: string]: LogoAssetGroup | string | undefined;
|
|
60
|
-
}
|
|
61
|
-
export interface Resources {
|
|
62
|
-
website?: string;
|
|
63
|
-
branding_manual?: string;
|
|
64
|
-
contact?: {
|
|
65
|
-
phone?: string;
|
|
66
|
-
email?: string;
|
|
67
|
-
};
|
|
68
|
-
social_media?: {
|
|
69
|
-
facebook?: string;
|
|
70
|
-
twitter?: string;
|
|
71
|
-
linkedin?: string;
|
|
72
|
-
instagram?: string;
|
|
73
|
-
youtube?: string;
|
|
74
|
-
};
|
|
75
|
-
wikidata_id?: string;
|
|
76
|
-
wikipedia_url?: string;
|
|
77
|
-
}
|
|
78
|
-
export interface Meta {
|
|
79
|
-
version: string;
|
|
80
|
-
last_updated: string;
|
|
81
|
-
keywords: string[];
|
|
82
|
-
quality?: "verified" | "community" | "draft";
|
|
83
|
-
seo_title?: string;
|
|
84
|
-
seo_description?: string;
|
|
85
|
-
}
|
|
86
|
-
export interface Institution {
|
|
87
|
-
id: string;
|
|
88
|
-
slug: string;
|
|
89
|
-
name: string;
|
|
90
|
-
shortname?: string;
|
|
91
|
-
category: InstitutionCategory;
|
|
92
|
-
meta: Meta;
|
|
93
|
-
location?: Location;
|
|
94
|
-
description?: string;
|
|
95
|
-
usage_notes?: string;
|
|
96
|
-
colors?: Color[];
|
|
97
|
-
typography?: Typography;
|
|
98
|
-
assets: Assets;
|
|
99
|
-
resources?: Resources;
|
|
100
|
-
}
|
|
101
|
-
export interface CategoryEntry {
|
|
102
|
-
id: string;
|
|
103
|
-
label: string;
|
|
104
|
-
count: number;
|
|
105
|
-
}
|
|
106
|
-
export interface InstitutionsIndex {
|
|
107
|
-
schemaVersion: string;
|
|
108
|
-
generatedAt: string;
|
|
109
|
-
total: number;
|
|
110
|
-
stats: {
|
|
111
|
-
byCategory: Record<string, number>;
|
|
112
|
-
withManual: number;
|
|
113
|
-
withSvg: number;
|
|
114
|
-
};
|
|
115
|
-
categories: CategoryEntry[];
|
|
116
|
-
institutions: Institution[];
|
|
117
|
-
}
|
|
1
|
+
export type * from "../../schema/institution.js";
|
|
118
2
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,mBAAmB,6BAA6B,CAAC"}
|
package/dist/types.js
CHANGED
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@identitate-md/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"mcpName": "io.github.ZLDR/identitate-md",
|
|
4
5
|
"description": "MCP server for IdentitateMD — query Moldovan government institution logos and brand colors from AI coding assistants",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"author": "IdentitateMD Contributors",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/
|
|
10
|
+
"url": "https://github.com/ZLDR/IdentitateMD",
|
|
10
11
|
"directory": "packages/mcp"
|
|
11
12
|
},
|
|
12
13
|
"homepage": "https://identitate.md",
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"prepublishOnly": "npm run build"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"@identitate-md/logos": "^1.
|
|
41
|
+
"@identitate-md/logos": "^1.5.5",
|
|
41
42
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
42
43
|
"zod": "^3.25.76"
|
|
43
44
|
},
|