client

command
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 11 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

Command client consumes MCP servers as weft tools: it connects two in-memory servers concurrently under one deadline, imports their tools with per-server prefixes, registers them on a scripted agent, runs it, and prints the manifest — the imported tools' raw schemas show in it. Swap the in-memory transports for real ones (stdio, HTTP) and nothing else changes.

The connection fan-in here uses a WaitGroup and a shared deadline because this module imports only the core, the SDK, and stdlib; in your own code an errgroup with context is the one-liner shape:

g, ctx := errgroup.WithContext(ctx)
// g.Go(func() error { sess, err := client.Connect(ctx, t, nil); ... })

Jump to

Keyboard shortcuts

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