Skip to content

Improve MCP search with synonym map and better fallback guidance#30

Merged
kyleamueller merged 1 commit intomainfrom
claude/mcp-search-improvements
Mar 9, 2026
Merged

Improve MCP search with synonym map and better fallback guidance#30
kyleamueller merged 1 commit intomainfrom
claude/mcp-search-improvements

Conversation

@kyleamueller
Copy link
Owner

Summary

  • Adds src/data/search-synonyms.ts with 70+ term mappings so LLMs can find M functions using Excel/SQL/DAX vocabulary
  • search_functions now matches queries like "vlookup", "concatenate", "null coalesce", "group by", "missing value", "sql where", etc.
  • Updates search_functions tool description to explain synonym support and suggest fallbacks
  • No-results message now tells the caller to try search_concepts or search_patterns

Before / After

Query Before After
"null coalesce default" No results Table.FillDown, List.RemoveNulls, List.ReplaceValue
"vlookup" No results Table.NestedJoin, Table.Join
"concatenate" No results Text.Combine
"group by" No results Table.Group
"sql where" No results Table.SelectRows

Test plan

  • npm run test passes (42 tests, includes new keyword synonym test)
  • Deploy to Vercel and verify queries above return results via the live MCP endpoint

🤖 Generated with Claude Code

- Add search-synonyms.ts mapping 70+ Excel/SQL/DAX terms to M function slugs
  (e.g. "vlookup" → join functions, "concatenate" → Text.Combine,
  "null coalesce" → null-handling functions, "group by" → Table.Group)
- Add keywords field to FunctionIndexEntry and buildSearchIndex
- Add keywords as a Fuse.js search key (weight 0.8, between title and description)
- Update search_functions tool description to explain synonym support
- Update no-results message to suggest search_concepts / search_patterns fallback
- Add search test verifying keyword synonyms surface correct results

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pqm-guide Building Building Preview, Comment Mar 9, 2026 3:35am

@kyleamueller kyleamueller merged commit fa37851 into main Mar 9, 2026
2 of 3 checks passed
@kyleamueller kyleamueller deleted the claude/mcp-search-improvements branch March 9, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant