载入中...
搜索中...
未找到
McpToolFilter.hpp
浏览该文件的文档.
1#pragma once
2
21#include "common/Export.h"
22
23#include <string>
24#include <string_view>
25#include <vector>
26
27namespace eve::dev {
28
31 std::string name;
32};
33
39[[nodiscard]] EVENGINE_API_FOUNDATION std::vector<std::string> mcpToolTags(std::string_view name);
40
42[[nodiscard]] EVENGINE_API_FOUNDATION bool mcpToolMutates(std::string_view name);
43
48[[nodiscard]] EVENGINE_API_FOUNDATION bool mcpToolAllowed(std::string_view name);
49
55[[nodiscard]] EVENGINE_API_FOUNDATION std::string filterMcpToolsBody(std::string_view toolsBody);
56
61[[nodiscard]] EVENGINE_API_FOUNDATION std::string mcpToolFilteredPayload(std::string_view name);
62
65
66} // namespace eve::dev
std::string name
Definition ECS.cpp:154
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
std::vector< std::string > mcpToolTags(std::string_view name)
Classify a built-in or script tool into toolset tags.
bool mcpToolAllowed(std::string_view name)
Whether name is visible under the current env filter.
bool mcpToolMutates(std::string_view name)
Whether the tool mutates game / editor / host state.
void mcpToolFilterReloadForTest()
Test helper: clear cached env snapshot so the next allow check reloads.
std::string filterMcpToolsBody(std::string_view toolsBody)
Filter a JSON tools array body in place (objects joined by commas).
std::string mcpToolFilteredPayload(std::string_view name)
Human-readable rejection payload fields when a call is filtered out.
One advertised MCP tool after schema parse (name only for filtering).