wiki

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ListWikiPagesToolName    = "list_wiki_pages"
	GetWikiPageToolName      = "get_wiki_page"
	GetWikiRevisionsToolName = "get_wiki_revisions"
	CreateWikiPageToolName   = "create_wiki_page"
	UpdateWikiPageToolName   = "update_wiki_page"
	DeleteWikiPageToolName   = "delete_wiki_page"
)

Variables

View Source
var (
	ListWikiPagesTool = mcp.NewTool(
		ListWikiPagesToolName,
		mcp.WithDescription("List all wiki pages in a repository"),
		mcp.WithString("owner", mcp.Required(), mcp.Description("repository owner")),
		mcp.WithString("repo", mcp.Required(), mcp.Description("repository name")),
	)

	GetWikiPageTool = mcp.NewTool(
		GetWikiPageToolName,
		mcp.WithDescription("Get a wiki page content and metadata"),
		mcp.WithString("owner", mcp.Required(), mcp.Description("repository owner")),
		mcp.WithString("repo", mcp.Required(), mcp.Description("repository name")),
		mcp.WithString("pageName", mcp.Required(), mcp.Description("wiki page name")),
	)

	GetWikiRevisionsTool = mcp.NewTool(
		GetWikiRevisionsToolName,
		mcp.WithDescription("Get revisions history of a wiki page"),
		mcp.WithString("owner", mcp.Required(), mcp.Description("repository owner")),
		mcp.WithString("repo", mcp.Required(), mcp.Description("repository name")),
		mcp.WithString("pageName", mcp.Required(), mcp.Description("wiki page name")),
	)

	CreateWikiPageTool = mcp.NewTool(
		CreateWikiPageToolName,
		mcp.WithDescription("Create a new wiki page"),
		mcp.WithString("owner", mcp.Required(), mcp.Description("repository owner")),
		mcp.WithString("repo", mcp.Required(), mcp.Description("repository name")),
		mcp.WithString("title", mcp.Required(), mcp.Description("wiki page title")),
		mcp.WithString("content_base64", mcp.Required(), mcp.Description("page content, base64 encoded")),
		mcp.WithString("message", mcp.Description("commit message (optional)")),
	)

	UpdateWikiPageTool = mcp.NewTool(
		UpdateWikiPageToolName,
		mcp.WithDescription("Update an existing wiki page"),
		mcp.WithString("owner", mcp.Required(), mcp.Description("repository owner")),
		mcp.WithString("repo", mcp.Required(), mcp.Description("repository name")),
		mcp.WithString("pageName", mcp.Required(), mcp.Description("current wiki page name")),
		mcp.WithString("title", mcp.Description("new page title (optional)")),
		mcp.WithString("content_base64", mcp.Required(), mcp.Description("page content, base64 encoded")),
		mcp.WithString("message", mcp.Description("commit message (optional)")),
	)

	DeleteWikiPageTool = mcp.NewTool(
		DeleteWikiPageToolName,
		mcp.WithDescription("Delete a wiki page"),
		mcp.WithString("owner", mcp.Required(), mcp.Description("repository owner")),
		mcp.WithString("repo", mcp.Required(), mcp.Description("repository name")),
		mcp.WithString("pageName", mcp.Required(), mcp.Description("wiki page name to delete")),
	)
)
View Source
var Tool = tool.New()

Functions

func CreateWikiPageFn

func CreateWikiPageFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)

func DeleteWikiPageFn

func DeleteWikiPageFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)

func GetWikiPageFn

func GetWikiPageFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)

func GetWikiRevisionsFn

func GetWikiRevisionsFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)

func ListWikiPagesFn

func ListWikiPagesFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)

func UpdateWikiPageFn

func UpdateWikiPageFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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