Skip to content

Commit 3e02396

Browse files
committed
Update Jupyter notebook
1 parent ffd1961 commit 3e02396

File tree

1 file changed

+4
-66
lines changed

1 file changed

+4
-66
lines changed

tests/system/test_apps/mcp_enabled_app/bin/mcp_enabled_app.ipynb

Lines changed: 4 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,9 @@
1010
"This example aspires to verify the points listed in [POC - AI with Splunk Apps](https://cisco-my.sharepoint.com/:w:/r/personal/hbalacha_cisco_com/Documents/POC%20-%20AI%20with%20Splunk%20Apps.docx?d=w2776e089011943abbd84c0fa30a53f34&csf=1&web=1&e=RxvShR)\n",
1111
"\n",
1212
"- Develop @tool Decorator\n",
13-
" - [ ] Capture e.g. tool_name, description, inputs, outputs\n"
14-
]
15-
},
16-
{
17-
"cell_type": "markdown",
18-
"id": "363201e8",
19-
"metadata": {},
20-
"source": [
21-
"- MCP JSONSchema can (and most probably should) be used for tool registration in Splunk"
22-
]
23-
},
24-
{
25-
"cell_type": "code",
26-
"execution_count": null,
27-
"id": "c349a502",
28-
"metadata": {},
29-
"outputs": [],
30-
"source": [
31-
"from fastmcp import Client\n",
32-
"from mcp.types import Tool\n",
33-
"\n",
34-
"MCP_SERVER_HOST: str = \"0.0.0.0\"\n",
35-
"MCP_SERVER_PORT: int = 2137\n",
36-
"\n",
37-
"\n",
38-
"conn_str = f\"http://{MCP_SERVER_HOST}:{MCP_SERVER_PORT}/mcp\"\n",
39-
"mcp_client = Client(\"./tools.py\")\n",
40-
"\n",
13+
" - [ ] Capture e.g. tool_name, description, inputs, outputs\n",
4114
"\n",
42-
"async def get_tools() -> list[Tool]:\n",
43-
" tools = []\n",
44-
" async with mcp_client:\n",
45-
" tools = await mcp_client.list_tools()\n",
46-
"\n",
47-
" return tools\n",
48-
"\n",
49-
"\n",
50-
"call_tool_result = await get_tools()\n",
51-
"for tool in call_tool_result:\n",
52-
" print(tool.name)\n",
53-
" print(tool.description)\n",
54-
" print(tool.inputSchema)\n",
55-
" print(tool.outputSchema)\n",
56-
" print(tool.meta)"
57-
]
58-
},
59-
{
60-
"cell_type": "markdown",
61-
"id": "cd1da846",
62-
"metadata": {},
63-
"source": [
15+
"- MCP JSONSchema can (and most probably should) be used for tool registration in Splunk\n",
6416
"- execution_mode (external_http)\n",
6517
" - Is this what MCP calls `transports`?\n",
6618
"- execution_metadata (endpoint URL)\n",
@@ -74,6 +26,8 @@
7426
"metadata": {},
7527
"outputs": [],
7628
"source": [
29+
"from fastmcp.client import Client\n",
30+
"\n",
7731
"mcp_client = Client(\"tools.py\")\n",
7832
"\n",
7933
"\n",
@@ -89,22 +43,6 @@
8943
"\n",
9044
"[print(data) for data in call_tool_result.data]\n"
9145
]
92-
},
93-
{
94-
"cell_type": "markdown",
95-
"id": "2da04c9f",
96-
"metadata": {},
97-
"source": [
98-
"- [ ] Support YAML v2 Tool Definition\n",
99-
"- [ ] Merge decorator + YAML for complete metadata\n",
100-
"\n",
101-
"- Implement Post-Install Script (sdk_post_install.py):\n",
102-
" - [ ] Load app modules → decorators populate RegisteredTools\n",
103-
" - [ ] Merge YAML/decorator metadata\n",
104-
" - [ ] Build MCP /tools/register payload\n",
105-
" - [ ] Call MCP registry with credentials (from App Manager)\n",
106-
" - [ ] Log success/fail to MCP audit\n"
107-
]
10846
}
10947
],
11048
"metadata": {

0 commit comments

Comments
 (0)