mcpserver

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 24 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 mcpserver exposes the NotebookLM domain client as MCP tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(d Deps, toolProfile string) *mcp.Server

New builds the MCP server with the tools enabled by toolProfile ("default", "minimal" or "all").

Types

type AccountSettingsIn

type AccountSettingsIn struct {
	OutputLanguage string `json:"output_language,omitempty" jsonschema:"language code to set, for example en or de; omit to only read"`
}

type AccountSettingsOut

type AccountSettingsOut struct {
	Quota          nlm.Quota `json:"quota"`
	OutputLanguage string    `json:"output_language,omitempty"`
	LanguageSet    bool      `json:"language_set,omitempty"`
}

type AskManyResult

type AskManyResult struct {
	Notebook       string        `json:"notebook"`
	NotebookID     string        `json:"notebook_id,omitempty"`
	Status         string        `json:"status"` // ok|failed
	Answer         string        `json:"answer,omitempty"`
	Citations      []CitationOut `json:"citations,omitempty"`
	ConversationID string        `json:"conversation_id,omitempty"`
	Error          string        `json:"error,omitempty"`
	Code           string        `json:"code,omitempty"`
}

type AudioOptions added in v0.2.0

type AudioOptions struct {
	Format string `json:"format,omitempty" jsonschema:"audio format"`
	Length string `json:"length,omitempty" jsonschema:"audio length"`
}

The option objects of studio_generate. Their schema enums list only the values pinned by a live capture (filled in from nlm.StudioOptions); other values the web app offers return UNSUPPORTED_BY_TRANSPORT.

type AuthLoginIn

type AuthLoginIn struct {
	Method  string `json:"method" jsonschema:"import (cookies or file), browser or attach"`
	Profile string `json:"profile,omitempty" jsonschema:"account profile name"`
	Host    string `json:"host,omitempty" jsonschema:"NotebookLM host, for example notebook.google.com"`
	File    string `json:"file,omitempty" jsonschema:"path of a cookie export file (method import)"`
}

type AuthLogoutIn

type AuthLogoutIn struct {
	Profile string `json:"profile,omitempty" jsonschema:"account profile name"`
	Confirm bool   `json:"confirm,omitempty" jsonschema:"must be true to delete the stored session"`
}

type AuthOut

type AuthOut struct {
	Status string `json:"status"`
}

type ChatAskIn

type ChatAskIn struct {
	Notebook        string   `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Question        string   `json:"question" jsonschema:"the question to ask"`
	Sources         []string `json:"sources,omitempty" jsonschema:"restrict the answer to these sources (id, id prefix or title); default all sources"`
	ConversationID  string   `json:"conversation_id,omitempty" jsonschema:"continue this conversation; default is the notebook's newest thread"`
	NewConversation bool     `json:"new_conversation,omitempty" jsonschema:"start a fresh conversation instead of the default thread"`
	Wait            *bool    `json:"wait,omitempty" jsonschema:"wait for the answer (default true); false returns a job_id to poll with chat_status"`
	SaveAsNote      bool     `` /* 143-byte string literal not displayed */
}

type ChatAskManyIn

type ChatAskManyIn struct {
	Question    string   `json:"question" jsonschema:"the question to ask every notebook"`
	Notebooks   []string `json:"notebooks,omitempty" jsonschema:"notebook ids, id prefixes or titles"`
	Tag         string   `json:"tag,omitempty" jsonschema:"not available yet: local tags are not implemented"`
	MaxParallel int      `json:"max_parallel,omitempty" jsonschema:"notebooks asked at once (default 3, max 10)"`
}

type ChatAskManyOut

type ChatAskManyOut struct {
	Question  string          `json:"question"`
	Asked     int             `json:"asked"`
	Succeeded int             `json:"succeeded"`
	Failed    int             `json:"failed"`
	Results   []AskManyResult `json:"results"`
}

type ChatAskOut

type ChatAskOut struct {
	Answer         string        `json:"answer,omitempty"`
	Citations      []CitationOut `json:"citations,omitempty"`
	ConversationID string        `json:"conversation_id,omitempty"`
	ResponseID     string        `json:"response_id,omitempty"`
	JobID          string        `json:"job_id,omitempty"`
	Status         string        `json:"status,omitempty"`
	// NoteID and NoteTitle name the note save_as_note created; NoteError
	// says why it was not created (the answer is returned either way).
	NoteID    string `json:"note_id,omitempty"`
	NoteTitle string `json:"note_title,omitempty"`
	NoteError string `json:"note_error,omitempty"`
}

type ChatConfigureIn

type ChatConfigureIn struct {
	Notebook       string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Mode           string `json:"mode,omitempty" jsonschema:"conversational goal; custom needs custom_prompt"`
	CustomPrompt   string `json:"custom_prompt,omitempty" jsonschema:"instructions for mode custom, up to 10000 characters"`
	ResponseLength string `json:"response_length,omitempty" jsonschema:"response length"`
}

type ChatConfigureOut

type ChatConfigureOut struct {
	Notebook string `json:"notebook"`
	Mode     string `json:"mode,omitempty"`
	Length   string `json:"response_length,omitempty"`
	Updated  bool   `json:"updated"`
}

type ChatHistoryIn

type ChatHistoryIn struct {
	Notebook       string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	ConversationID string `json:"conversation_id,omitempty" jsonschema:"conversation to read; default is the newest thread"`
	Limit          int    `json:"limit,omitempty" jsonschema:"max turns per page (default 20)"`
	Cursor         string `json:"cursor,omitempty" jsonschema:"next_cursor of the previous page (older turns)"`
	Format         string `json:"format,omitempty" jsonschema:"json (default) or markdown"`
}

type ChatHistoryOut

type ChatHistoryOut struct {
	ConversationID string     `json:"conversation_id,omitempty"`
	Turns          []nlm.Turn `json:"turns,omitempty"`
	NextCursor     string     `json:"next_cursor,omitempty"`
	Markdown       string     `json:"markdown,omitempty"`
}

type ChatStatusIn

type ChatStatusIn struct {
	JobID string `json:"job_id" jsonschema:"job id returned by chat_ask with wait=false"`
}

type ChatStatusOut

type ChatStatusOut struct {
	JobID   string    `json:"job_id"`
	Kind    string    `json:"kind"`
	Status  string    `json:"status"`
	Result  any       `json:"result,omitempty"`
	Error   string    `json:"error,omitempty"`
	Started time.Time `json:"started"`
}

type CitationOut

type CitationOut struct {
	N           int    `json:"n"`
	SourceID    string `json:"source_id"`
	SourceTitle string `json:"source_title,omitempty"`
	Text        string `json:"text,omitempty"`
	Start       int    `json:"start"`
	End         int    `json:"end"`
}

CitationOut is one cited passage. Start and End are UTF-16 code unit offsets into the answer text.

type DeleteIn

type DeleteIn struct {
	Kind     string   `json:"kind" jsonschema:"notebook, source, note, artifact, chat_history, label or collection"`
	Notebook string   `json:"notebook,omitempty" jsonschema:"notebook id, prefix or title; required for every kind except notebook"`
	IDs      []string `json:"ids" jsonschema:"ids (or exact titles) of the items to delete; for chat_history, conversation ids"`
	Confirm  bool     `json:"confirm,omitempty" jsonschema:"must be true to delete; without it only a preview is returned"`
}

type DeleteItem

type DeleteItem struct {
	ID    string `json:"id"`
	Title string `json:"title,omitempty"`
	// Conversations (kind chat_history) have no title: their times and,
	// when the whole history could be read, the first question are shown.
	Created       time.Time `json:"created,omitzero"`
	Updated       time.Time `json:"updated,omitzero"`
	FirstQuestion string    `json:"first_question,omitempty"`
	Status        string    `json:"status,omitempty"` // deleted | failed | unsupported (empty in a preview)
	Error         string    `json:"error,omitempty"`
}

type DeleteOut

type DeleteOut struct {
	Status   string       `json:"status"` // preview | deleted | partial
	Kind     string       `json:"kind"`
	Items    []DeleteItem `json:"items"`
	Guidance string       `json:"guidance,omitempty"`
}

type Deps

type Deps struct {
	Jobs    *jobs.Table // detached work (chat_ask wait=false); nil = jobs disabled
	NLM     *nlm.Client
	Cache   *cache.Cache
	Profile string // account profile name
	Host    session.Host
}

Deps are the server's collaborators.

type DriveItem

type DriveItem struct {
	DocumentID string `json:"document_id" jsonschema:"Google Drive file id"`
	MIME       string `json:"mime,omitempty" jsonschema:"Drive MIME type"`
}

type Envelope

type Envelope struct {
	Status      string   `json:"status"`
	Error       string   `json:"error"`
	Code        string   `json:"code"`
	Retriable   bool     `json:"retriable"`
	Guidance    string   `json:"guidance,omitempty"`
	Suggestions []string `json:"suggestions,omitempty"`
	Transport   string   `json:"transport,omitempty"`
	// RetryAfterSeconds is Google's Retry-After, rounded up; 0 when absent.
	RetryAfterSeconds int `json:"retry_after_seconds,omitzero"`
}

Envelope is the error body of every failed tool call. It is sent as the JSON text content of an IsError result, so agents can branch on Code.

type FileItem

type FileItem struct {
	Path string `json:"path" jsonschema:"local file path"`
}

type FlashcardsOptions added in v0.2.0

type FlashcardsOptions struct {
	Quantity   string `json:"quantity,omitempty" jsonschema:"number of cards"`
	Difficulty string `json:"difficulty,omitempty" jsonschema:"card difficulty"`
	Images     string `json:"images,omitempty" jsonschema:"card images"`
}

type ImportOutcome

type ImportOutcome struct {
	Title    string `json:"title,omitempty"`
	URL      string `json:"url,omitempty"`
	SourceID string `json:"source_id,omitempty"`
	Status   string `json:"status"` // added|skipped|failed
	Error    string `json:"error,omitempty"`
}

type InfographicOptions added in v0.2.0

type InfographicOptions struct {
	Orientation string `json:"orientation,omitempty" jsonschema:"page orientation"`
	Detail      string `json:"detail,omitempty" jsonschema:"level of detail"`
	Style       string `json:"style,omitempty" jsonschema:"visual style"`
}

type JobCancelIn

type JobCancelIn struct {
	JobID string `json:"job_id" jsonschema:"job id to cancel"`
}

type JobCancelOut

type JobCancelOut struct {
	JobID     string `json:"job_id"`
	Cancelled bool   `json:"cancelled"`
	Status    string `json:"status"`
	Note      string `json:"note,omitempty"`
}

type JobView

type JobView struct {
	ID         string          `json:"id"`
	AltID      string          `json:"alt_id,omitempty"`
	Mode       string          `json:"mode"`
	Query      string          `json:"query,omitempty"`
	Status     int             `json:"status"`
	Done       bool            `json:"done"`
	Candidates []nlm.Candidate `json:"candidates,omitempty"`
	Report     string          `json:"report,omitempty"`
}

type LabelListIn

type LabelListIn struct {
	Notebook string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Scope    string `json:"scope,omitempty" jsonschema:"source_labels (default); collections are not available yet"`
}

type LabelListOut

type LabelListOut struct {
	Labels []nlm.Label `json:"labels"`
	Total  int         `json:"total"`
}

type LabelUpdateIn

type LabelUpdateIn struct {
	Notebook string   `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Scope    string   `json:"scope,omitempty" jsonschema:"source_labels (default)"`
	Action   string   `json:"action" jsonschema:"rename, set_emoji, add_sources or remove_sources (auto and create are not available yet)"`
	Label    string   `json:"label" jsonschema:"label id or name"`
	Name     string   `json:"name,omitempty" jsonschema:"new name for rename"`
	Emoji    string   `json:"emoji,omitempty" jsonschema:"emoji for set_emoji"`
	Items    []string `json:"items,omitempty" jsonschema:"source ids, id prefixes or titles for add_sources / remove_sources"`
}

type LabelUpdateOut

type LabelUpdateOut struct {
	Status string `json:"status"`
	Label  string `json:"label"`
	Action string `json:"action"`
}

type NoteListIn

type NoteListIn struct {
	Notebook        string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	IncludeMindMaps bool   `json:"include_mind_maps,omitempty" jsonschema:"accepted for compatibility; mind maps are not listed yet"`
}

type NoteListOut

type NoteListOut struct {
	Notes []nlm.Note `json:"notes"`
	Total int        `json:"total"`
}

type NoteSaveIn

type NoteSaveIn struct {
	Notebook string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Note     string `json:"note,omitempty" jsonschema:"existing note id or title to update; omit to create a new note"`
	Title    string `json:"title,omitempty" jsonschema:"note title"`
	Content  string `json:"content,omitempty" jsonschema:"note body"`
	FromTurn string `json:"from_turn,omitempty" jsonschema:"save a chat turn as a note (not available yet)"`
}

type NotebookCreateIn

type NotebookCreateIn struct {
	Title   string       `json:"title" jsonschema:"title of the new notebook"`
	Emoji   string       `json:"emoji,omitempty" jsonschema:"notebook emoji (ignored: no known wire slot yet)"`
	Sources []SourceItem `json:"sources,omitempty" jsonschema:"sources to add right after creation; same items as source_add"`
}

type NotebookCreateOut

type NotebookCreateOut struct {
	NotebookID string        `json:"notebook_id"`
	Title      string        `json:"title,omitempty"`
	Sources    *SourceAddOut `json:"sources,omitempty"`
	Warnings   []string      `json:"warnings,omitempty"`
}

type NotebookListIn

type NotebookListIn struct {
	Query   string `json:"query,omitempty" jsonschema:"case-insensitive filter on notebook titles"`
	Scope   string `json:"scope,omitempty" jsonschema:"mine, shared or all (default all)"`
	Limit   int    `json:"limit,omitempty" jsonschema:"max notebooks to return (default 20; page with offset)"`
	Offset  int    `json:"offset,omitempty" jsonschema:"skip this many notebooks"`
	Refresh bool   `json:"refresh,omitempty" jsonschema:"bypass the 30 s cache"`
}

type NotebookListOut

type NotebookListOut struct {
	Notebooks []nlm.Notebook `json:"notebooks"`
	Total     int            `json:"total"`
	// HasMore is set when notebooks after this page match too.
	HasMore bool `json:"has_more"`
}

type NotebookOpenIn

type NotebookOpenIn struct {
	Notebook string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
}

type NotebookUpdateIn

type NotebookUpdateIn struct {
	Notebook         string   `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Title            string   `json:"title,omitempty" jsonschema:"new title"`
	RemoveFromRecent bool     `json:"remove_from_recent,omitempty" jsonschema:"drop the notebook from the recently viewed list"`
	Emoji            string   `json:"emoji,omitempty" jsonschema:"not available yet (ignored)"`
	Pinned           *bool    `json:"pinned,omitempty" jsonschema:"not available yet (ignored)"`
	Alias            string   `json:"alias,omitempty" jsonschema:"not available yet (ignored)"`
	Tags             []string `json:"tags,omitempty" jsonschema:"not available yet (ignored)"`
}

type NotebookUpdateOut

type NotebookUpdateOut struct {
	NotebookID        string   `json:"notebook_id"`
	Renamed           bool     `json:"renamed,omitempty"`
	RemovedFromRecent bool     `json:"removed_from_recent,omitempty"`
	Notes             []string `json:"notes,omitempty"`
}

type Progress

type Progress func(message string, progress, total float64)

Progress reports work done so far. It is a no-op when the client sent no progress token. progress must increase on every call (MCP spec).

type QuizOptions added in v0.2.0

type QuizOptions struct {
	Quantity   string `json:"quantity,omitempty" jsonschema:"number of questions"`
	Difficulty string `json:"difficulty,omitempty" jsonschema:"question difficulty"`
}

type ReportOptions added in v0.2.0

type ReportOptions struct {
	Title       string `json:"title,omitempty" jsonschema:"report title (required), for example from suggest surface report"`
	Description string `json:"description,omitempty" jsonschema:"report description (required), for example from suggest surface report"`
}

type ResearchImportIn

type ResearchImportIn struct {
	Notebook string   `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Job      string   `json:"job" jsonschema:"research job id from research_start or research_status"`
	URLs     []string `json:"urls,omitempty" jsonschema:"URLs of the web candidates to import, as listed by research_status"`
	Report   bool     `json:"report,omitempty" jsonschema:"also import the deep-research report candidate"`
	All      bool     `json:"all,omitempty" jsonschema:"import every candidate"`
}

ResearchImportIn picks candidates by URL. Positions are not accepted: poll rows carry no result id and the server may reorder or add results between research_status and research_import, so an index read earlier can name a different result now.

type ResearchImportOut

type ResearchImportOut struct {
	Notebook string          `json:"notebook"`
	Added    int             `json:"added"`
	Skipped  int             `json:"skipped"`
	Failed   int             `json:"failed"`
	Results  []ImportOutcome `json:"results"`
}

type ResearchStartIn

type ResearchStartIn struct {
	Notebook string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Query    string `json:"query" jsonschema:"what to research; at least 4 words unless force is set"`
	Mode     string `json:"mode,omitempty" jsonschema:"fast (default) or deep; discover is not yet available"`
	Corpus   string `json:"corpus,omitempty" jsonschema:"web (default) or drive; deep supports web only"`
	Force    bool   `json:"force,omitempty" jsonschema:"allow a query shorter than 4 words"`
}

type ResearchStartOut

type ResearchStartOut struct {
	Notebook string          `json:"notebook"`
	Job      nlm.ResearchJob `json:"job"`
}

type ResearchStatusIn

type ResearchStatusIn struct {
	Notebook      string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Job           string `json:"job,omitempty" jsonschema:"research job id; omit for all jobs of the notebook"`
	WaitSeconds   int    `json:"wait_seconds,omitempty" jsonschema:"0-120: poll every 3 s until the job is done or time runs out"`
	IncludeReport bool   `json:"include_report,omitempty" jsonschema:"include the deep-research report text"`
}

type ResearchStatusOut

type ResearchStatusOut struct {
	Notebook string    `json:"notebook"`
	Jobs     []JobView `json:"jobs"`
	Done     bool      `json:"done"`
}

type ServerInfoIn

type ServerInfoIn struct {
	IncludeUsage bool `json:"include_usage,omitempty" jsonschema:"also fetch account tier and quota windows (one Google call)"`
}

type ServerInfoOut

type ServerInfoOut struct {
	Name          string     `json:"name"`
	Version       string     `json:"version"`
	Profile       string     `json:"profile"`
	Host          string     `json:"host"`
	ToolProfile   string     `json:"tool_profile"`
	Tools         []string   `json:"tools"`
	LastTransport string     `json:"last_transport,omitempty"`
	Usage         *nlm.Quota `json:"usage,omitempty"`
}

type SharePartOut

type SharePartOut struct {
	Part    string   `json:"part"`   // link | users
	Status  string   `json:"status"` // applied | failed
	Changes []string `json:"changes"`
	Error   string   `json:"error,omitempty"`
}

SharePartOut is the outcome of one of the two sharing calls (link setting, users) and the changes it carried.

type ShareStatusIn

type ShareStatusIn struct {
	Notebook string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
}

type ShareUpdateIn

type ShareUpdateIn struct {
	Notebook  string            `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Public    *bool             `json:"public,omitempty" jsonschema:"true = anyone with the link can view, false = restricted"`
	Users     []ShareUserChange `json:"users,omitempty" jsonschema:"per-user changes"`
	Notify    bool              `json:"notify,omitempty" jsonschema:"email the added people"`
	Message   string            `json:"message,omitempty" jsonschema:"message to include in the notification"`
	ViewLevel string            `json:"view_level,omitempty" jsonschema:"full or chat_only (not available yet)"`
	Artifact  string            `json:"artifact,omitempty" jsonschema:"share one artifact instead of the notebook (not available yet)"`
	Confirm   bool              `json:"confirm,omitempty" jsonschema:"required to widen access or remove people; without it only a preview is returned"`
}

type ShareUpdateOut

type ShareUpdateOut struct {
	Status          string         `json:"status"` // preview | applied | partial
	NotebookID      string         `json:"notebook_id"`
	NotebookTitle   string         `json:"notebook_title,omitempty"`
	RequiresConfirm bool           `json:"requires_confirm,omitempty"`
	Changes         []string       `json:"changes"`
	Parts           []SharePartOut `json:"parts,omitempty"`
	Guidance        string         `json:"guidance,omitempty"`
}

type ShareUserChange

type ShareUserChange struct {
	Email string `json:"email" jsonschema:"collaborator email"`
	Role  string `json:"role" jsonschema:"viewer, editor or remove"`
}

type SlideDeckOptions added in v0.2.0

type SlideDeckOptions struct {
	Format string `json:"format,omitempty" jsonschema:"slide deck format"`
	Length string `json:"length,omitempty" jsonschema:"slide deck length"`
}

type SourceAddIn

type SourceAddIn struct {
	Notebook string       `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Items    []SourceItem `json:"items" jsonschema:"sources to add; each item sets exactly one of url, text, drive, file"`
}

type SourceAddOut

type SourceAddOut struct {
	Notebook  string          `json:"notebook"`
	Requested int             `json:"requested"`
	Succeeded int             `json:"succeeded"`
	Failed    int             `json:"failed"`
	Pending   int             `json:"pending"`
	Results   []SourceOutcome `json:"results"`
}

type SourceItem

type SourceItem struct {
	URL   string     `json:"url,omitempty" jsonschema:"public http(s) page or YouTube video URL (YouTube is auto-detected)"`
	Text  *TextItem  `json:"text,omitempty" jsonschema:"pasted text source"`
	Drive *DriveItem `json:"drive,omitempty" jsonschema:"Google Drive document (not yet available)"`
	File  *FileItem  `json:"file,omitempty" jsonschema:"local file upload (not yet available)"`
}

type SourceListIn

type SourceListIn struct {
	Notebook string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Status   string `json:"status,omitempty" jsonschema:"filter: processing, ready, error, preparing or a raw status number"`
}

type SourceListOut

type SourceListOut struct {
	Sources []SourceView `json:"sources"`
	Total   int          `json:"total"`
}

type SourceOutcome

type SourceOutcome struct {
	Index    int    `json:"index"`
	SourceID string `json:"source_id,omitempty"`
	Status   string `json:"status"` // added|pending|failed
	Error    string `json:"error,omitempty"`
}

type SourceReadIn

type SourceReadIn struct {
	Notebook string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Source   string `json:"source" jsonschema:"source id, id prefix or title"`
	Mode     string `json:"mode,omitempty" jsonschema:"fulltext (default), markdown, or guide (the source guide: summary as text plus keywords)"`
	Offset   int    `json:"offset,omitempty" jsonschema:"character offset to start from"`
	MaxChars int    `json:"max_chars,omitempty" jsonschema:"max characters to return (default 20000, cap 200000)"`
}

type SourceReadOut

type SourceReadOut struct {
	SourceID   string `json:"source_id"`
	Text       string `json:"text"`
	Offset     int    `json:"offset"`
	TotalChars int    `json:"total_chars"`
	Truncated  bool   `json:"truncated"`
	NextOffset int    `json:"next_offset,omitempty"`
	// Keywords is set in mode guide only; Text is then the guide's summary.
	Keywords []string `json:"keywords,omitempty"`
}

type SourceUpdateIn

type SourceUpdateIn struct {
	Notebook       string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Source         string `json:"source" jsonschema:"source id, id prefix or title"`
	Title          string `json:"title,omitempty" jsonschema:"new title"`
	Refresh        bool   `json:"refresh,omitempty" jsonschema:"re-fetch the source (not yet available)"`
	CheckFreshness bool   `json:"check_freshness,omitempty" jsonschema:"report whether the source is up to date"`
}

type SourceUpdateOut

type SourceUpdateOut struct {
	SourceID string `json:"source_id"`
	Renamed  bool   `json:"renamed,omitempty"`
	Fresh    *bool  `json:"fresh,omitempty"`
}

type SourceView

type SourceView struct {
	nlm.Source
	StatusName string `json:"status_name"`
}

type StudioGenerateIn

type StudioGenerateIn struct {
	Notebook     string   `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Kind         string   `json:"kind" jsonschema:"the artifact kind"`
	Sources      []string `` /* 126-byte string literal not displayed */
	Instructions string   `` /* 252-byte string literal not displayed */
	Language     string   `json:"language,omitempty" jsonschema:"output language code as the web app sends it (default en; cinematic video takes none)"`

	Audio       *AudioOptions       `json:"audio,omitempty" jsonschema:"options for kind audio"`
	Video       *VideoOptions       `json:"video,omitempty" jsonschema:"options for kind video"`
	Report      *ReportOptions      `json:"report,omitempty" jsonschema:"options for kind report (required)"`
	SlideDeck   *SlideDeckOptions   `json:"slide_deck,omitempty" jsonschema:"options for kind slide_deck"`
	Quiz        *QuizOptions        `json:"quiz,omitempty" jsonschema:"options for kind quiz"`
	Flashcards  *FlashcardsOptions  `json:"flashcards,omitempty" jsonschema:"options for kind flashcards"`
	Infographic *InfographicOptions `json:"infographic,omitempty" jsonschema:"options for kind infographic"`
}

type StudioListIn

type StudioListIn struct {
	Notebook string `json:"notebook" jsonschema:"notebook id, id prefix (6+ chars) or title"`
	Artifact string `json:"artifact,omitempty" jsonschema:"one artifact id or title; returns it with its interactive content when available"`
	Kind     string `` /* 184-byte string literal not displayed */
	Status   string `json:"status,omitempty" jsonschema:"filter by status: pending (queued or generating), ready or failed"`
}

type StudioListOut

type StudioListOut struct {
	Artifacts []nlm.Artifact       `json:"artifacts"`
	Total     int                  `json:"total"`
	Content   *nlm.ArtifactContent `json:"content,omitempty"`
}

type SuggestIn

type SuggestIn struct {
	Notebook string   `json:"notebook,omitempty" jsonschema:"notebook id, id prefix or title (not needed for studio_options)"`
	Surface  string   `json:"surface" jsonschema:"chat, followups, report or studio_options"`
	Sources  []string `json:"sources,omitempty" jsonschema:"limit to these sources (id, id prefix or title)"`
	Query    string   `json:"query,omitempty" jsonschema:"steer chat suggestions toward this topic"`
}

type SuggestOut

type SuggestOut struct {
	Suggestions []nlm.Suggestion `json:"suggestions"`
}

type TextItem

type TextItem struct {
	Title   string `json:"title" jsonschema:"title shown for the pasted text source"`
	Content string `json:"content" jsonschema:"the text to add"`
}

type VideoOptions added in v0.2.0

type VideoOptions struct {
	Format        string `json:"format,omitempty" jsonschema:"video format"`
	GenerateLater bool   `` /* 170-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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