Documentation
¶
Overview ¶
Package taskcheck checks a server against the Tasks extension (io.modelcontextprotocol/tasks, spec 2026-07-28): error codes of the tasks/* methods without calling a tool, and with a tool given the whole life of one task — handle, durable creation, polling, statuses, results.
Index ¶
Constants ¶
View Source
const ( NotificationTasks = "notifications/tasks" NotificationAcked = "notifications/subscriptions/acknowledged" )
Notifications of the extension, recorded by a client.NotificationTap.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
Session *mcp.ClientSession
// Tool, if set, is called as a task to check a task's life; without it
// only the tasks/* methods are probed. The tool is called twice: once
// without and once with the extension declared.
Tool string
Args map[string]any
// Cancel cancels the task right after it was created.
Cancel bool
// Responder answers input requests; without one an input_required task
// is cancelled.
Responder *client.Responder
// Tap records notifications/tasks and subscription acknowledgements; with
// it the task's notifications are checked too. It must wrap the
// session's transport.
Tap *client.NotificationTap
// Other is a session of a second identity (other credentials) to the same
// server; with it, another identity's access to the task is checked.
Other *mcp.ClientSession
// Timeout bounds the wait for a terminal status (default 2 minutes).
Timeout time.Duration
// PlainWait bounds the call without the extension (default 5 seconds).
PlainWait time.Duration
}
Checker runs the checks over a session.
type Report ¶
type Report struct {
Declared bool `json:"declared"`
Tool string `json:"tool,omitempty"`
TaskID string `json:"taskId,omitempty"`
Statuses []string `json:"statuses,omitempty"` // observed status sequence, without repeats
Results []Result `json:"results"`
}
Report is the outcome of a check run.
func (*Report) FailedNames ¶
FailedNames returns the names of the failed checks.
Click to show internal directories.
Click to hide internal directories.