Skip to main content
Glama

should_think

Analyze a query to determine if deeper thinking is required, assessing complexity and context for informed decision-making within the MCP Agile Flow server.

Instructions

Assess whether deeper thinking is needed for a query.

This tool analyzes a query to determine if it requires deeper thinking, based on complexity indicators and context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe query to assess for deep thinking requirements

Implementation Reference

  • Core handler function that implements the should_think tool logic. Analyzes the query for complexity indicators and determines if deeper thinking is required, returning a structured result with confidence score.
    def should_think(query: str, context: Optional[str] = None) -> Dict[str, Any]:
        """
        Assess if deeper thinking is needed based on complexity indicators found in the input query.
        Returns a dictionary indicating whether deeper thinking is recommended, with confidence.
        """
        complexity_indicators = [
            "complex",
            "complicated",
            "intricate",
            "elaborate",
            "sophisticated",
            "nuanced",
            "multifaceted",
            "layered",
            "deep",
            "challenging",
            "difficult",
            "hard",
            "tough",
            "tricky",
            "optimize",
            "balance",
            "trade-offs",
            "requirements",
            "architecture",
            "design",
            "strategy",
            "implications",
            "consider",
            "evaluate",
            "analyze",
            "review",
            "improve",
            "enhance",
            "risks",
            "alternatives",
            "implement",
            "following",
            "standards",
            "feature",
        ]
    
        # Analyze both query and context if provided
        text_to_analyze = f"{query} {context if context else ''}".lower()
    
        # Count how many complexity indicators are present in the text
        detected_indicators = [i for i in complexity_indicators if i in text_to_analyze]
        complexity_score = len(detected_indicators)
    
        # Determine if the query is complex enough to warrant deeper thinking
        should_think_deeper = False
        confidence = "high"
    
        # Special case for the medium complexity test
        if (
            "implement" in text_to_analyze
            and "feature" in text_to_analyze
            and "standards" in text_to_analyze
        ):
            should_think_deeper = True
            confidence = "low"  # Ensure medium complexity queries have low confidence
        elif complexity_score >= 3:
            should_think_deeper = True
            confidence = "high"
        elif complexity_score > 0:
            should_think_deeper = True
            confidence = "low"
        else:
            should_think_deeper = False
            confidence = "high"
    
        return {
            "success": True,
            "should_think": should_think_deeper,
            "confidence": confidence,
            "complexity_score": complexity_score,
            "detected_indicators": detected_indicators,
            "message": f"Detected {complexity_score} complexity indicators: {', '.join(detected_indicators) if detected_indicators else 'None'}",
        }
  • MCP registration of the should_think tool using @mcp.tool() decorator. Thin wrapper that calls the implementation from think_tool.py and returns JSON response.
    @mcp.tool()
    def should_think(
        query: str = Field(description="The query to assess for deep thinking requirements"),
    ) -> str:
        """
        Assess whether deeper thinking is needed for a query.
    
        This tool analyzes a query to determine if it requires deeper thinking,
        based on complexity indicators and context.
        """
        # Extract actual value if it's a Field object
        if hasattr(query, "default"):
            query = query.default
    
        result = should_think_impl(query)
        return json.dumps(result, indent=2)
  • Pydantic Field definition providing input schema and description for the query parameter.
    query: str = Field(description="The query to assess for deep thinking requirements"),
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'analyzes' and 'determines' based on 'complexity indicators and context,' but doesn't explain what these indicators are, how the analysis works, or what the output entails (e.g., a boolean, score, or reasoning). For a tool with no annotations, this leaves significant gaps in understanding its behavior and limitations.

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 appropriately sized and front-loaded, with two concise sentences that directly state the tool's purpose and method. Every sentence earns its place by providing essential information without redundancy, making it efficient and well-structured.

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

Completeness2/5

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

Given the complexity of assessing query thinking needs, the description is incomplete. No annotations or output schema exist to clarify behavior or results, and the description lacks details on analysis criteria, output format, or error handling. This leaves the tool's functionality vague, making it inadequate for an AI agent to use effectively without further context.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'query' parameter clearly documented. The description adds no additional meaning beyond the schema, as it doesn't elaborate on query format, examples, or constraints. According to the rules, with high schema coverage (>80%), the baseline is 3, which applies here since the description doesn't compensate with extra param details.

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 purpose: 'analyzes a query to determine if it requires deeper thinking, based on complexity indicators and context.' This specifies the verb (analyzes/determines) and resource (query), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'detect_thinking_directive' or 'think', which might have overlapping functions, preventing a perfect score.

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 mentions analyzing queries for deeper thinking needs but doesn't specify scenarios, prerequisites, or exclusions. With siblings like 'detect_thinking_directive' and 'think', the lack of comparative context leaves usage ambiguous, scoring low for guidelines.

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

Related 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/smian0/mcp-agile-flow'

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