prompt
This commit is contained in:
parent
b88d405ab8
commit
d790defcfe
@ -35,18 +35,18 @@ public class McpServerList
|
|||||||
Description = "可以调用进行查询知识库,获取相关参考信息。有地理信息的相关案例步骤参考以及Arcgis Pro的工具详细信息",
|
Description = "可以调用进行查询知识库,获取相关参考信息。有地理信息的相关案例步骤参考以及Arcgis Pro的工具详细信息",
|
||||||
IsActive = true
|
IsActive = true
|
||||||
});
|
});
|
||||||
servers.Add("filesystem", new StdioMcpServer()
|
//servers.Add("filesystem", new StdioMcpServer()
|
||||||
{
|
//{
|
||||||
Name = "filesystem",
|
// Name = "filesystem",
|
||||||
Type = "stdio",
|
// Type = "stdio",
|
||||||
Command = "npx",
|
// Command = "npx",
|
||||||
Args = new List<string>()
|
// Args = new List<string>()
|
||||||
{
|
// {
|
||||||
"-y",
|
// "-y",
|
||||||
"@modelcontextprotocol/server-filesystem",
|
// "@modelcontextprotocol/server-filesystem",
|
||||||
"F:\\secondsemester\\linktool\\test\\LinkTool0607\\LinkTool0607.gdb"
|
// "F:\\secondsemester\\linktool\\test\\LinkTool0607\\LinkTool0607.gdb"
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
//servers.Add("fetch", new StdioMcpServer()
|
//servers.Add("fetch", new StdioMcpServer()
|
||||||
//{
|
//{
|
||||||
// Name = "fetch",
|
// Name = "fetch",
|
||||||
@ -57,31 +57,31 @@ public class McpServerList
|
|||||||
// "mcp-server-fetch"
|
// "mcp-server-fetch"
|
||||||
// }
|
// }
|
||||||
//});
|
//});
|
||||||
servers.Add("bing-search", new StdioMcpServer()
|
//servers.Add("bing-search", new StdioMcpServer()
|
||||||
{
|
//{
|
||||||
Name = "bing-search",
|
// Name = "bing-search",
|
||||||
Type = "stdio",
|
// Type = "stdio",
|
||||||
Command = "npx",
|
// Command = "npx",
|
||||||
Args = new List<string>()
|
// Args = new List<string>()
|
||||||
{
|
// {
|
||||||
"bing-cn-mcp"
|
// "bing-cn-mcp"
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
servers.Add("mcp-python-interpreter", new StdioMcpServer()
|
//servers.Add("mcp-python-interpreter", new StdioMcpServer()
|
||||||
{
|
//{
|
||||||
Name = "mcp-python-interpreter",
|
// Name = "mcp-python-interpreter",
|
||||||
Type = "stdio",
|
// Type = "stdio",
|
||||||
Command = "uvx",
|
// Command = "uvx",
|
||||||
Args = new List<string>()
|
// Args = new List<string>()
|
||||||
{
|
// {
|
||||||
"--native-tls",
|
// "--native-tls",
|
||||||
"mcp-python-interpreter",
|
// "mcp-python-interpreter",
|
||||||
"--dir",
|
// "--dir",
|
||||||
"F:\\secondsemester\\linktool\\test\\LinkTool0607\\LinkTool0607.gdb",
|
// "F:\\secondsemester\\linktool\\test\\LinkTool0607\\LinkTool0607.gdb",
|
||||||
"--python-path",
|
// "--python-path",
|
||||||
"C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\custom\\python.exe"
|
// "C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\custom\\python.exe"
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
}
|
}
|
||||||
|
|
||||||
public McpServer GetServer(string name)
|
public McpServer GetServer(string name)
|
||||||
|
|||||||
@ -43,7 +43,8 @@
|
|||||||
|
|
||||||
你必须严格遵守以下每一条规则:
|
你必须严格遵守以下每一条规则:
|
||||||
1.用户时间宝贵,一旦确认工具成功调用之后,不得重复调用上一次已成功执行的工具,除非有新的参数或上下文变化。
|
1.用户时间宝贵,一旦确认工具成功调用之后,不得重复调用上一次已成功执行的工具,除非有新的参数或上下文变化。
|
||||||
2.调用“ArcGisPro:ArcGisProTool”工具前一定要先调用“<prompt><name>plan</name><arguments>{}</arguments></prompt>”规划工具的使用,确认调用工具流程之后再调用知识库将规划的正确调用名、以及工具参数返回到tool_result中,最后再逐步执行工具。
|
2.调用“ArcGisPro:ArcGisProTool”工具前一定要先调用知识库工具检查工具调用名和参数是否正确,name一定要严格按照知识库的调用名,例如analysis.Erase。如果有非必填的参数要用""空开
|
||||||
3.参数都应为字符串类型,可以表示文件或其他输出类型。
|
3.参数都应为字符串类型,可以表示文件或其他输出类型。
|
||||||
4.一旦消息中没有工具或提示词调用信息即视为任务完成。因此工具或提示词调用必须连续完成。
|
4.一旦消息中没有工具或提示词调用信息即视为任务完成。因此工具或提示词调用必须连续完成。
|
||||||
5.只响应用户目前的需求即可,不要过度猜测用户的需求,如果有下一步的工具建议只输出文本即可,如果输出XML会执行大量无用的工具。
|
5.只响应用户目前的需求即可,不要过度猜测用户的需求,如果有下一步的工具建议只输出文本即可,如果输出XML会执行大量无用的工具。
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user