File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
src/openstack_mcp_server/prompts Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ def register_prompt(mcp: FastMCP):
77 """
88
99 @mcp .prompt ()
10- def get_instances_by_security_group (security_group_name : str ) -> str :
10+ def get_servers_by_security_group (security_group_name : str ) -> str :
1111 """
12- Get instances associated with a specific security group.
12+ Get servers associated with a specific security group.
1313
14- :param security_group_name: The name of the security group to filter instances by.
14+ :param security_group_name: The name of the security group to filter servers by.
1515 """
1616 return (
17- f"Find all compute instances that have the security group "
17+ f"Find all compute servers that have the security group "
1818 f"'{ security_group_name } ' attached.\n \n "
1919 f"Steps:\n "
2020 f"1. Call get_servers to list all servers.\n "
Original file line number Diff line number Diff line change 11from openstack_mcp_server .prompts import register_prompt
22
33
4- def test_get_instances_by_security_group_prompt_registered ():
4+ def test_get_servers_by_security_group_prompt_registered ():
55 """Test that the prompt is registered with the MCP instance."""
66 from unittest .mock import MagicMock
77
@@ -10,17 +10,17 @@ def test_get_instances_by_security_group_prompt_registered():
1010 mcp .prompt .assert_called ()
1111
1212
13- def test_get_instances_by_security_group_prompt_content ():
13+ def test_get_servers_by_security_group_prompt_content ():
1414 """Test that the prompt returns expected content."""
1515 from fastmcp import FastMCP
1616
1717 mcp = FastMCP ("test" )
1818 register_prompt (mcp )
1919
2020 prompts = mcp ._prompt_manager ._prompts
21- assert "get_instances_by_security_group " in prompts
21+ assert "get_servers_by_security_group " in prompts
2222
23- prompt_obj = prompts ["get_instances_by_security_group " ]
23+ prompt_obj = prompts ["get_servers_by_security_group " ]
2424 assert prompt_obj .fn is not None
2525
2626 result = prompt_obj .fn (security_group_name = "my-sg" )
You can’t perform that action at this time.
0 commit comments