|
| 1 | +# MCP Prompts Redesign: Task-Oriented Prompts |
| 2 | + |
| 3 | +## Problem |
| 4 | + |
| 5 | +The current 3 MCP prompts (`analyze_problem`, `reduction_walkthrough`, `explore_graph`) are tool-centric — they list which tools to call rather than expressing what the user wants to accomplish. This makes them disconnected from how researchers, students, and LLM agents actually think about reductions. |
| 6 | + |
| 7 | +## Design |
| 8 | + |
| 9 | +Replace the 3 existing prompts with 7 task-oriented prompts. All prompt text frames requests as user questions. No tool names appear in prompt text — the LLM decides which tools to call. |
| 10 | + |
| 11 | +### Prompt Inventory |
| 12 | + |
| 13 | +| # | Name | Arguments | User question it answers | |
| 14 | +|---|------|-----------|--------------------------| |
| 15 | +| 1 | `what_is` | `problem` (req) | "What is MaxCut?" | |
| 16 | +| 2 | `model_my_problem` | `description` (req) | "I have a scheduling problem — what maps to it?" | |
| 17 | +| 3 | `compare` | `problem_a` (req), `problem_b` (req) | "How do MIS and Vertex Cover relate?" | |
| 18 | +| 4 | `reduce` | `source` (req), `target` (req) | "Walk me through reducing MIS to QUBO" | |
| 19 | +| 5 | `solve` | `problem_type` (req), `instance` (req) | "Solve this graph for maximum independent set" | |
| 20 | +| 6 | `find_reduction` | `source` (req), `target` (req) | "What's the cheapest path from SAT to QUBO?" | |
| 21 | +| 7 | `overview` | *(none)* | "Show me the full problem landscape" | |
| 22 | + |
| 23 | +### Prompt Texts |
| 24 | + |
| 25 | +#### 1. `what_is` |
| 26 | + |
| 27 | +**Description:** Explain a problem type: what it models, its variants, and how it connects to other problems |
| 28 | + |
| 29 | +``` |
| 30 | +Explain the "{problem}" problem to me. |
| 31 | +
|
| 32 | +What does it model in the real world? What are its variants (graph types, |
| 33 | +weight types)? What other problems can it reduce to, and which problems |
| 34 | +reduce to it? |
| 35 | +
|
| 36 | +Give me a concise summary suitable for someone encountering this problem |
| 37 | +for the first time, then show the technical details. |
| 38 | +``` |
| 39 | + |
| 40 | +#### 2. `model_my_problem` |
| 41 | + |
| 42 | +**Description:** Map a real-world problem to the closest NP-hard problem type in the reduction graph |
| 43 | + |
| 44 | +``` |
| 45 | +I have a real-world problem and I need help identifying which NP-hard |
| 46 | +problem type it maps to. |
| 47 | +
|
| 48 | +Here's my problem: "{description}" |
| 49 | +
|
| 50 | +Look through the available problem types in the reduction graph and |
| 51 | +identify which one(s) best model my problem. Explain why it's a good fit, |
| 52 | +what the variables and constraints map to, and suggest how I could encode |
| 53 | +my specific instance. |
| 54 | +``` |
| 55 | + |
| 56 | +#### 3. `compare` |
| 57 | + |
| 58 | +**Description:** Compare two problem types: their relationship, differences, and reduction path between them |
| 59 | + |
| 60 | +``` |
| 61 | +Compare "{problem_a}" and "{problem_b}". |
| 62 | +
|
| 63 | +How are they related? Is there a direct reduction between them, or do they |
| 64 | +connect through intermediate problems? What are the key differences in |
| 65 | +what they model? If one can be reduced to the other, what is the overhead? |
| 66 | +``` |
| 67 | + |
| 68 | +#### 4. `reduce` |
| 69 | + |
| 70 | +**Description:** Step-by-step reduction walkthrough: create an instance, reduce it, solve it, and map the solution back |
| 71 | + |
| 72 | +``` |
| 73 | +Walk me through reducing a "{source}" instance to "{target}", step by step. |
| 74 | +
|
| 75 | +1. Find the reduction path and explain the overhead. |
| 76 | +2. Create a small, concrete example instance of "{source}". |
| 77 | +3. Reduce it to "{target}" and show what the transformed instance looks like. |
| 78 | +4. Solve the reduced instance. |
| 79 | +5. Explain how the solution maps back to the original problem. |
| 80 | +
|
| 81 | +Use a small example so I can follow each transformation by hand. |
| 82 | +``` |
| 83 | + |
| 84 | +#### 5. `solve` |
| 85 | + |
| 86 | +**Description:** Create and solve a problem instance, showing the optimal solution |
| 87 | + |
| 88 | +``` |
| 89 | +Create a {problem_type} instance with these parameters: {instance} |
| 90 | +
|
| 91 | +Solve it and show me: |
| 92 | +- The problem instance details (size, structure) |
| 93 | +- The optimal solution and its objective value |
| 94 | +- Why this solution is optimal (briefly) |
| 95 | +``` |
| 96 | + |
| 97 | +#### 6. `find_reduction` |
| 98 | + |
| 99 | +**Description:** Find the best reduction path between two problems, with cost analysis |
| 100 | + |
| 101 | +``` |
| 102 | +Find the best way to reduce "{source}" to "{target}". |
| 103 | +
|
| 104 | +Show me the cheapest reduction path and explain the cost at each step. |
| 105 | +Are there alternative paths? If so, compare them — which is better for |
| 106 | +small instances vs. large instances? |
| 107 | +``` |
| 108 | + |
| 109 | +#### 7. `overview` |
| 110 | + |
| 111 | +**Description:** Explore the full landscape of NP-hard problems and reductions in the graph |
| 112 | + |
| 113 | +``` |
| 114 | +Give me an overview of the NP-hard problem reduction landscape. |
| 115 | +
|
| 116 | +How many problem types are registered? What are the major categories |
| 117 | +(graph, SAT, optimization)? Which problems are the most connected hubs? |
| 118 | +Which problems can reach the most targets through reductions? |
| 119 | +
|
| 120 | +Summarize the structure so I understand what's available and where to |
| 121 | +start exploring. |
| 122 | +``` |
| 123 | + |
| 124 | +## Scope |
| 125 | + |
| 126 | +- **Changed:** `problemreductions-cli/src/mcp/prompts.rs` (prompt definitions) |
| 127 | +- **Changed:** `problemreductions-cli/src/mcp/tests.rs` (prompt tests) |
| 128 | +- **Unchanged:** All 10 MCP tools, tool handlers, server infrastructure |
| 129 | + |
| 130 | +## Testing |
| 131 | + |
| 132 | +- Unit tests: verify `list_prompts` returns 7 prompts with correct names/arguments |
| 133 | +- Unit tests: verify `get_prompt` returns correct message text for each prompt |
| 134 | +- Integration test: call each prompt via JSON-RPC and verify response structure |
0 commit comments