protocol

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package protocol defines fixed response formats and decision constants.

Index

Constants

View Source
const (
	StatusSuccess = "success"
	StatusDenied  = "denied"
	StatusError   = "error"
)

Tool execution statuses.

View Source
const (
	DecisionApprove = "approve"
	DecisionDeny    = "deny"
	DecisionError   = "error"
)

Approval decisions.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproverResponse

type ApproverResponse struct {
	// Decision is the approver decision.
	Decision string `json:"decision"`
	// Reason provides additional context.
	Reason string `json:"reason,omitempty"`
}

ApproverResponse is the fixed JSON response expected from HTTP approvers.

type ToolResponse

type ToolResponse struct {
	// Status indicates the execution status.
	Status string `json:"status"`
	// Decision indicates approval decision.
	Decision string `json:"decision"`
	// Reason is a human-readable message.
	Reason string `json:"reason,omitempty"`
	// CorrelationID links related requests.
	CorrelationID string `json:"correlation_id"`
}

ToolResponse is the fixed JSON response returned to MCP clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL