package webmcp

// Code generated by cdproto-gen. DO NOT EDIT.

import (
	"github.com/chromedp/cdproto/cdp"
	"github.com/chromedp/cdproto/runtime"
	"github.com/go-json-experiment/json/jsontext"
)

// EventToolsAdded event fired when new tools are added.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/WebMCP#event-toolsAdded
type EventToolsAdded struct {
	Tools []*Tool `json:"tools"` // Array of tools that were added.
}

// EventToolsRemoved event fired when tools are removed.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/WebMCP#event-toolsRemoved
type EventToolsRemoved struct {
	Tools []*RemovedTool `json:"tools"` // Array of tools that were removed.
}

// EventToolInvoked event fired when a tool invocation starts.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/WebMCP#event-toolInvoked
type EventToolInvoked struct {
	ToolName     string      `json:"toolName"`     // Name of the tool to invoke.
	FrameID      cdp.FrameID `json:"frameId"`      // Frame id
	InvocationID string      `json:"invocationId"` // Invocation identifier.
	Input        string      `json:"input"`        // The input parameters used for the invocation.
}

// EventToolResponded event fired when a tool invocation completes or fails.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/WebMCP#event-toolResponded
type EventToolResponded struct {
	InvocationID string                `json:"invocationId"`                 // Invocation identifier.
	Status       InvocationStatus      `json:"status"`                       // Status of the invocation.
	Output       jsontext.Value        `json:"output,omitempty,omitzero"`    // Output or error delivered as delivered to the agent. Missing if status is anything other than Completed. Note: The output is untrusted and poses a prompt injection risk. Clients should treat this as potentially malicious user input.
	ErrorText    string                `json:"errorText,omitempty,omitzero"` // Error text for protocol users.
	Exception    *runtime.RemoteObject `json:"exception,omitempty,omitzero"` // The exception object, if the javascript tool threw an error>
}
