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

Method merge_chunk

src/mcp_cli/chat/models.py:108–120  ·  view source on GitHub ↗

Merge data from a streaming chunk into this tool call. Args: chunk: New chunk data to merge

(self, chunk: "ToolCallData")

Source from the content-addressed store, hash-verified

106 )
107
108 def merge_chunk(self, chunk: "ToolCallData") -> None:
109 """Merge data from a streaming chunk into this tool call.
110
111 Args:
112 chunk: New chunk data to merge
113 """
114 # Update function name if provided
115 if chunk.function.name:
116 self.function.name = chunk.function.name
117
118 # Accumulate arguments (concatenate JSON strings)
119 if chunk.function.arguments:
120 self.function.arguments += chunk.function.arguments
121
122
123class HistoryMessage(BaseModel):

Callers 2

test_merge_chunk_nameMethod · 0.95

Calls

no outgoing calls

Tested by 2

test_merge_chunk_nameMethod · 0.76