Documentation
¶
Overview ¶
Package tools exposes a JMAP mailbox as a small set of MCP tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Accounts(ctx context.Context) ([]*Account, error)
SetDefault(ctx context.Context, email string) error
// AttachmentLink makes an attachment too large to inline reachable as a URL or a local path.
AttachmentLink(ctx context.Context, req *mcp.CallToolRequest, acct *Account, accountID jmap.ID, att mailview.Attachment) (string, error)
}
Backend gives the tools access to the accounts of the current user.
type Connector ¶
type Connector interface {
Connect(ctx context.Context, email string, deviceFlow bool) (string, error)
}
Connector links new accounts; only the stdio mode provides one.
type Options ¶
type Options struct {
Backend Backend
Connector Connector
SendEnabled bool
Mode string
Version string
Logger *slog.Logger
Now func() time.Time
}
Options configures the MCP server.