mcp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Advisory content checks. Captions are user-generated data, and a transcript can contain text that reads like an instruction to the agent. yt never obeys it; these warnings simply surface the shape so the caller can quote rather than act.

Package mcp exposes the yt tools over stdio via the official Go SDK.

Design notes for agents:

  • The transcript body deliberately appears twice: once in textContent (for clients that read content blocks) and again in structuredContent (structuredContent.text for format=text, structuredContent.segments for format=json). Both copies are identical; returned_chars reports the body size in runes, so a client can sanity-check the copy it received. A client that silently receives no transcript is worse than a duplicated payload.
  • Truncation is reported in the header line AND in structured metadata, not in a trailing footer that a client would cut off.
  • Regions are addressed with start_seconds/end_seconds and start_cue/max_cues, never with opaque cursors.
  • Errors are typed (code/retryable/suggestion) and returned as IsError results with a structured payload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(client *youtube.Client) error

Run serves the yt tools over stdio until the client disconnects.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server adapts a YouTube client to MCP tools.

func NewServer

func NewServer(client *youtube.Client) *Server

NewServer returns an MCP server backed by client.

Jump to

Keyboard shortcuts

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