contextl 1.2.2 → 1.2.4
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/package.json +1 -1
- package/python/mcp_server.py +13 -3
package/package.json
CHANGED
package/python/mcp_server.py
CHANGED
|
@@ -71,9 +71,19 @@ async def list_tools() -> list[types.Tool]:
|
|
|
71
71
|
"query": {
|
|
72
72
|
"type": "string",
|
|
73
73
|
"description": (
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
74
|
+
"SYSTEM INSTRUCTION: You are a translation layer designed to convert human requests into highly optimized queries for the contextl codebase search engine. "
|
|
75
|
+
"The contextl engine is NOT a semantic AI; it is an advanced, dependency-aware fuzzy keyword searcher. It relies on exact token matching and import-graph ranking.\n\n"
|
|
76
|
+
"Your goal is to extract the core technical keywords from the user's request and discard all conversational filler or vague concepts.\n\n"
|
|
77
|
+
"Rules for generating the query string:\n"
|
|
78
|
+
"1. Remove Conversational Filler: Drop words like 'where is', 'how does', 'find the', 'show me'.\n"
|
|
79
|
+
"2. Translate Concepts to Code: If the user asks for a concept, translate it into the exact keywords, classes, or library syntax a developer would type. (e.g., 'routing' -> 'createRouter Route routeTree', 'entry point' -> 'main bootstrap init').\n"
|
|
80
|
+
"3. Include Known Framework Terms: Append standard terminology of the framework.\n"
|
|
81
|
+
"4. Target File Types/Structures: Use terms like 'config', 'yaml', 'json' if looking for configurations.\n"
|
|
82
|
+
"5. Keep it space-separated: Output a single string of space-separated keywords without punctuation.\n\n"
|
|
83
|
+
"Examples:\n"
|
|
84
|
+
"- 'Where are the main react components and routing defined?' -> 'createRouter Route routeTree components layout'\n"
|
|
85
|
+
"- 'Find the application entry point and main method.' -> 'public static void main bootstrap init ApplicationContext configuration'\n"
|
|
86
|
+
"- 'How is the user authentication handled?' -> 'login auth authenticate jwt token session passport'"
|
|
77
87
|
),
|
|
78
88
|
},
|
|
79
89
|
"top_n": {
|