readurl

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToolName    = "read_document_url"
	DisplayName = "Read Document URL"
	SearchHint  = "fetch and convert a remote document or web page to markdown"
	Description = "Fetch a document at a URL and convert it to readable markdown. " +
		"Supports PDF, DOCX, PPTX, XLSX, HTML pages, and arXiv papers. " +
		"Requires docling-serve to be configured. " +
		"Optionally saves the extracted markdown to a workspace path."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DoclingURL is the base URL of a running docling-serve instance.
	// When empty the tool registers but always returns a "not configured" message.
	DoclingURL string
}

Config holds the configuration for the read_document_url tool.

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

Tool fetches a remote document and converts it to markdown via docling-serve.

func NewTool

func NewTool(cfg Config) *Tool

func (*Tool) BackfillInput

func (t *Tool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*Tool) Call

func (t *Tool) Call(
	ctx context.Context,
	input tool.CallInput,
	permissionCheck types.CanUseToolFn,
) (tool.CallResult, error)

func (*Tool) CheckPermissions

func (t *Tool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult

func (*Tool) Definition

func (t *Tool) Definition() tool.Definition

func (*Tool) Description

func (t *Tool) Description(_ context.Context) (string, error)

func (*Tool) FormatResult

func (t *Tool) FormatResult(data any) string

func (*Tool) IsConcurrencySafe

func (t *Tool) IsConcurrencySafe(_ map[string]any) bool

func (*Tool) IsEnabled

func (t *Tool) IsEnabled() bool

func (*Tool) IsReadOnly

func (t *Tool) IsReadOnly(_ map[string]any) bool

func (*Tool) ValidateInput

func (t *Tool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

Jump to

Keyboard shortcuts

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