返回 CodeWhale
deny_tool_rules.case.json
根目录 / crates / tui / tests / fixtures / conformance / mcp / deny_tool_rules.case.json
1 {
2 "description": "Deny rules naming single tools. Pins Rust McpPool::authorize_call / tool_allowed / Engine::execute_mcp_tool_with_pool: a denied tool (rule match is case-insensitive) leaves the catalog, a call to it is refused as not available before anything reaches the server, and its siblings and the resource tools keep working. server_received proves the refused calls were never sent.",
3 "server_name": "conformance",
4 "disallowed_tools": [
5 "MCP_CONFORMANCE_FAILS",
6 "mcp_get_prompt"
7 ],
8 "server": {
9 "initialize": {
10 "result": {
11 "protocolVersion": "2025-06-18",
12 "serverInfo": {
13 "name": "deny-fixture",
14 "version": "1.0.0"
15 },
16 "capabilities": {
17 "tools": {},
18 "resources": {},
19 "prompts": {}
20 }
21 }
22 },
23 "tools/list": {
24 "result": {
25 "tools": [
26 {
27 "name": "echo",
28 "inputSchema": {
29 "type": "object"
30 }
31 },
32 {
33 "name": "fails",
34 "inputSchema": {
35 "type": "object"
36 }
37 }
38 ]
39 }
40 },
41 "resources/list": {
42 "result": {
43 "resources": [
44 {
45 "uri": "fixture://readme",
46 "name": "readme",
47 "mimeType": "text/plain"
48 }
49 ]
50 }
51 },
52 "prompts/list": {
53 "result": {
54 "prompts": [
55 {
56 "name": "summarize",
57 "description": "Summarize."
58 }
59 ]
60 }
61 },
62 "resources/read": [
63 {
64 "match": {
65 "uri": "fixture://readme"
66 },
67 "result": {
68 "contents": [
69 {
70 "uri": "fixture://readme",
71 "mimeType": "text/plain",
72 "text": "readme\n"
73 }
74 ]
75 }
76 }
77 ],
78 "prompts/get": [
79 {
80 "match": {
81 "name": "summarize"
82 },
83 "result": {
84 "messages": [
85 {
86 "role": "user",
87 "content": {
88 "type": "text",
89 "text": "Summarize."
90 }
91 }
92 ]
93 }
94 }
95 ],
96 "tools/call": [
97 {
98 "match": {
99 "name": "echo"
100 },
101 "result": {
102 "content": [
103 {
104 "type": "text",
105 "text": "echo"
106 }
107 ]
108 }
109 },
110 {
111 "match": {
112 "name": "fails"
113 },
114 "result": {
115 "content": [
116 {
117 "type": "text",
118 "text": "ran"
119 }
120 ]
121 }
122 }
123 ]
124 },
125 "steps": [
126 {
127 "op": "catalog"
128 },
129 {
130 "op": "call",
131 "tool": "mcp_conformance_echo",
132 "input": {}
133 },
134 {
135 "op": "call",
136 "tool": "mcp_conformance_fails",
137 "input": {}
138 },
139 {
140 "op": "call",
141 "tool": "mcp_get_prompt",
142 "input": {
143 "server": "conformance",
144 "name": "summarize"
145 }
146 },
147 {
148 "op": "call",
149 "tool": "mcp_read_resource",
150 "input": {
151 "server": "conformance",
152 "uri": "fixture://readme"
153 }
154 }
155 ]
156 }
157
157 lines JSON