Documentation
¶
Overview ¶
Package decidemcp provides an in-process MCP server exposing a `decide` tool: the agent puts typed questions about a JSON state to a decision model and gets probabilities back. It follows the same pattern as internal/scriptmcp: no subprocess, the server runs in-process via mcp.NewInMemoryTransports.
Index ¶
Constants ¶
View Source
const ToolName = "decide"
ToolName is the advertised name of the decide tool.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
// Decider is a fixed decider, used when Resolve is nil. With neither set,
// no tool is registered.
Decider *llm.Decider
// Resolve returns the decider at each call, so one added or changed at
// runtime is used without reconnecting. A nil result is a tool error.
Resolve func() *llm.Decider
// DeciderName names the decider in the tool description. Defaults to
// Decider's name.
DeciderName string
// AgentName is the agent the decider spend is billed to.
AgentName string
// Now stamps the billing session key. Defaults to time.Now.
Now func() time.Time
Logger *slog.Logger
}
Deps holds the runtime dependencies injected into the Decide MCP server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the in-process Decide MCP server for a single agent.
Click to show internal directories.
Click to hide internal directories.