markdown

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL