Skip to content

Commit 108b923

Browse files
committed
docs(tools): Add real response examples, fix wrong parameter names
why: Tool pages had request-only examples with no response shapes. Three examples also had wrong parameter names that would fail if copied. what: - Add response examples to 12 tool entries across 4 pages - Responses derived from real MCP outputs on isolated test socket - Fix search_panes example: "query" → "pattern" - Fix wait_for_text example: "text" → "pattern" - Fix split_window example: "horizontal" → "right"
1 parent b2bb9d4 commit 108b923

4 files changed

Lines changed: 185 additions & 6 deletions

File tree

docs/tools/options.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ history size, status bar settings, etc.
2121
}
2222
```
2323

24+
Response:
25+
26+
```json
27+
{
28+
"option": "history-limit",
29+
"value": "2000"
30+
}
31+
```
32+
2433
```{fastmcp-tool-input} option_tools.show_option
2534
```
2635

@@ -58,6 +67,16 @@ enabling mouse support, changing status bar format.
5867
}
5968
```
6069

70+
Response:
71+
72+
```json
73+
{
74+
"option": "history-limit",
75+
"value": "50000",
76+
"status": "set"
77+
}
78+
```
79+
6180
```{fastmcp-tool-input} option_tools.set_option
6281
```
6382

docs/tools/panes.md

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,26 @@ after running a command, checking output, or verifying state.
2020
{
2121
"tool": "capture_pane",
2222
"arguments": {
23-
"session_name": "dev",
23+
"pane_id": "%0",
2424
"start": -50
2525
}
2626
}
2727
```
2828

29+
Response (string):
30+
31+
```text
32+
$ echo "Running tests..."
33+
Running tests...
34+
$ echo "PASS: test_auth (0.3s)"
35+
PASS: test_auth (0.3s)
36+
$ echo "FAIL: test_upload (AssertionError)"
37+
FAIL: test_upload (AssertionError)
38+
$ echo "3 tests: 2 passed, 1 failed"
39+
3 tests: 2 passed, 1 failed
40+
$
41+
```
42+
2943
```{fastmcp-tool-input} pane_tools.capture_pane
3044
```
3145

@@ -64,12 +78,33 @@ directly.
6478
{
6579
"tool": "search_panes",
6680
"arguments": {
67-
"query": "error",
81+
"pattern": "FAIL",
6882
"session_name": "dev"
6983
}
7084
}
7185
```
7286

87+
Response:
88+
89+
```json
90+
[
91+
{
92+
"pane_id": "%0",
93+
"pane_current_command": "zsh",
94+
"pane_current_path": "/home/user/myproject",
95+
"window_id": "@0",
96+
"window_name": "editor",
97+
"session_id": "$0",
98+
"session_name": "dev",
99+
"matched_lines": [
100+
"FAIL: test_upload (AssertionError)",
101+
"3 tests: 2 passed, 1 failed"
102+
],
103+
"is_caller": null
104+
}
105+
]
106+
```
107+
73108
```{fastmcp-tool-input} pane_tools.search_panes
74109
```
75110

@@ -92,13 +127,27 @@ expected text may never appear (set a timeout).
92127
{
93128
"tool": "wait_for_text",
94129
"arguments": {
95-
"text": "Server started",
96-
"session_name": "dev",
130+
"pattern": "Server listening",
131+
"pane_id": "%2",
97132
"timeout": 30
98133
}
99134
}
100135
```
101136

137+
Response:
138+
139+
```json
140+
{
141+
"found": true,
142+
"matched_lines": [
143+
"Server listening on port 8000"
144+
],
145+
"pane_id": "%2",
146+
"elapsed_seconds": 0.002,
147+
"timed_out": false
148+
}
149+
```
150+
102151
```{fastmcp-tool-input} pane_tools.wait_for_text
103152
```
104153

@@ -123,11 +172,17 @@ the command executes.
123172
"tool": "send_keys",
124173
"arguments": {
125174
"keys": "npm start",
126-
"session_name": "dev"
175+
"pane_id": "%2"
127176
}
128177
}
129178
```
130179

180+
Response (string):
181+
182+
```text
183+
Keys sent to pane %2
184+
```
185+
131186
```{fastmcp-tool-input} pane_tools.send_keys
132187
```
133188

docs/tools/sessions.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ which session to target.
2222
}
2323
```
2424

25+
Response:
26+
27+
```json
28+
[
29+
{
30+
"session_id": "$0",
31+
"session_name": "myproject",
32+
"window_count": 2,
33+
"session_attached": "0",
34+
"session_created": "1774521871"
35+
}
36+
]
37+
```
38+
2539
```{fastmcp-tool-input} server_tools.list_sessions
2640
```
2741

@@ -64,6 +78,18 @@ container — create one before creating windows or panes.
6478
}
6579
```
6680

81+
Response:
82+
83+
```json
84+
{
85+
"session_id": "$1",
86+
"session_name": "dev",
87+
"window_count": 1,
88+
"session_attached": "0",
89+
"session_created": "1774521872"
90+
}
91+
```
92+
6793
```{fastmcp-tool-input} server_tools.create_session
6894
```
6995

@@ -88,6 +114,18 @@ container — create one before creating windows or panes.
88114
}
89115
```
90116

117+
Response:
118+
119+
```json
120+
{
121+
"session_id": "$0",
122+
"session_name": "new-name",
123+
"window_count": 2,
124+
"session_attached": "0",
125+
"session_created": "1774521871"
126+
}
127+
```
128+
91129
```{fastmcp-tool-input} session_tools.rename_session
92130
```
93131

docs/tools/windows.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,37 @@ session before selecting a window to work with.
2323
}
2424
```
2525

26+
Response:
27+
28+
```json
29+
[
30+
{
31+
"window_id": "@0",
32+
"window_name": "editor",
33+
"window_index": "1",
34+
"session_id": "$0",
35+
"session_name": "dev",
36+
"pane_count": 2,
37+
"window_layout": "c195,80x24,0,0[80x12,0,0,0,80x11,0,13,1]",
38+
"window_active": "1",
39+
"window_width": "80",
40+
"window_height": "24"
41+
},
42+
{
43+
"window_id": "@1",
44+
"window_name": "server",
45+
"window_index": "2",
46+
"session_id": "$0",
47+
"session_name": "dev",
48+
"pane_count": 1,
49+
"window_layout": "b25f,80x24,0,0,2",
50+
"window_active": "0",
51+
"window_width": "80",
52+
"window_height": "24"
53+
}
54+
]
55+
```
56+
2657
```{fastmcp-tool-input} session_tools.list_windows
2758
```
2859

@@ -60,6 +91,23 @@ sending keys or capturing output.
6091
}
6192
```
6293

94+
Response:
95+
96+
```json
97+
{
98+
"window_id": "@2",
99+
"window_name": "logs",
100+
"window_index": "3",
101+
"session_id": "$0",
102+
"session_name": "dev",
103+
"pane_count": 1,
104+
"window_layout": "b25f,80x24,0,0,5",
105+
"window_active": "1",
106+
"window_width": "80",
107+
"window_height": "24"
108+
}
109+
```
110+
63111
```{fastmcp-tool-input} session_tools.create_window
64112
```
65113

@@ -80,11 +128,30 @@ window.
80128
"tool": "split_window",
81129
"arguments": {
82130
"session_name": "dev",
83-
"direction": "horizontal"
131+
"direction": "right"
84132
}
85133
}
86134
```
87135

136+
Response:
137+
138+
```json
139+
{
140+
"pane_id": "%4",
141+
"pane_index": "1",
142+
"pane_width": "39",
143+
"pane_height": "24",
144+
"pane_current_command": "zsh",
145+
"pane_current_path": "/home/user/myproject",
146+
"pane_pid": "3732",
147+
"pane_title": "",
148+
"pane_active": "0",
149+
"window_id": "@0",
150+
"session_id": "$0",
151+
"is_caller": null
152+
}
153+
```
154+
88155
```{fastmcp-tool-input} window_tools.split_window
89156
```
90157

0 commit comments

Comments
 (0)