Documentation
¶
Overview ¶
Package api exposes the service twice from one process: REST/JSON under /api/v1 for the portal backend, and MCP tools for muster. Both map onto the same service methods so behavior cannot drift between them.
Index ¶
Constants ¶
const ( ToolGetInfo = "get_info" ToolListAgents = "list_agents" ToolGetAgent = "get_agent" ToolCreateAgent = "create_agent" ToolUpdateAgent = "update_agent" ToolDeleteAgent = "delete_agent" ToolGetAgentStatus = "get_agent_status" ToolValidateAgent = "validate_agent" ToolListModelConfigs = "list_model_configs" ToolListSkills = "list_skills" )
MCP tool names. Through muster they appear as x_<server>_<tool>, e.g. x_agent-manager_create_agent.
const Prefix = "/api/v1"
Prefix is the REST base path.
Variables ¶
This section is empty.
Functions ¶
func NewMCPServer ¶
NewMCPServer builds an MCP server exposing the same operations as the REST API as tools. Results are JSON text with the same shapes as the REST bodies.
func SpecToUpdate ¶
SpecToUpdate turns a full spec into a partial update: every non-empty field becomes a change, empty ones stay untouched. Used by validate (update mode) and by the MCP update tool, whose arguments are flat.