You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: refresh skill and architecture for dual-era and meta envelope
The in-repo skill still showed the pre-1.4.0 flat tools index. Updated it to the meta envelope (servers + meta.errors), clarified that per-server fetch failures live in meta.errors while empty/no-match keeps the top-level error shape, and added a dual-era section covering protocolVersion. Added a dual-era detection note to the AGENTS architecture section. README was already current from the 1.4.0 doc pass.
Copy file name to clipboardExpand all lines: AGENTS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,6 +178,8 @@ type MCPClient interface {
178
178
}
179
179
```
180
180
181
+
**Dual-Era Detection (2026-07-28)**: Each transport auto-detects the server's protocol era on first request (`internal/mcp/era.go`, controlled by the `protocolVersion` config field). Modern servers receive per-request `_meta` and the `MCP-Protocol-Version` / `Mcp-Method` / `Mcp-Name` headers; legacy servers use the `initialize` handshake. The stdio transport owns a single reader goroutine with an id-keyed pending map so request timeouts unregister the waiter instead of leaking a competing reader. Pin a version to skip detection.
Running `mcp-cli-ent` with no args returns a compact index — one `name` + `description` per tool, grouped by server. No params, no call examples, no schema. Use `list-tools <server>` when ready to call.
36
+
Running `mcp-cli-ent` with no args returns a compact index wrapped in a `meta` envelope: `servers` holds the tools (one `name` + `description` per tool, grouped by server), and `meta.errors` lists any server that failed to fetch (skipped, connect failure, or list failure). `meta` is omitted entirely when every server succeeds. No params, no call examples, no schema here. Use `list-tools <server>` when ready to call.
37
37
38
38
```json
39
39
{
40
-
"context7": [
41
-
{ "name": "resolve-library-id", "description": "Resolves a package name to a Context7 library ID" },
{ "error": true, "error_code": "no_tools", "error_description": "No tools found on any server" }
78
97
```
79
98
99
+
Per-server fetch failures (a server skipped, refused to connect, or timed out) do not use this shape. They are reported inline in `meta.errors` of the normal envelope (see above), with the other servers still returned in `servers`.
100
+
80
101
## Flags
81
102
82
103
| Flag | Description |
@@ -89,6 +110,10 @@ Empty results or no matches return structured JSON errors:
Each server speaks one of two MCP eras, auto-detected per server on first contact: **modern** (2026-07-28 stateless protocol, per-request `_meta`) or **legacy** (`initialize` handshake). This is transparent to tool calls. Override it per server in `mcp_servers.json` with `protocolVersion`: `"auto"` (default), `"2026-07-28"`, or a legacy date like `"2025-11-25"`. See the project README for the full field reference.
0 commit comments