15#ifndef ZEPHYR_INCLUDE_NET_MCP_SERVER_H_
16#define ZEPHYR_INCLUDE_NET_MCP_SERVER_H_
52 char name[CONFIG_MCP_TOOL_NAME_MAX_LEN];
54#ifdef CONFIG_MCP_TOOL_DESC
55 char description[CONFIG_MCP_TOOL_DESC_MAX_LEN];
57#ifdef CONFIG_MCP_TOOL_TITLE
58 char title[CONFIG_MCP_TOOL_NAME_MAX_LEN];
60#ifdef CONFIG_MCP_TOOL_OUTPUT_SCHEMA
61 char output_schema[CONFIG_MCP_TOOL_SCHEMA_MAX_LEN];
94 const char *execution_token);
153 const char *execution_token);
long atomic_t
Atomic integer variable.
Definition atomic_types.h:31
int mcp_server_remove_tool(mcp_server_ctx_t server_ctx, const char *tool_name)
Remove a tool from the server.
int mcp_server_add_tool(mcp_server_ctx_t server_ctx, const struct mcp_tool_record *tool_record)
Add a tool to the server.
void * mcp_server_ctx_t
Server context handle.
Definition mcp_server.h:68
mcp_tool_event_type
MCP Tool event type.
Definition mcp_server.h:43
int(* mcp_tool_callback_t)(enum mcp_tool_event_type event, const char *arguments, const char *execution_token)
Tool callback function.
Definition mcp_server.h:93
int mcp_server_start(mcp_server_ctx_t server_ctx)
Start the MCP Server.
mcp_server_ctx_t mcp_server_init(void)
Initialize the MCP Server.
mcp_tool_msg_type
MCP Tool message type.
Definition mcp_server.h:33
int mcp_server_submit_tool_message(mcp_server_ctx_t server_ctx, const struct mcp_tool_message *user_msg, const char *execution_token)
Submit a message from a tool (response/notification).
int mcp_server_is_execution_canceled(mcp_server_ctx_t server_ctx, const char *execution_token, bool *is_canceled)
Helper for checking the execution state of a tool.
@ MCP_TOOL_CALL_REQUEST
JSON-RPC request calling the tool.
Definition mcp_server.h:44
@ MCP_TOOL_CANCEL_REQUEST
Tool cancellation request.
Definition mcp_server.h:45
@ MCP_USR_TOOL_PING
Ping to signify the tool is alive to the MCP Core.
Definition mcp_server.h:37
@ MCP_USR_TOOL_RESPONSE
JSON-RPC response to a client request.
Definition mcp_server.h:34
@ MCP_USR_TOOL_NOTIFICATION
Tool to client notification.
Definition mcp_server.h:35
@ MCP_USR_TOOL_CANCEL_ACK
Cancellation acknowledgment to the MCP Core.
Definition mcp_server.h:36