Documentation
¶
Index ¶
- func CreateCapturlTool() *mcp.Tool
- func CreateCapturlToolHandler(tc ToolContext) mcp.ToolHandlerFor[CreateCapturlToolInput, any]
- func FetchCapturlTool() *mcp.Tool
- func FetchCapturlToolHandler(tc ToolContext) mcp.ToolHandlerFor[FetchCapturlToolInput, any]
- type CreateCapturlToolInput
- type CreateSnipRequest
- type CreateSnipResponse
- type FetchCapturlToolInput
- type GetSnipRequest
- type GetSnipResponse
- type Image
- type ImageDimensions
- type Snip
- type SnipAnchor
- type SnipSource
- type SnipSourcePayload
- type ToolContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCapturlTool ¶ added in v0.0.4
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 ¶
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
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
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"`
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
}
ToolContext provides shared dependencies for all MCP tool handlers.