Skip to main content
Glama

recommend_strategy

Analyze tasks to recommend optimal reasoning frameworks for AI agents, selecting from 40 distinct strategies based on task complexity and category.

Instructions

Analyze a task and recommend the optimal reasoning framework.

Returns the detected category, complexity_score, recommended framework, and alternative options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesThe task or question to analyze
contextNoAdditional context about the task

Implementation Reference

  • Implementation of the recommend_strategy MCP tool in src/promptcore/main.py. It takes a task and context, uses the selector dependency to analyze them, and returns a dictionary with the recommended framework, complexity, and other analysis details.
    @mcp.tool()
    def recommend_strategy(
        task: Annotated[str, "The task or question to analyze"],
        context: Annotated[str, "Additional context about the task"] = "",
    ) -> dict:
        """
        Analyze a task and recommend the optimal reasoning framework.
        
        Returns the detected category, complexity_score, recommended framework,
        and alternative options.
        """
        deps = get_dependencies()
        analysis = deps.selector.analyze(task, context)
        
        return {
            "category": analysis.category.value,
            "complexity": {
                "score": analysis.complexity_score,
                "level": analysis.complexity_level.value,
            },
            "recommended_framework": analysis.recommended_framework,
            "reasoning": analysis.reasoning,
            "alternatives": analysis.alternative_frameworks,
        }

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/BlinkVoid/PromptSmith'

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