Skip to content

Commit 6f68b61

Browse files
committed
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.
1 parent e6d6d64 commit 6f68b61

2 files changed

Lines changed: 36 additions & 9 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ type MCPClient interface {
178178
}
179179
```
180180

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.
182+
181183
### Daemon Architecture
182184

183185
**Location**: `internal/daemon/`

skills/mcp-cli-ent/SKILL.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,36 @@ mcp-cli-ent list-tools context7 --human --verbose
3333

3434
### Bare invocation: Compact Discovery Index
3535

36-
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.
3737

3838
```json
3939
{
40-
"context7": [
41-
{ "name": "resolve-library-id", "description": "Resolves a package name to a Context7 library ID" },
42-
{ "name": "query-docs", "description": "Retrieves up-to-date documentation and code examples" }
43-
],
44-
"deepwiki": [
45-
{ "name": "read_wiki_structure", "description": "Get documentation topics for a GitHub repository" }
46-
]
40+
"servers": {
41+
"context7": [
42+
{ "name": "resolve-library-id", "description": "Resolves a package name to a Context7 library ID" },
43+
{ "name": "query-docs", "description": "Retrieves up-to-date documentation and code examples" }
44+
],
45+
"deepwiki": [
46+
{ "name": "read_wiki_structure", "description": "Get documentation topics for a GitHub repository" }
47+
]
48+
}
49+
}
50+
```
51+
52+
With a failing server the reason appears in `meta.errors` on stdout only (default mode prints nothing to stderr):
53+
54+
```json
55+
{
56+
"meta": {
57+
"errors": {
58+
"deepwiki": "skipped: recently failed; retry in 4m49s or use --refresh"
59+
}
60+
},
61+
"servers": {
62+
"context7": [
63+
{ "name": "resolve-library-id", "description": "Resolves a package name to a Context7 library ID" }
64+
]
65+
}
4766
}
4867
```
4968

@@ -70,13 +89,15 @@ Terse by default (1 line per tool). `--human --verbose` expands to 4-line format
7089

7190
### Error responses
7291

73-
Empty results or no matches return structured JSON errors:
92+
A completely empty result (no tools anywhere, or no search match) returns a top-level structured error:
7493

7594
```json
7695
{ "error": true, "error_code": "no_match", "error_description": "No tools matching 'wiki' found" }
7796
{ "error": true, "error_code": "no_tools", "error_description": "No tools found on any server" }
7897
```
7998

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+
80101
## Flags
81102

82103
| Flag | Description |
@@ -89,6 +110,10 @@ Empty results or no matches return structured JSON errors:
89110
| `--config <path>` | Custom config file path. |
90111
| `--timeout <sec>` | Request timeout (default 30). |
91112

113+
## Protocol Era (Dual-Era 2026-07-28)
114+
115+
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.
116+
92117
## Workflows
93118

94119
### 1. Tool Discovery & Execution

0 commit comments

Comments
 (0)