Documentation
¶
Overview ¶
Package mcpserver provides an MCP (Model Context Protocol) server implementation for Confluence. It exposes tools for reading, creating, and updating Confluence pages using structured content blocks instead of raw XHTML, ensuring safe and valid output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentBlock ¶
ContentBlock represents a content block in an MCP response.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the MCP server for Confluence.
func New ¶
func New(client *confluence.Client) *Server
New creates a new MCP server with the given Confluence client.
func (*Server) HandleTool ¶
func (s *Server) HandleTool(ctx context.Context, name string, input map[string]interface{}) (*ToolResult, error)
HandleTool dispatches a tool call to the appropriate handler.
type Tool ¶
type Tool struct {
Name string `json:"name"`
Description string `json:"description"`
InputSchema map[string]interface{} `json:"inputSchema"`
}
Tool represents an MCP tool definition.
type ToolHandler ¶
ToolHandler is a function that handles a tool call.
type ToolResult ¶
type ToolResult struct {
Content []ContentBlock `json:"content"`
IsError bool `json:"isError,omitempty"`
}
ToolResult represents the result of a tool execution.
Click to show internal directories.
Click to hide internal directories.