返回 CodeWhale
tools_resources_prompts.golden.json
根目录 / crates / tui / tests / fixtures / conformance / mcp / tools_resources_prompts.golden.json
1 {
2 "server_received": [
3 {
4 "arguments": {
5 "text": "hi"
6 },
7 "method": "tools/call",
8 "name": "echo"
9 },
10 {
11 "arguments": {},
12 "method": "tools/call",
13 "name": "fails"
14 },
15 {
16 "arguments": {},
17 "method": "tools/call",
18 "name": "rpc-error"
19 },
20 {
21 "arguments": {},
22 "method": "tools/call",
23 "name": "slow"
24 },
25 {
26 "arguments": {},
27 "method": "tools/call",
28 "name": "image"
29 },
30 {
31 "arguments": {},
32 "method": "tools/call",
33 "name": "hangs"
34 },
35 {
36 "arguments": {
37 "text": "after cancel"
38 },
39 "method": "tools/call",
40 "name": "echo"
41 },
42 {
43 "method": "resources/read",
44 "uri": "fixture://readme"
45 },
46 {
47 "method": "prompts/get",
48 "name": "summarize"
49 }
50 ],
51 "steps": [
52 {
53 "op": "boot",
54 "outcome": "ok"
55 },
56 {
57 "op": "catalog",
58 "tools": [
59 {
60 "allowed_callers": [
61 "direct"
62 ],
63 "defer_loading": false,
64 "description": "List available MCP resource templates across servers (optionally filtered by server).",
65 "input_schema": {
66 "properties": {
67 "server": {
68 "description": "Optional MCP server name to filter by",
69 "type": "string"
70 }
71 },
72 "type": "object"
73 },
74 "name": "list_mcp_resource_templates"
75 },
76 {
77 "allowed_callers": [
78 "direct"
79 ],
80 "defer_loading": false,
81 "description": "List available MCP resources across servers (optionally filtered by server).",
82 "input_schema": {
83 "properties": {
84 "server": {
85 "description": "Optional MCP server name to filter by",
86 "type": "string"
87 }
88 },
89 "type": "object"
90 },
91 "name": "list_mcp_resources"
92 },
93 {
94 "allowed_callers": [
95 "direct"
96 ],
97 "defer_loading": false,
98 "description": "Echo the text argument.\nSecond description line.",
99 "input_schema": {
100 "properties": {
101 "text": {
102 "type": "string"
103 }
104 },
105 "required": [
106 "text"
107 ],
108 "type": "object"
109 },
110 "name": "mcp_conformance_echo"
111 },
112 {
113 "allowed_callers": [
114 "direct"
115 ],
116 "defer_loading": false,
117 "description": "Always reports a tool-level error.",
118 "input_schema": {
119 "type": "object"
120 },
121 "name": "mcp_conformance_fails"
122 },
123 {
124 "allowed_callers": [
125 "direct"
126 ],
127 "defer_loading": false,
128 "description": "Never answers until the caller goes away.",
129 "input_schema": {
130 "type": "object"
131 },
132 "name": "mcp_conformance_hangs"
133 },
134 {
135 "allowed_callers": [
136 "direct"
137 ],
138 "defer_loading": false,
139 "description": "Returns text and an image block.",
140 "input_schema": {
141 "type": "object"
142 },
143 "name": "mcp_conformance_image"
144 },
145 {
146 "allowed_callers": [
147 "direct"
148 ],
149 "defer_loading": false,
150 "description": "",
151 "input_schema": {
152 "type": "object"
153 },
154 "name": "mcp_conformance_rpc-error"
155 },
156 {
157 "allowed_callers": [
158 "direct"
159 ],
160 "defer_loading": false,
161 "description": "Sends progress notifications before its result.",
162 "input_schema": {
163 "type": "object"
164 },
165 "name": "mcp_conformance_slow"
166 },
167 {
168 "allowed_callers": [
169 "direct"
170 ],
171 "defer_loading": false,
172 "description": "Listed first by the server; the catalog sorts by name.",
173 "input_schema": {
174 "properties": {},
175 "type": "object"
176 },
177 "name": "mcp_conformance_z_last"
178 },
179 {
180 "allowed_callers": [
181 "direct"
182 ],
183 "defer_loading": false,
184 "description": "Get a prompt from an MCP server",
185 "input_schema": {
186 "properties": {
187 "arguments": {
188 "additionalProperties": {
189 "type": "string"
190 },
191 "description": "Optional arguments for the prompt",
192 "type": "object"
193 },
194 "name": {
195 "description": "The name of the prompt",
196 "type": "string"
197 },
198 "server": {
199 "description": "The name of the MCP server",
200 "type": "string"
201 }
202 },
203 "required": [
204 "server",
205 "name"
206 ],
207 "type": "object"
208 },
209 "name": "mcp_get_prompt"
210 },
211 {
212 "allowed_callers": [
213 "direct"
214 ],
215 "defer_loading": false,
216 "description": "Read a resource from an MCP server using its URI",
217 "input_schema": {
218 "properties": {
219 "server": {
220 "description": "The name of the MCP server",
221 "type": "string"
222 },
223 "uri": {
224 "description": "The URI of the resource to read",
225 "type": "string"
226 }
227 },
228 "required": [
229 "server",
230 "uri"
231 ],
232 "type": "object"
233 },
234 "name": "mcp_read_resource"
235 },
236 {
237 "allowed_callers": [
238 "direct"
239 ],
240 "defer_loading": false,
241 "description": "Alias for mcp_read_resource.",
242 "input_schema": {
243 "properties": {
244 "server": {
245 "description": "The name of the MCP server",
246 "type": "string"
247 },
248 "uri": {
249 "description": "The URI of the resource to read",
250 "type": "string"
251 }
252 },
253 "required": [
254 "server",
255 "uri"
256 ],
257 "type": "object"
258 },
259 "name": "read_mcp_resource"
260 }
261 ]
262 },
263 {
264 "op": "call",
265 "outcome": {
266 "ok": {
267 "content": {
268 "content": [
269 {
270 "text": "echo: hi",
271 "type": "text"
272 }
273 ],
274 "structuredContent": {
275 "echoed": "hi"
276 }
277 },
278 "content_blocks": [],
279 "metadata": null,
280 "success": true
281 }
282 },
283 "tool": "mcp_conformance_echo"
284 },
285 {
286 "op": "call",
287 "outcome": {
288 "ok": {
289 "content": "the fixture tool failed on purpose",
290 "content_blocks": [],
291 "metadata": null,
292 "success": false
293 }
294 },
295 "tool": "mcp_conformance_fails"
296 },
297 {
298 "op": "call",
299 "outcome": {
300 "err": {
301 "detail": "Failed to execute tool: MCP tool failed: MCP error in 'tools/call': {\n \"code\": -32602,\n \"message\": \"invalid params: conformance\"\n}",
302 "kind": "execution_failed"
303 }
304 },
305 "tool": "mcp_conformance_rpc-error"
306 },
307 {
308 "op": "call",
309 "outcome": {
310 "ok": {
311 "content": {
312 "content": [
313 {
314 "text": "slow done",
315 "type": "text"
316 }
317 ]
318 },
319 "content_blocks": [],
320 "metadata": null,
321 "success": true
322 }
323 },
324 "tool": "mcp_conformance_slow"
325 },
326 {
327 "op": "call",
328 "outcome": {
329 "ok": {
330 "content": {
331 "content": [
332 {
333 "text": "one pixel",
334 "type": "text"
335 },
336 {
337 "data": "[MCP image payload removed from text output]",
338 "mimeType": "image/png",
339 "type": "image"
340 }
341 ]
342 },
343 "content_blocks": [
344 {
345 "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==",
346 "mime_type": "image/png",
347 "type": "image"
348 }
349 ],
350 "metadata": null,
351 "success": true
352 }
353 },
354 "tool": "mcp_conformance_image"
355 },
356 {
357 "op": "call",
358 "outcome": {
359 "err": {
360 "detail": "Tool execution cancelled: tool call interrupted by the host",
361 "kind": "cancelled"
362 }
363 },
364 "tool": "mcp_conformance_hangs"
365 },
366 {
367 "op": "call",
368 "outcome": {
369 "ok": {
370 "content": {
371 "content": [
372 {
373 "text": "echo: hi",
374 "type": "text"
375 }
376 ],
377 "structuredContent": {
378 "echoed": "hi"
379 }
380 },
381 "content_blocks": [],
382 "metadata": null,
383 "success": true
384 }
385 },
386 "tool": "mcp_conformance_echo"
387 },
388 {
389 "op": "call",
390 "outcome": {
391 "ok": {
392 "content": {
393 "resources": [
394 {
395 "description": "The fixture readme.",
396 "mime_type": "text/plain",
397 "name": "readme",
398 "server": "conformance",
399 "uri": "fixture://readme"
400 }
401 ]
402 },
403 "content_blocks": [],
404 "metadata": null,
405 "success": true
406 }
407 },
408 "tool": "list_mcp_resources"
409 },
410 {
411 "op": "call",
412 "outcome": {
413 "ok": {
414 "content": {
415 "templates": [
416 {
417 "description": null,
418 "mime_type": "text/plain",
419 "name": "note",
420 "server": "conformance",
421 "uri_template": "fixture://notes/{id}"
422 }
423 ]
424 },
425 "content_blocks": [],
426 "metadata": null,
427 "success": true
428 }
429 },
430 "tool": "list_mcp_resource_templates"
431 },
432 {
433 "op": "call",
434 "outcome": {
435 "ok": {
436 "content": {
437 "contents": [
438 {
439 "mimeType": "text/plain",
440 "text": "conformance fixture\n",
441 "uri": "fixture://readme"
442 }
443 ]
444 },
445 "content_blocks": [],
446 "metadata": null,
447 "success": true
448 }
449 },
450 "tool": "mcp_read_resource"
451 },
452 {
453 "op": "call",
454 "outcome": {
455 "ok": {
456 "content": {
457 "description": "Summarize a note.",
458 "messages": [
459 {
460 "content": {
461 "text": "Summarize note 7.",
462 "type": "text"
463 },
464 "role": "user"
465 }
466 ]
467 },
468 "content_blocks": [],
469 "metadata": null,
470 "success": true
471 }
472 },
473 "tool": "mcp_get_prompt"
474 },
475 {
476 "op": "call",
477 "outcome": {
478 "err": {
479 "detail": "Failed to execute tool: MCP tool failed: Unknown MCP tool name: mcp_conformance_not_advertised",
480 "kind": "execution_failed"
481 }
482 },
483 "tool": "mcp_conformance_not_advertised"
484 }
485 ]
486 }
487
487 lines JSON