MCPcopy Create free account
hub / github.com/codeaashu/claude-code / MCPToolDetailView

Function MCPToolDetailView

src/components/mcp/MCPToolDetailView.tsx:14–208  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

12 onBack: () => void;
13};
14export function MCPToolDetailView(t0) {
15 const $ = _c(44);
16 const {
17 tool,
18 server,
19 onBack
20 } = t0;
21 const [toolDescription, setToolDescription] = React.useState("");
22 let t1;
23 let toolName;
24 if ($[0] !== server.name || $[1] !== tool) {
25 toolName = getMcpDisplayName(tool.name, server.name);
26 const fullDisplayName = tool.userFacingName ? tool.userFacingName({}) : toolName;
27 t1 = extractMcpToolDisplayName(fullDisplayName);
28 $[0] = server.name;
29 $[1] = tool;
30 $[2] = t1;
31 $[3] = toolName;
32 } else {
33 t1 = $[2];
34 toolName = $[3];
35 }
36 const displayName = t1;
37 let t2;
38 if ($[4] !== tool) {
39 t2 = tool.isReadOnly?.({}) ?? false;
40 $[4] = tool;
41 $[5] = t2;
42 } else {
43 t2 = $[5];
44 }
45 const isReadOnly = t2;
46 let t3;
47 if ($[6] !== tool) {
48 t3 = tool.isDestructive?.({}) ?? false;
49 $[6] = tool;
50 $[7] = t3;
51 } else {
52 t3 = $[7];
53 }
54 const isDestructive = t3;
55 let t4;
56 if ($[8] !== tool) {
57 t4 = tool.isOpenWorld?.({}) ?? false;
58 $[8] = tool;
59 $[9] = t4;
60 } else {
61 t4 = $[9];
62 }
63 const isOpenWorld = t4;
64 let t5;
65 let t6;
66 if ($[10] !== tool) {
67 t5 = () => {
68 const loadDescription = async function loadDescription() {
69 try {
70 const desc = await tool.description({}, {
71 isNonInteractiveSession: false,

Callers

nothing calls this directly

Calls 5

getMcpDisplayNameFunction · 0.85
loadDescriptionFunction · 0.85
keysMethod · 0.80
entriesMethod · 0.80

Tested by

no test coverage detected