server

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(p provider.Provider, cfg config.Config, build BuildInfo) *mcp.Server

Types

type BuildInfo

type BuildInfo struct {
	Version    string
	Commit     string
	Date       string
	SDKVersion string
	Protocol   string
}

type ErrorOutput

type ErrorOutput struct {
	Code              string `json:"code"`
	Message           string `json:"message"`
	Retryable         bool   `json:"retryable"`
	RetryAfterSeconds *int   `json:"retry_after_seconds,omitempty"`
}

type GetPostInput

type GetPostInput struct {
	Post string `json:"post" jsonschema:"canonical public Threads post URL"`
}

type GetPostRepliesInput

type GetPostRepliesInput struct {
	Post  string `json:"post" jsonschema:"canonical public Threads post URL"`
	Limit int    `json:"limit,omitempty" jsonschema:"maximum number of replies"`
}

type GetProfileInput

type GetProfileInput struct {
	Username string `json:"username" jsonschema:"public Threads username"`
}

type GetProfilePostsInput

type GetProfilePostsInput struct {
	Username string `json:"username" jsonschema:"public Threads username"`
	Limit    int    `json:"limit,omitempty" jsonschema:"maximum number of recent posts"`
}

type PostOutput

type PostOutput struct {
	Post  *domain.Post `json:"post,omitempty"`
	Error *ErrorOutput `json:"error,omitempty"`
}

type ProfileOutput

type ProfileOutput struct {
	Profile *domain.Profile `json:"profile,omitempty"`
	Error   *ErrorOutput    `json:"error,omitempty"`
}

type ProfilePostsOutput

type ProfilePostsOutput struct {
	Page  *domain.Page[domain.Post] `json:"result,omitempty"`
	Error *ErrorOutput              `json:"error,omitempty"`
}

type RepliesOutput

type RepliesOutput struct {
	Page  *domain.Page[domain.Reply] `json:"result,omitempty"`
	Error *ErrorOutput               `json:"error,omitempty"`
}

type SearchPostsInput

type SearchPostsInput struct {
	Query string `json:"query" jsonschema:"keyword query containing 1 to 500 Unicode code points after trimming"`
	Limit int    `json:"limit,omitempty" jsonschema:"maximum number of results"`
}

type SearchPostsOutput

type SearchPostsOutput struct {
	Page  *domain.Page[domain.Post] `json:"result,omitempty"`
	Error *ErrorOutput              `json:"error,omitempty"`
}

type ServerInfoOutput

type ServerInfoOutput struct {
	ServerName        string   `json:"server_name"`
	ServerVersion     string   `json:"server_version"`
	Commit            string   `json:"commit"`
	BuildDate         string   `json:"build_date"`
	SDKVersion        string   `json:"sdk_version"`
	ProtocolVersion   string   `json:"protocol_version"`
	ProviderName      string   `json:"provider_name"`
	ProviderVersion   string   `json:"provider_version"`
	ProviderMode      string   `json:"provider_mode"`
	ProviderUserAgent string   `json:"provider_user_agent"`
	SupportedTools    []string `json:"supported_tools"`
	ExcludedTools     []string `json:"excluded_tools"`
	SupportedInputs   []string `json:"supported_inputs"`
	KnownLimitations  []string `json:"known_limitations"`
}

Jump to

Keyboard shortcuts

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