Promptheus
AI-powered prompt refinement with adaptive questioning and multi-provider support (6+ LLM backends)
Versions
0.3.1latestTools 5
refine_prompt Refine a user prompt using AI-powered prompt engineering. Use the AskUserQuestion tool to clarify requirements when this tool returns type="clarification_needed". The response includes formatted questions ready to pass to AskUserQuestion. Workflow: 1. Call refine_prompt with just the prompt parameter 2. If response type is "clarification_needed": - Use the AskUserQuestion tool with the questions from "questions_for_ask_user_question" - Map the user's answers to question IDs (q0, q1, q2, etc.) - Call refine_prompt again with both prompt and answers dict 3. If response type is "refined": - If user asked to "execute" or "run" the prompt, use the refined prompt with your native capabilities to generate content - Otherwise, present the refined prompt to the user for review - Note: Promptheus only refines prompts, it does not execute them Args: prompt: The initial prompt to refine. answers: Optional dictionary mapping question IDs to answers. answer_mapping: Optional dictionary mapping question IDs to original question text. Recommended when providing answers. provider: Override provider (e.g. 'google'). model: Override model name. Returns: One of: - {"type": "refined", "prompt": "..."} - Success - {"type": "clarification_needed", "questions_for_ask_user_question": [...], ...} - Need answers - {"type": "error", "error_type": "...", "message": "..."} - Error Examples: # Simple refinement result = refine_prompt("Write a blog post about AI") # May return refined prompt or request clarification # With clarification result1 = refine_prompt("Write a blog post") # Returns: {"type": "clarification_needed", ...} # Then use AskUserQuestion and: result2 = refine_prompt( "Write a blog post", answers={"q0": "Technical audience", "q1": "Professional tone"} ) # Returns: {"type": "refined", "prompt": "..."}
tweak_prompt Make a specific modification to an existing prompt. This tool applies surgical edits to prompts without changing their core intent. Use this when you have a refined prompt and want to make targeted adjustments. Args: prompt: The current prompt to modify. modification: Description of what to change (e.g. "make it shorter"). provider: Override provider. model: Override model name. Returns: {"type": "refined", "prompt": "..."} - Modified prompt {"type": "error", ...} - If modification fails Examples: tweak_prompt( prompt="Write a technical blog post about Docker", modification="make it more beginner-friendly" )
list_models List available models from configured AI providers. Shows which models are available for each provider you have API keys for. Useful for discovering new models or checking model availability. Args: providers: List of provider names to query (e.g. ["google"]). Queries all if not specified. limit: Max models per provider (default: 20). include_nontext: Include non-text models (default: False). Returns: { "type": "success", "providers": { "google": { "available": true, "models": [{"id": "...", "name": "..."}], "total_count": 15, "showing": 10 }, ... } } Examples: list_models() # All providers, text models only list_models(providers=["google", "openai"], limit=10) list_models(include_nontext=True) # Include vision/embedding models
list_providers List all configured AI providers and their status. Shows which providers have valid API keys configured and are ready to use. Use this to check your environment setup before calling other tools. Returns: { "type": "success", "providers": { "google": {"configured": true, "model": "gemini-2.0-flash-exp"}, "openai": {"configured": false, "error": "No API key found"}, ... } } Example: list_providers() # Check which providers are ready
validate_environment Validate environment configuration and optionally test API connections. Checks that API keys are configured correctly and can connect to provider APIs. Use this for troubleshooting configuration issues. Args: providers: List of provider names to validate. Validates all if not specified. test_connection: Whether to test API connectivity (default: False). Returns: { "type": "success", "validation": { "google": { "configured": true, "connection_test": "passed" (if test_connection=True) }, ... } } Examples: validate_environment() # Quick config check validate_environment(test_connection=True) # Full API test validate_environment(providers=["openai"], test_connection=True)
Permissions 4
shell high network medium filesystem low env_vars low