mcp

package
v0.0.0-...-0c076bc Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package mcp registers the Disbug MCP tools and runs the stdio JSON-RPC server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, profile string, stderr io.Writer) error

Run registers the MCP server and serves stdio JSON-RPC until stdin closes or the process is interrupted.

func SetVersion

func SetVersion(s string)

SetVersion is called by the cmd package at startup so the MCP server reports the right version.

Types

type Deps

type Deps struct {
	Client *client.Client
	Me     *client.Me
	Stderr io.Writer
}

Deps holds shared dependencies for MCP tool handlers.

type GetPinInput

type GetPinInput struct {
	Pin    string   `json:"pin" jsonschema:"pin reference e.g. 7392.2"`
	Fields []string `json:"fields,omitempty" jsonschema:"array of: screenshot console network events replay voice_note video all"`
}

GetPinInput is the input for the get_pin MCP tool.

type GetPinsInput

type GetPinsInput struct {
	Items         []GetPinsItem `json:"items" jsonschema:"array of {pin, fields?} entries"`
	DefaultFields []string      `json:"default_fields,omitempty" jsonschema:"fields used when an item omits its own list"`
}

GetPinsInput is the input for the get_pins MCP tool.

type GetPinsItem

type GetPinsItem struct {
	Pin    string   `json:"pin" jsonschema:"pin reference e.g. 7392.2"`
	Fields []string `json:"fields,omitempty" jsonschema:"fields for this pin; defaults to default_fields"`
}

GetPinsItem is one pin fetch request in the get_pins MCP tool input.

type GetSessionInput

type GetSessionInput struct {
	Session string `json:"session" jsonschema:"session id e.g. 7392"`
}

GetSessionInput is the input for the get_session MCP tool.

type ListSessionsInput

type ListSessionsInput struct {
	Status  string `json:"status,omitempty" jsonschema:"Filter by status: open, resolved, or dismissed"`
	Project string `json:"project,omitempty" jsonschema:"Filter by project slug"`
	Limit   int    `json:"limit,omitempty" jsonschema:"Maximum results to return; defaults to 50 and is capped at 100"`
}

ListSessionsInput is the input for the list_sessions MCP tool.

type Result

type Result map[string]any

Result is a generic JSON tool result payload.

type SearchPinsInput

type SearchPinsInput struct {
	Query string `json:"query" jsonschema:"Search query"`
	Limit int    `json:"limit,omitempty" jsonschema:"Maximum results to return; defaults to 20 and is capped at 50"`
}

SearchPinsInput is the input for the search_pins MCP tool.

type SearchSessionsInput

type SearchSessionsInput struct {
	Query string `json:"query" jsonschema:"Search query"`
	Scope string `json:"scope,omitempty" jsonschema:"Search scope: sessions or pins; defaults to sessions"`
	Limit int    `json:"limit,omitempty" jsonschema:"Maximum results to return; defaults to 20 and is capped at 50"`
}

SearchSessionsInput is the input for the search_sessions MCP tool.

type WhoamiInput

type WhoamiInput struct{}

WhoamiInput is the empty input for the whoami MCP tool.

Jump to

Keyboard shortcuts

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