Documentation
¶
Overview ¶
Package markdown implements the MCP tool handler for rendering GitLab-flavored markdown. It wraps the MarkdownService from client-go v2.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatRenderMarkdown ¶
func FormatRenderMarkdown(out RenderOutput) *mcp.CallToolResult
FormatRenderMarkdown formats the rendered markdown output.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all markdown tools on the MCP server.
Types ¶
type RenderInput ¶
type RenderInput struct {
Text string `json:"text" jsonschema:"Markdown text to render,required"`
GFM bool `json:"gfm,omitempty" jsonschema:"Use GitLab Flavored Markdown (default false)"`
Project string `json:"project,omitempty" jsonschema:"Project path for resolving references (e.g. group/project)"`
}
RenderInput is the input for rendering markdown.
type RenderOutput ¶
type RenderOutput struct {
toolutil.HintableOutput
HTML string `json:"html"`
}
RenderOutput is the output containing the rendered HTML.
func Render ¶
func Render(ctx context.Context, client *gitlabclient.Client, input RenderInput) (RenderOutput, error)
Render renders arbitrary markdown text to HTML using the GitLab API.
Click to show internal directories.
Click to hide internal directories.