hosted

package
v0.7.114 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package hosted is the knowledge-only mode: game-data tools answered from a dataset published at a URL, read over HTTP range requests, with no character tools and no capture access.

Index

Constants

View Source
const NotAvailable = "not available in knowledge-only mode: this server holds game data only, and reads no character files"

NotAvailable is what a character tool answers in knowledge-only mode.

Variables

View Source
var CharacterTools = []string{"list_characters", "character_brief", "whats_next", "upgrade_finder", "upgrade_paths", "stat_check", "profession_plan", "where_to_learn", "where_to_gather", "find_vendor", "travel_route",
	"talent_plan", "talent_tree", "get_character_profile", "set_character_profile", "dungeon_plan", "farm_spots", "quest_chain", "quest_plan", "inventory_review", "seasonal_events", "bags_across_characters", "update_digest", "doctor"}

CharacterTools are the full server's tools that read the character capture or local files.

View Source
var ErrTooLarge = errors.New("response larger than the size cap")

ErrTooLarge means a response is bigger than Limits.MaxResponseBytes.

View Source
var RequiredTables = []string{"items", "quests", "npcs", "loot_sources", "instances", "instance_bosses", "recipes", "recipe_reagents", "quest_lines"}

RequiredTables are the tables the knowledge tools read.

Functions

func New

func New(d *Dataset) *mcp.Server

New builds the knowledge-only server: the tools above and nothing that reads a character file. A call to a character tool is answered with NotAvailable, not listed.

Types

type Dataset

type Dataset struct {
	Base     string
	Manifest dataset.Manifest
	Store    *store.ParquetStore
	Limits   Limits
	// contains filtered or unexported fields
}

Dataset is a remote dataset opened over range requests.

func Open

func Open(ctx context.Context, base string, lim Limits) (*Dataset, error)

Open loads manifest.json from base, checks it, confirms every listed table is served with range support and a readable Parquet footer. Hashes are not checked: that would download every table; the manifest and tables must come over a trusted channel (HTTPS).

func (*Dataset) Describe

func (d *Dataset) Describe() Info

Describe reports on this server and its dataset.

func (*Dataset) Requests

func (d *Dataset) Requests() int64

Requests is the number of HTTP requests made to the dataset host so far.

type DungeonInput

type DungeonInput struct {
	MapID int64  `json:"map_id,omitempty" jsonschema:"map id"`
	Name  string `json:"name,omitempty" jsonschema:"dungeon or raid name, or part of it"`
}

DungeonInput is the dungeon_info argument.

type IDNameInput

type IDNameInput struct {
	ID   int64  `json:"id,omitempty" jsonschema:"id"`
	Name string `json:"name,omitempty" jsonschema:"name, or part of it (npcs only)"`
}

IDNameInput is the quest_lookup and npc_lookup argument.

type Info

type Info struct {
	Version         string `json:"version"`
	Mode            string `json:"mode"`
	Dataset         string `json:"dataset" jsonschema:"dataset URL, without credentials"`
	ManifestVersion string `json:"manifest_version"`
	GameBuild       string `json:"game_build"`
	Tables          int    `json:"tables"`
	TimeoutMS       int64  `json:"request_timeout_ms"`
	MaxResponse     int64  `json:"max_response_bytes"`
	MaxConcurrent   int    `json:"max_concurrent_requests"`
}

Info is the server_info result.

type ItemInput

type ItemInput struct {
	ID   int64  `json:"id,omitempty" jsonschema:"item id"`
	Name string `json:"name,omitempty" jsonschema:"item name, exact or part of it"`
}

ItemInput is the item_lookup and where_drops argument; give an id or a name.

type Limits

type Limits struct {
	Timeout          time.Duration // per HTTP request, headers and body
	MaxResponseBytes int64         // per HTTP response body
	MaxConcurrent    int           // HTTP requests in flight at once
}

Limits bound what one request to the dataset host may cost.

func DefaultLimits

func DefaultLimits() Limits

DefaultLimits suit a static file host: tables are a few hundred kilobytes.

type RecipeInput

type RecipeInput struct {
	SpellID int64  `json:"spell_id,omitempty" jsonschema:"recipe spell id"`
	Name    string `json:"name,omitempty" jsonschema:"recipe name, or part of it"`
}

RecipeInput is the recipe_lookup argument.

type Result

type Result struct {
	Rows []store.Row `json:"rows"`
	Text string      `json:"text"`
}

Result is what every lookup returns: the rows found and their plain-text rendering.

Jump to

Keyboard shortcuts

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