MCPcopy Create free account
hub / github.com/IBM/mcp-cli / update

Method update

src/mcp_cli/context/context_manager.py:199–209  ·  view source on GitHub ↗

Update context with keyword arguments. This method provides a simple way to update multiple context attributes.

(self, **kwargs)

Source from the content-addressed store, hash-verified

197 self._extra[key] = value
198
199 def update(self, **kwargs) -> None:
200 """
201 Update context with keyword arguments.
202
203 This method provides a simple way to update multiple context attributes.
204 """
205 for key, value in kwargs.items():
206 if hasattr(self, key):
207 setattr(self, key, value)
208 else:
209 self._extra[key] = value
210
211 # Conversation message helpers
212 def add_message(self, message: ConversationMessage | dict[str, Any]) -> None:

Callers 15

analyze_single_serverFunction · 0.80
run_commandFunction · 0.80
_render_tool_statusMethod · 0.80
_merge_json_stringsMethod · 0.80
handle_commandMethod · 0.80
execute_planMethod · 0.80
_dry_runMethod · 0.80
update_from_cliMethod · 0.80
capture_initMethod · 0.80

Calls

no outgoing calls

Tested by 6

capture_initMethod · 0.64
_make_serverFunction · 0.64
_make_toolFunction · 0.64
test_update_mixedMethod · 0.64