Skip to content

Commit e6dac20

Browse files
committed
merge release/1.1.0 into main
2 parents d54f41e + c061a08 commit e6dac20

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"remix-icon": {
3939
"type": "stdio",
4040
"command": "npx",
41-
"args": ["-y", "RemixIcon-MCP"]
41+
"args": ["-y", "remixicon-mcp"]
4242
}
4343
}
4444
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "remixicon-mcp",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Lightweight MCP server that maps icon keywords to Remix Icon metadata.",
55
"main": "src/index.ts",
66
"repository": {

src/infrastructure/search/flexsearch-icon-search.repository.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ export class FlexSearchIconSearchRepository implements IconSearchRepository {
186186
if (b.score !== a.score) {
187187
return b.score - a.score;
188188
}
189+
// Prefer shorter names (heuristic for specificity)
190+
if (a.icon.name.length !== b.icon.name.length) {
191+
return a.icon.name.length - b.icon.name.length;
192+
}
189193
return a.icon.name.localeCompare(b.icon.name);
190194
});
191195
}

src/interface/mcp/icon-keyword-server.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function startMcpServer(): Promise<void> {
2929
{
3030
title: "Search Remix Icons by keyword",
3131
description:
32-
"Search Remix Icon metadata using comma-separated keywords (up to 20 keywords). Returns top 5 most relevant icons. Supports both single keywords and keyword lists. Avoid natural language sentences.",
32+
"Search Remix Icon metadata using comma-separated keywords (up to 20 keywords). Returns top 5 most relevant icons. Supports both single keywords and keyword lists. Avoid natural language sentences. Returns format: 'icon-name (score)'. Example: 'sun-fill (46.00)'.",
3333
inputSchema: {
3434
keywords: keywordsSchema.describe(
3535
"Comma-separated keywords to search for icons (e.g., 'summer, sun, beach')",
@@ -71,14 +71,9 @@ function buildToolResponse(result: SearchIconsResponse) {
7171

7272
// Add icon list for multiple matches
7373
if (result.matches.length > 1) {
74-
lines.push("Top icon candidates:");
7574
for (const match of result.matches) {
76-
lines.push(
77-
`- ${match.icon.name} (score ${match.score.toFixed(2)})`,
78-
);
75+
lines.push(`${match.icon.name} (${match.score.toFixed(2)})`);
7976
}
80-
lines.push("");
81-
lines.push("Select the most suitable icon.");
8277
} else if (result.matches.length === 1) {
8378
// Single match is already handled by guidance
8479
}
@@ -94,14 +89,6 @@ function buildToolResponse(result: SearchIconsResponse) {
9489
guidance: result.guidance,
9590
matches: result.matches.map((match) => ({
9691
name: match.icon.name,
97-
path: match.icon.path,
98-
category: match.icon.category,
99-
style: match.icon.style,
100-
usage: match.icon.usage,
101-
baseName: match.icon.baseName,
102-
tags: match.icon.tags,
103-
score: match.score,
104-
matchedTokens: match.matchedTokens,
10592
})),
10693
},
10794
};

0 commit comments

Comments
 (0)