server

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package server serves document conversion as an MCP tool.

Index

Constants

View Source
const (
	MaxLines = 2000
	MaxBytes = 50 << 10
)

Default output limits, the same as malachi's read tool so a model sees one convention for paging through long text.

View Source
const ToolName = "convert_to_markdown"

ToolName is the tool's name, the same as markitdown-mcp's so clients and prompts written for that work unchanged.

Variables

This section is empty.

Functions

func New

func New(opts Options) *mcp.Server

New returns an MCP server with the convert_to_markdown tool.

Types

type Args

type Args struct {
	URI    string `json:"uri" jsonschema:"the document: a file path, or a file:, data:, http: or https: URI"`
	Offset int    `json:"offset,omitempty" jsonschema:"line of the converted Markdown to start from (1-based)"`
	Limit  int    `json:"limit,omitempty" jsonschema:"maximum number of lines to return"`
	// Password is for an encrypted PDF. It passes through the model, so it
	// is only ever one the user typed.
	Password string `json:"password,omitempty" jsonschema:"password for an encrypted PDF, only one the user has given you; never guess one"`
}

Args are the tool's arguments.

type Options

type Options struct {
	Version string
	Source  source.Options
	// MaxLines and MaxBytes bound one call's output; zero uses the defaults.
	MaxLines, MaxBytes int
}

Options configures a server.

Jump to

Keyboard shortcuts

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