Skip to content

Commit 2b94a5d

Browse files
committed
feat: update version to 0.1.0; enhance system prompts with autonomous execution details and action evaluation processes
1 parent ca12753 commit 2b94a5d

File tree

3 files changed

+54
-15
lines changed

3 files changed

+54
-15
lines changed

deno.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
"vendor": true,
33
"nodeModulesDir": "auto",
44
"tasks": {},
5-
"workspace": [
6-
"./packages/core"
7-
],
5+
"workspace": ["./packages/core"],
86
"imports": {
97
"@es-toolkit/es-toolkit": "jsr:@es-toolkit/es-toolkit@^1.37.2",
108
"json-schema-faker": "npm:json-schema-faker@^0.5.9",
119
"json-schema-traverse": "npm:json-schema-traverse@^1.0.0"
1210
}
13-
}
11+
}

packages/core/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mcpc/core",
3-
"version": "0.1.0-beta.5",
3+
"version": "0.1.0",
44
"tasks": {
55
"server:compile": "echo \"no need to compile\"",
66
"test": "deno test --allow-env --allow-read tests/",

packages/core/src/prompts/index.ts

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,35 @@ export const SystemPrompts = {
1515
* Base system prompt for autonomous MCP execution
1616
*/
1717
AUTONOMOUS_EXECUTION:
18-
`Agentic MCP tool \`{toolName}\` that processes instructions through iterative self-invocation.
18+
`Agentic MCP tool \`{toolName}\` that processes instructions through iterative self-invocation and autonomous decision-making.
1919
2020
<instructions>{description}</instructions>
2121
22-
## Action Execution Protocol
22+
## Autonomous Execution Protocol
2323
24-
**🎯 Each Iteration:**
25-
1. **Identify Current Action:** Select the single most appropriate action based on context and goals
26-
2. **Plan Next Action:** Anticipate the likely next step needed (if any)
24+
**🎯 FIRST CALL (Analysis & Planning):**
25+
1. **Understand Request:** Analyze the user's instruction and identify the end goal
26+
2. **Plan Approach:** Determine the sequence of actions needed
27+
3. **Execute First Action:** Start with the most logical first step
2728
28-
**⚡ Key Rules:**
29-
- Use structured protocol - no direct tool calls
30-
- Always analyze results before proceeding`,
29+
**⚡ SUBSEQUENT CALLS (Iterative Execution):**
30+
1. **Evaluate Previous Action:** Analyze results from the last action
31+
2. **Assess Progress:** Determine completion status toward the final goal
32+
3. **Decision Making:**
33+
- **Continue:** Execute next logical action if more work is needed
34+
- **Complete:** Finish if the user request is fully satisfied
35+
36+
**🔄 Key Execution Rules:**
37+
- Each call should execute exactly ONE action
38+
- Always evaluate results before planning the next action
39+
- Maintain context and progress toward the original goal
40+
- Use clear reasoning for action selection
41+
- Stop when the user request is fully satisfied
42+
43+
**📋 Action Selection Criteria:**
44+
- Choose actions that directly advance toward the goal
45+
- Prioritize logical sequence and dependencies
46+
- Consider error handling and validation needs`,
3147

3248
/**
3349
* Workflow execution system prompt
@@ -189,13 +205,38 @@ export const ResponseTemplates = {
189205
* Success response for action execution
190206
*/
191207
ACTION_SUCCESS:
192-
`# You WILL call this tool(\`{toolName}\`) AGAIN using the \`{nextAction}\` action, after evaluating the result from previous action({currentAction}):`,
208+
`**Action Completed Successfully** ✅
209+
210+
Previous action (\`{currentAction}\`) executed successfully.
211+
212+
**Next Action Required:** \`{nextAction}\`
213+
214+
You MUST call tool \`{toolName}\` again with the \`{nextAction}\` action to continue the autonomous execution sequence.
215+
216+
**Instructions:**
217+
- Analyze the result from previous action: \`{currentAction}\`
218+
- Execute the next planned action: \`{nextAction}\`
219+
- Maintain execution context and progress toward the final goal`,
193220

194221
/**
195222
* Planning prompt when no next action is specified
196223
*/
197224
PLANNING_PROMPT:
198-
`# You WILL plan next action if the user request needs additional actions to be fulfilled, after evaluating the result from previous action({currentAction}):`,
225+
`**Action Evaluation & Planning Required** 🎯
226+
227+
Previous action (\`{currentAction}\`) completed. You need to determine the next step.
228+
229+
**Evaluation & Planning Process:**
230+
1. **Analyze Results:** Review the outcome of \`{currentAction}\`
231+
2. **Assess Progress:** Determine how close you are to fulfilling the user request
232+
3. **Plan Next Action:** Identify the most appropriate next action (if needed)
233+
4. **Execute Decision:** Call \`{toolName}\` with the planned action
234+
235+
**Options:**
236+
- **Continue:** If more actions are needed to fulfill the request
237+
- **Complete:** If the user request has been fully satisfied
238+
239+
Choose the next action that best advances toward completing the user's request.`,
199240

200241
/**
201242
* Error response template

0 commit comments

Comments
 (0)