Documentation
¶
Overview ¶
Package mcp provides the MCP server adapter for Prism.
Index ¶
- func Serve(ctx context.Context, runner app.AgentRunner) error
- func ServeWithConfig(ctx context.Context, runner app.AgentRunner, cfg Config) error
- func StatusSummary(runner app.AgentRunner) string
- type CallMCPToolInput
- type Config
- type DoctorInput
- type ExplainPolicyInput
- type GetConstitutionInput
- type GetPromptInput
- type GetPromptOutput
- type GetResourceInput
- type GetResourceOutput
- type ListAgentsInput
- type ListAgentsOutput
- type ListMCPServerToolsInput
- type ListMCPServerToolsOutput
- type ListMCPServersInput
- type ListMCPServersOutput
- type ListPoliciesInput
- type ListPoliciesOutput
- type ListPromptsInput
- type ListPromptsOutput
- type ListResourcesInput
- type ListResourcesOutput
- type MCPResource
- type PromptTemplate
- type RunAgentInput
- type RunGraphInput
- type SkillHealth
- type SkillHealthInput
- type SkillHealthOutput
- type SuggestRouteInput
- type UsageSummaryInput
- type WorkspaceInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
func Serve(ctx context.Context, runner app.AgentRunner) error
Serve starts the MCP server over stdio until the client disconnects.
func ServeWithConfig ¶ added in v0.1.14
func StatusSummary ¶
func StatusSummary(runner app.AgentRunner) string
StatusSummary returns a one-line startup message for logging.
Types ¶
type CallMCPToolInput ¶ added in v0.1.14
type DoctorInput ¶
type DoctorInput struct{}
type ExplainPolicyInput ¶ added in v0.1.14
type ExplainPolicyInput struct {
AgentID string `json:"agent_id"`
// omitempty keeps these optional in the inferred tool schema — a policy
// question may involve no skills or plugins, and source defaults to
// "mcp" in the handler.
Skills []string `json:"skills,omitempty"`
Plugins []string `json:"plugins,omitempty"`
Source string `json:"source,omitempty"`
}
type GetConstitutionInput ¶
type GetConstitutionInput struct {
AgentID string `json:"agent_id"`
}
type GetPromptInput ¶
type GetPromptOutput ¶
type GetResourceInput ¶
type GetResourceInput struct {
URI string `json:"uri"`
}
type GetResourceOutput ¶
type ListAgentsInput ¶
type ListAgentsInput struct{}
type ListAgentsOutput ¶
type ListMCPServerToolsInput ¶ added in v0.1.14
type ListMCPServerToolsOutput ¶ added in v0.1.14
type ListMCPServerToolsOutput struct {
Server string `json:"server"`
Tools []downstreammcp.ToolSummary `json:"tools"`
Count int `json:"count"`
// Total is the number of tools the downstream server actually exposes;
// when Truncated is true the list was cut at max_tools.
Total int `json:"total"`
Truncated bool `json:"truncated,omitempty"`
}
type ListMCPServersInput ¶ added in v0.1.14
type ListMCPServersInput struct{}
type ListMCPServersOutput ¶ added in v0.1.14
type ListMCPServersOutput struct {
Configured bool `json:"configured"`
Servers []downstreammcp.Server `json:"servers"`
}
type ListPoliciesInput ¶ added in v0.1.14
type ListPoliciesInput struct{}
type ListPoliciesOutput ¶ added in v0.1.14
type ListPromptsInput ¶
type ListPromptsInput struct{}
type ListPromptsOutput ¶
type ListPromptsOutput struct {
Prompts []PromptTemplate `json:"prompts"`
Count int `json:"count"`
}
type ListResourcesInput ¶
type ListResourcesInput struct{}
type ListResourcesOutput ¶
type ListResourcesOutput struct {
Resources []MCPResource `json:"resources"`
Count int `json:"count"`
}
type MCPResource ¶
type PromptTemplate ¶
type PromptTemplate struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Variables []string `json:"variables,omitempty"`
}
PromptTemplate describes an LLM-callable prompt helper exposed as an MCP tool.
type RunAgentInput ¶
type RunAgentInput struct {
AgentID string `json:"agent_id"`
Task string `json:"task"`
SkillNames []string `json:"skill_names"`
Format string `json:"format,omitempty"`
Workspace *WorkspaceInput `json:"workspace,omitempty"`
}
type RunGraphInput ¶ added in v0.1.14
type RunGraphInput struct {
Graph graphpkg.Definition `json:"graph"`
}
type SkillHealth ¶ added in v0.1.14
type SkillHealthInput ¶ added in v0.1.14
type SkillHealthInput struct {
SkillName string `json:"skill_name,omitempty"`
}
type SkillHealthOutput ¶ added in v0.1.14
type SkillHealthOutput struct {
Skills []SkillHealth `json:"skills"`
Count int `json:"count"`
}
type SuggestRouteInput ¶ added in v0.1.14
type UsageSummaryInput ¶ added in v0.1.14
type UsageSummaryInput struct{}
type WorkspaceInput ¶ added in v0.1.21
type WorkspaceInput struct {
Root string `json:"root"`
}