Repository navigation
v0.1.15
Faster schema copies
op.cloneSchemanow uses a reflective deep copy instead of a JSON round trip. Copies stay fully independent: every slice, map, pointer andjson.RawMessageis copied.mcp.NewServerandapi.Handlerreuse each entry's cached schema copies instead of copying every schema for each server, handler or call. The cache is held weakly, so it never keeps a registry alive.GET /openapi.jsonbuilds the document per request from current entries, soop.Addand metadata edits still show up immediately.InputSchema(),OutputSchema()andOpenAPI()still return caller-owned copies. No public API changes and no expected golden changes.
Tools with many large operations get much faster tests: mercury's -race ops pass drops from about 265s to 73s.
Full change: #25