Skip to content

Improve LLM/IDE integration with clearer tool selection guidance#32

Merged
oscarvalenzuelab merged 2 commits intomainfrom
feature/improve-llm-ide-integration
Nov 19, 2025
Merged

Improve LLM/IDE integration with clearer tool selection guidance#32
oscarvalenzuelab merged 2 commits intomainfrom
feature/improve-llm-ide-integration

Conversation

@oscarvalenzuelab
Copy link
Contributor

Summary

Enhances MCP server instructions to improve recognition and usability in LLM-powered development environments (Cursor, Windsurf, etc.).

Problem

When users asked LLM-powered IDEs to "do compliance for this project", the LLM would often:

  • Not recognize that mcp-semclone handles compliance tasks
  • Attempt to install external tools (npm install license-checker, pip install scancode-toolkit)
  • Struggle to select the correct tool from the 14 available options

Root causes:

  • No explicit trigger keywords linking compliance terminology to mcp-semclone
  • 384-line instruction block potentially exceeded LLM processing windows
  • Tool selection required reading through multiple detailed docstrings
  • No clear decision tree for common use cases

Solution

1. Added Trigger Keywords (Lines 40-48)

Explicit keywords that help LLMs recognize when to use this server:

  • "compliance", "license compliance", "do compliance"
  • "SBOM", "software bill of materials", "supply chain security"
  • "can I ship this?", "license compatibility"
  • "mobile app compliance", "SaaS compliance"

2. Added Decision Tree (Lines 50-76)

Clear IF-THEN logic for tool selection:

IF user says "do compliance" → run_compliance_check()
IF source code directory → scan_directory()
IF package archive → check_package()
IF binary → scan_binary()
IF "can I use [license]?" → validate_policy()

3. Condensed Instructions (384 → 175 lines)

Reduced instruction block by ~55% while maintaining critical information:

  • Kept: Anti-patterns, key workflows, tool descriptions, constraints
  • Condensed: License interpretation, binary scanning, common workflows
  • Removed: Verbose examples, redundant explanations
  • Added references to detailed docstrings for deep dives

Changes

  • -348 lines / +174 lines in mcp_semclone/server.py
  • No functional changes - purely documentation improvements
  • All tool implementations remain unchanged

Testing

To verify improvements, test with LLM-powered IDEs:

  1. "Do compliance for this project" → Should use run_compliance_check()
  2. "Can I ship this with GPL to App Store?" → Should use validate_policy()
  3. "Generate SBOM" → Should use generate_sbom()

Expected: LLM immediately recognizes these as mcp-semclone tasks instead of attempting external tool installation.

Impact

  • Faster tool recognition for compliance queries
  • Reduced hallucination/incorrect tool selection
  • Better first-time user experience in LLM IDEs
  • Clearer guidance on tool selection without reading full docs

Enhanced MCP server instructions to improve recognition and tool selection
in LLM-powered IDEs (Cursor, Windsurf, etc):

- Added explicit trigger keywords for compliance-related queries
- Added decision tree for tool selection at top of instructions
- Condensed main instructions from ~384 to ~175 lines for better processing
- Removed verbose examples (kept references to detailed docstrings)
- Improved clarity on when to use each tool

This addresses issues where LLMs attempt to install external tools instead
of recognizing built-in mcp-semclone capabilities for compliance tasks.

Changes:
- Trigger keywords: "compliance", "SBOM", "license scanning", etc.
- Decision tree: Clear IF-THEN logic for tool selection
- Condensed sections: License interpretation, binary scanning, workflows
- Maintained critical information: Anti-patterns, key workflows, constraints
- Updated version in pyproject.toml
- Updated __version__ in mcp_semclone/__init__.py
- Added CHANGELOG entry for v1.6.2 with LLM/IDE integration improvements
@oscarvalenzuelab oscarvalenzuelab merged commit 38bdade into main Nov 19, 2025
2 checks passed
@oscarvalenzuelab oscarvalenzuelab deleted the feature/improve-llm-ide-integration branch November 19, 2025 07:33
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