tools

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 14 Imported by: 0 modules, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCapturlTool added in v0.0.4

func CreateCapturlTool() *mcp.Tool

CreateCapturlTool returns the tool definition for the create_capturl tool.

func CreateCapturlToolHandler added in v0.0.4

func CreateCapturlToolHandler(tc ToolContext) mcp.ToolHandlerFor[CreateCapturlToolInput, any]

CreateCapturlToolHandler is the handler for the create_capturl tool.

func FetchCapturlTool

func FetchCapturlTool() *mcp.Tool

FetchCapturlTool returns the tool definition for the fetch_capturl tool.

func FetchCapturlToolHandler

func FetchCapturlToolHandler(tc ToolContext) mcp.ToolHandlerFor[FetchCapturlToolInput, any]

FetchCapturlToolHandler is the handler for the fetch_capturl tool.

Types

type CreateCapturlToolInput added in v0.0.4

type CreateCapturlToolInput struct {
	FilePath  string `json:"filePath" jsonschema:"The path to the image file"`
	SourceURL string `` /* 240-byte string literal not displayed */
}

CreateCapturlToolInput is the input for the create_capturl tool. TODO(clovis): Would be nice to also accept the source URL!

type CreateSnipRequest added in v0.0.4

type CreateSnipRequest struct {
	Snip *Snip `json:"snip"`
}

CreateSnipRequest is the request body for the CreateSnip endpoint.

type CreateSnipResponse added in v0.0.4

type CreateSnipResponse struct {
	Snip *Snip `json:"snip"`
}

CreateSnipResponse is the response body for the CreateSnip endpoint.

type FetchCapturlToolInput

type FetchCapturlToolInput struct {
	URL string `json:"url" jsonschema:"The URL of the capturl to fetch"`
}

FetchCapturlToolInput is the input for the fetch_capturl tool.

type GetSnipRequest added in v0.0.9

type GetSnipRequest struct {
	OrgID  string `json:"orgId"`
	SnipID string `json:"snipId"`
}

GetSnipRequest is the request body for the GetSnip endpoint.

type GetSnipResponse added in v0.0.9

type GetSnipResponse struct {
	Snip *Snip `json:"snip"`
}

GetSnipResponse is the response body for the GetSnip endpoint.

type Image added in v0.0.4

type Image struct {
	ImageBytes []byte           `json:"imageBytes,omitempty"`
	ImageURL   string           `json:"imageUrl,omitempty"`
	Dimensions *ImageDimensions `json:"dimensions,omitempty"`
	MimeType   string           `json:"mimeType"`
}

Image is the image that is uploaded to Capturl.

type ImageDimensions added in v0.0.4

type ImageDimensions struct {
	Width  int32 `json:"width"`
	Height int32 `json:"height"`
}

ImageDimensions is the dimensions of an image.

type Snip added in v0.0.4

type Snip struct {
	OrgID        string      `json:"orgId,omitempty"`
	SnipID       string      `json:"snipId,omitempty"`
	Anchor       *SnipAnchor `json:"anchor,omitempty"`
	Source       *SnipSource `json:"source,omitempty"`
	Thumbnails   []*Image    `json:"thumbnails,omitempty"`
	E2EEncrypted bool        `json:"e2eEncrypted,omitempty"`
}

Snip is an internal name for a "capturl".

type SnipAnchor added in v0.0.4

type SnipAnchor struct {
	Image *Image `json:"image"`
}

SnipAnchor is the anchor for a capturl (the image).

type SnipSource added in v0.0.4

type SnipSource struct {
	Payload *SnipSourcePayload `json:"payload,omitempty"`
}

SnipSource is the source for a capturl (the URL).

type SnipSourcePayload added in v0.0.4

type SnipSourcePayload struct {
	URL string `json:"url"`
}

SnipSourcePayload is the payload for a capturl source (the URL).

type ToolContext

type ToolContext struct {
	// The token provider to use when making API calls to Capturl.
	TokenProvider auth.TokenProvider
	// The HTTP client to use for making network requests.
	HTTPClient *http.Client
	// The base URL for the Capturl FE.
	BaseURL string
	// The version of the MCP server.
	Version string
}

ToolContext provides shared dependencies for all MCP tool handlers.

Jump to

Keyboard shortcuts

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