tool_classify_research_intent
Analyze queries to identify research goals like quick answers, deep research, or documentation, providing confidence scores for each intent classification.
Instructions
Classify the research intent of a query.
Analyzes a query to determine the user's research goal (quick answer, deep research, documentation, comparison, discovery, or monitoring). Returns confidence scores for each detected intent.
Args: query: Research question or task description.
Returns: Dictionary with primary and secondary intents with confidence scores.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- src/devlens/server.py:203-237 (handler)Tool handler definition for classify_research_intent, which uses the classify_intent helper function to categorize the user's research intent.
@mcp.tool() def tool_classify_research_intent(query: str) -> dict: """Classify the research intent of a query. Analyzes a query to determine the user's research goal (quick answer, deep research, documentation, comparison, discovery, or monitoring). Returns confidence scores for each detected intent. Args: query: Research question or task description. Returns: Dictionary with primary and secondary intents with confidence scores. """ intent_scores = classify_intent(query) return { "primary_intent": { "type": intent_scores[0].intent.value, "confidence": intent_scores[0].confidence, "reasons": intent_scores[0].reasons, "keywords": intent_scores[0].keywords_matched, }, "secondary_intents": [ { "type": score.intent.value, "confidence": score.confidence, "reasons": score.reasons, "keywords": score.keywords_matched, } for score in intent_scores[1:3] ] if len(intent_scores) > 1 else [], }