Skip to content

Commit 2e88862

Browse files
committed
feat: upgrade compare_tools, get_leaderboard, list_categories with BEHAVIOR+GUIDELINES+EXAMPLES
1 parent 863515a commit 2e88862

1 file changed

Lines changed: 39 additions & 4 deletions

File tree

index.js

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function track(tool, params, status = 'ok', ms = null, error = null) {
118118
try {
119119
fetch(TRACK_URL, {
120120
method: 'POST',
121-
headers: { 'Content-Type': 'application/json', 'User-Agent': 'comparedge-mcp/2.5.6' },
121+
headers: { 'Content-Type': 'application/json', 'User-Agent': 'comparedge-mcp/2.5.8' },
122122
body: JSON.stringify({ tool, params, status, ms, error }),
123123
}).catch(() => {});
124124
} catch {}
@@ -201,7 +201,19 @@ const TOOL_DEFINITIONS = [
201201
},
202202
{
203203
name: 'compare_tools',
204-
description: 'Side-by-side structured comparison of two software products. Returns pricing, features, ratings, and key differences.',
204+
description: [
205+
'Side-by-side structured comparison of two software products. Returns pricing, features, ratings, and key differences for each tool.',
206+
'',
207+
'BEHAVIOR: Fetches full profiles for both tools and presents them in a parallel structure. Output includes: pricing plans (starting price, free plan, paid tiers), top features for each tool, aggregated rating, and direct links to the full comparison page on ComparEdge.',
208+
'',
209+
'USAGE GUIDELINES:',
210+
'- Use when the user asks "X vs Y", "compare X and Y", "which is better, X or Y?", or "what is the difference between X and Y?".',
211+
'- Use get_pricing separately if the user needs full plan-level details beyond the starting price summary.',
212+
'- Use get_alternatives if the user does not have a specific second tool in mind.',
213+
'- Slugs must be exact. Use search_tools first if unsure.',
214+
'',
215+
"EXAMPLE QUERIES: \"Compare Notion vs Linear\", \"Slack vs Teams - which is cheaper?\", \"What is the difference between Jira and Asana?\", \"HubSpot vs Salesforce pricing\"",
216+
].join('\n'),
205217
inputSchema: {
206218
type: 'object',
207219
properties: {
@@ -276,7 +288,19 @@ const TOOL_DEFINITIONS = [
276288
},
277289
{
278290
name: 'get_leaderboard',
279-
description: 'Get top-rated software tools by category, ranked by aggregated G2 and Capterra scores.',
291+
description: [
292+
'Get top-rated software tools by category, ranked by aggregated G2 and Capterra scores. Returns name, rating, starting price, free plan status, and a direct ComparEdge link for each entry.',
293+
'',
294+
'BEHAVIOR: Pulls verified ratings aggregated from G2 and Capterra for tools in the requested category (or all categories), ranks them by score descending, and returns the top N results. Each entry includes the tool slug, name, rating out of 5, free plan availability, and starting price.',
295+
'',
296+
'USAGE GUIDELINES:',
297+
'- Use when the user asks "what is the best X tool?", "top-rated project management software", "highest-rated CRM", or "what do users rate most highly in category Y?".',
298+
'- Use list_categories first to find the correct category slug if unsure.',
299+
'- Use list_category instead when the user wants to see ALL tools in a category, not just the top N.',
300+
'- Combine with get_pricing to get full plan details for any tool in the results.',
301+
'',
302+
"EXAMPLE QUERIES: \"What is the best CRM tool?\", \"Top-rated AI coding assistants\", \"Highest-rated project management tools\", \"Best security tools overall\"",
303+
].join('\n'),
280304
inputSchema: {
281305
type: 'object',
282306
properties: {
@@ -287,7 +311,18 @@ const TOOL_DEFINITIONS = [
287311
},
288312
{
289313
name: 'list_categories',
290-
description: 'List all 44 supported software categories with their slugs and display names.',
314+
description: [
315+
'List all 44 supported software categories with their slugs and display names.',
316+
'',
317+
'BEHAVIOR: Returns a complete index of every category available in the ComparEdge database. Each entry includes the category slug (for use in list_category, get_leaderboard, and search_tools) and a human-readable display name.',
318+
'',
319+
'USAGE GUIDELINES:',
320+
'- Use this tool first when you are unsure of the correct category slug before calling list_category or get_leaderboard.',
321+
'- Use to help the user browse what types of software are covered.',
322+
'- No parameters required.',
323+
'',
324+
"EXAMPLE QUERIES: \"What categories of software does ComparEdge cover?\", \"What SaaS categories are available?\", \"I want to find CRM tools - what is the slug?\", \"Show me all software categories\"",
325+
].join('\n'),
291326
inputSchema: {
292327
type: 'object',
293328
properties: {},

0 commit comments

Comments
 (0)