Documentation
¶
Overview ¶
Package mcp serves Flowbot capabilities over Streamable HTTP at /mcp and, unless mcp.server_card is false, a public Server Card at /mcp/server-card.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetRateRedis ¶
func SetRateRedis(c scriptEval)
SetRateRedis replaces the Redis client used for MCP tool rate limits. A nil client clears the override so the process client is used.
Types ¶
type Identity ¶
type Identity struct {
UID types.Uid
// TokenID is the access-token row id. Rate-limit keys use it.
TokenID int64
Scopes []string
IP string
UserAgent string
}
Identity is the authenticated MCP caller (API token, never a web session).
type ToolError ¶
ToolError is the machine-readable MCP tool failure stored at structuredContent.error.
func ToToolError ¶
ToToolError maps err onto the MCP tool error object. Plain errors and ErrInternal become code internal with a fixed message. ErrInvalidArgument keeps the cause text from types.ClientSafeDomainMessage.
type ToolSpec ¶
type ToolSpec struct {
Name string
Group string
Operation string
Description string
Mutation bool
Kind string
Input []hub.ParamDef
Scopes []string
Output map[string]any
}
ToolSpec is one MCP tool advertised on /mcp.
func BuildCatalog ¶
func BuildCatalog(descs []hub.Descriptor, include, exclude []string) []ToolSpec
BuildCatalog returns capability, pipeline/workflow/function, and hub tools after deny-list and mcp.include / mcp.exclude filters.
func FilterByScopes ¶
FilterByScopes keeps tools the token is allowed to call.