mcpserver

package
v0.0.0-...-f183970 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package mcpserver exposes ArtifactKit through the official Model Context Protocol Go SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(service *agent.Service, version string) *mcp.Server

func Run

func Run(ctx context.Context, roots []string, reader io.Reader, writer io.Writer) error

Types

type FindInput

type FindInput struct {
	Artifact string `json:"artifact" jsonschema:"Artifact ID or local path."`
	Query    string `json:"query" jsonschema:"Case-insensitive search query; every token must match."`
	Limit    int    `json:"limit,omitempty" jsonschema:"Maximum results; defaults to 20."`
}

type InspectInput

type InspectInput struct {
	Path string `json:"path" jsonschema:"Path to a local artifact under a configured root."`
}

type InspectResourceInput

type InspectResourceInput struct {
	ResourceURI string `json:"resource_uri" jsonschema:"Lazy resource URI returned by artifact_list_attachments."`
}

type ListFilesInput

type ListFilesInput struct {
	Path      string `json:"path" jsonschema:"Directory under a configured root."`
	Recursive bool   `json:"recursive,omitempty" jsonschema:"Include files in descendant directories."`
	Limit     int    `json:"limit,omitempty" jsonschema:"Maximum files; defaults to 200 and cannot exceed 2000."`
}

type ProvenanceInput

type ProvenanceInput struct {
	Artifact string `json:"artifact" jsonschema:"Artifact ID or local path."`
	NodeID   string `json:"node_id" jsonschema:"Deterministic node ID."`
}

type ReadInput

type ReadInput struct {
	Artifact    string `json:"artifact,omitempty" jsonschema:"Artifact ID or path; required for node reads."`
	NodeID      string `json:"node_id,omitempty" jsonschema:"Node ID to read. Set either node_id or resource_uri."`
	ResourceURI string `` /* 128-byte string literal not displayed */
	Offset      int64  `json:"offset,omitempty" jsonschema:"Character offset for nodes or byte offset for resources."`
	Limit       int64  `json:"limit,omitempty" jsonschema:"Characters or bytes to return; a safe default is used when omitted."`
}

type ReadOutput

type ReadOutput struct {
	Kind     string          `json:"kind"`
	Node     *agent.NodeView `json:"node,omitempty"`
	Resource *ResourceView   `json:"resource,omitempty"`
}

type ReferenceInput

type ReferenceInput struct {
	Artifact string `json:"artifact" jsonschema:"Artifact ID returned by artifact_inspect, or a local path under a configured root."`
}

type ResourceView

type ResourceView struct {
	URI       string `json:"uri"`
	Name      string `json:"name"`
	MediaType string `json:"media_type,omitempty"`
	Size      int64  `json:"size"`
	Offset    int64  `json:"offset"`
	EOF       bool   `json:"eof"`
	Encoding  string `json:"encoding"`
	Content   string `json:"content"`
}

type TableInput

type TableInput struct {
	Artifact string `json:"artifact" jsonschema:"Artifact ID or local path."`
	Table    string `json:"table,omitempty" jsonschema:"Table or sheet node ID, table name, or blank for the first table."`
	Offset   int    `json:"offset,omitempty" jsonschema:"Zero-based data-row offset, excluding the header row."`
	Limit    int    `json:"limit,omitempty" jsonschema:"Maximum data rows; defaults to 50 and cannot exceed 500."`
}

Jump to

Keyboard shortcuts

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