载入中...
搜索中...
未找到
McpScriptTools.hpp
浏览该文件的文档.
1#pragma once
2
37#include <Poco/JSON/Object.h>
38
39#include "common/Export.h"
40
41#include <squirrel.h>
42
43#include <string>
44#include <vector>
45
46namespace ssq {
47class VM;
48}
49
50namespace eve::dev {
51
53[[nodiscard]] EVENGINE_API_FOUNDATION bool isScriptTool(const std::string& name);
54
56[[nodiscard]] EVENGINE_API_FOUNDATION std::vector<std::string> scriptToolNames();
57
60
65[[nodiscard]] EVENGINE_API_FOUNDATION std::string scriptToolSchemas();
66
73[[nodiscard]] EVENGINE_API_FOUNDATION std::string callScriptTool(const std::string& name, Poco::JSON::Object::Ptr args);
74
82
85
94[[nodiscard]] EVENGINE_API_FOUNDATION bool isValidScriptToolName(const std::string& name);
95
96} // namespace eve::dev
struct SQVM * HSQUIRRELVM
HSQUIRRELVM vm
Definition ECS.cpp:20
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
std::string name
bool isValidScriptToolName(const std::string &name)
Validate an exported tool name.
int scriptToolCount()
Number of exported tools (for eve_status).
std::string callScriptTool(const std::string &name, Poco::JSON::Object::Ptr args)
Invoke one exported tool.
void clearScriptTools(HSQUIRRELVM owner)
Drop registry entries owned by owner.
std::vector< std::string > scriptToolNames()
Exported tool names in registration order.
std::string scriptToolSchemas()
Comma-free MCP tool schema fragments for every exported tool.
void exposeMcpScriptApi(ssq::VM &vm)
Expose eve.mcp.tool/remove/tools/clear on a VM.
bool isScriptTool(const std::string &name)
Whether name is exported by the project script registry.
EVEngine ECS 集成层:底层实现使用 sunxfancy/ECS.hpp https://github.com/sunxfancy/ECS.hpp
Definition ECS.h:14