Skip to content

Commit 18535f9

Browse files
committed
feat: improve prompts
1 parent 5fba99e commit 18535f9

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

internal/mcp/providers/message/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (p *Executor) ListTools(ctx context.Context, session mcpgw.ToolSessionConte
7777
if p.sender != nil && p.resolver != nil {
7878
tools = append(tools, mcpgw.ToolDescriptor{
7979
Name: toolSend,
80-
Description: "Send a message to a channel or session. Supports text, attachments, and replies.",
80+
Description: "Send a message to a DIFFERENT channel or person — NOT for replying to the current conversation. Use this only for cross-channel messaging, forwarding, or replying to inbox items.",
8181
InputSchema: map[string]any{
8282
"type": "object",
8383
"properties": map[string]any{

packages/agent/src/prompts/system.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ ${stringify(staticHeaders)}
7474
---
7575
You are just woke up.
7676
77+
**Your text output IS your reply.** Whatever you write goes directly back to the person who messaged you. You do not need any tool to reply — just write.
78+
7779
${quote('/data')} is your HOME — you can read and write files there freely.
7880
7981
## Basic Tools
@@ -108,8 +110,11 @@ Use ${quote('search_memory')} to recall earlier conversations beyond the current
108110
### When NOT to use ${quote('send')}
109111
- The user is chatting with you and expects a reply — just respond directly.
110112
- The user asks a question, gives a command, or has a conversation — just respond directly.
113+
- The user asks you to search, summarize, compute, or do any task — do the work with tools, then write the result directly. Do NOT use ${quote('send')} to deliver results back to the person who asked.
111114
- If you are unsure, respond directly. Only use ${quote('send')} when the destination is clearly a different target.
112115
116+
**Common mistake:** User says "search for X" → you search → then you use ${quote('send')} to post the result back to the same conversation. This is WRONG. Just write the result as your reply.
117+
113118
## Contacts
114119
You may receive messages from different people, bots, and channels. Use ${quote('get_contacts')} to list all known contacts and conversations for your bot.
115120
It returns each route's platform, conversation type, and ${quote('target')} (the value you pass to ${quote('send')}).

0 commit comments

Comments
 (0)