Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 [],
        }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool 'analyzes a query' and 'returns confidence scores,' but lacks details on how analysis works (e.g., model-based, rules-based), performance characteristics (e.g., latency, accuracy), or limitations (e.g., query length constraints, language support). It doesn't address potential side effects, authentication needs, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and concise, with zero wasted words. It starts with a clear purpose statement, elaborates on functionality in a second sentence, and uses bullet-like sections for Args and Returns. Every sentence adds value, and the information is front-loaded for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (intent classification), no annotations, and an output schema (implied by 'Returns' section), the description is reasonably complete. It covers purpose, input semantics, and output format. However, it lacks behavioral details (e.g., how classification works) and usage guidelines, which would enhance completeness for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful context for the single parameter 'query,' explaining it as a 'Research question or task description.' This clarifies the parameter's purpose beyond the schema's basic type definition (string). With 0% schema description coverage and only one parameter, the description adequately compensates by providing semantic information, though it could specify format expectations (e.g., natural language, keywords).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Classify the research intent of a query' and specifies it analyzes queries to determine research goals (quick answer, deep research, etc.). It distinguishes from siblings like tool_search_web or tool_summarize_page by focusing on intent classification rather than information retrieval or processing. However, it doesn't explicitly contrast with all siblings (e.g., tool_compare_sources might also involve intent analysis).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or compare with sibling tools like tool_deep_dive (which might handle 'deep research' intent) or tool_monitor_changes (which might handle 'monitoring' intent). Usage is implied only through the tool's name and purpose statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Y4NN777/devlens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server