public class McpServerEndpointProvider extends Object implements org.noear.solon.core.bean.LifecycleBean
| Modifier and Type | Class and Description |
|---|---|
static class |
McpServerEndpointProvider.Builder |
| Constructor and Description |
|---|
McpServerEndpointProvider(McpServerProperties serverProperties) |
McpServerEndpointProvider(Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTool(FunctionTool functionTool)
登记工具
|
void |
addTool(ToolProvider toolProvider)
登记工具
|
protected void |
addToolSpec(FunctionTool functionTool) |
static McpServerEndpointProvider.Builder |
builder() |
protected org.noear.snack.ONode |
buildJsonSchema(FunctionTool functionTool) |
String |
getName()
名字
|
String |
getSseEndpoint()
端点
|
void |
notifyToolsListChanged()
通知工具变化
|
boolean |
pause()
暂停(主要用于测试)
|
void |
postStart() |
void |
removeTool(String toolName)
移除工具
|
void |
removeTool(ToolProvider toolProvider)
移除工具
|
boolean |
resume()
恢复(主要用于测试)
|
void |
start() |
void |
stop() |
public McpServerEndpointProvider(Properties properties)
public McpServerEndpointProvider(McpServerProperties serverProperties)
public String getName()
public String getSseEndpoint()
public void addTool(FunctionTool functionTool)
public void addTool(ToolProvider toolProvider)
public void removeTool(String toolName)
public void removeTool(ToolProvider toolProvider)
public void notifyToolsListChanged()
public void start()
throws Throwable
start in interface org.noear.solon.core.bean.LifecycleBeanstart in interface org.noear.solon.core.LifecycleThrowablepublic void postStart()
throws Throwable
postStart in interface org.noear.solon.core.LifecycleThrowablepublic boolean pause()
public boolean resume()
public void stop()
throws Throwable
stop in interface org.noear.solon.core.LifecycleThrowableprotected void addToolSpec(FunctionTool functionTool)
protected org.noear.snack.ONode buildJsonSchema(FunctionTool functionTool)
public static McpServerEndpointProvider.Builder builder()
Copyright © 2025. All rights reserved.