File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -329,6 +329,10 @@ def name(self) -> str:
329329 def instructions (self ) -> str | None :
330330 return self ._mcp_server .instructions
331331
332+ @instructions .setter
333+ def instructions (self , value : str | None ) -> None :
334+ self ._mcp_server .instructions = value
335+
332336 @property
333337 def version (self ) -> str | None :
334338 return self ._mcp_server .version
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ async def test_create_server(self):
3535 assert mcp .name .startswith ("FastMCP-" )
3636 assert mcp .instructions == "Server instructions"
3737
38+ async def test_change_instruction (self ):
39+ mcp = FastMCP (instructions = "Server instructions" )
40+ assert mcp .instructions == "Server instructions"
41+ mcp .instructions = "New instructions"
42+ assert mcp .instructions == "New instructions"
43+
3844 async def test_non_ascii_description (self ):
3945 """Test that FastMCP handles non-ASCII characters in descriptions correctly"""
4046 mcp = FastMCP ()
You can’t perform that action at this time.
0 commit comments