MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / createToolMessage

Function createToolMessage

packages/kosong/src/message.ts:213–222  ·  view source on GitHub ↗
(toolCallId: string, output: string | ContentPart[])

Source from the content-addressed store, hash-verified

211
212/** Create a tool result message. */
213export function createToolMessage(toolCallId: string, output: string | ContentPart[]): Message {
214 const content: ContentPart[] =
215 typeof output === 'string' ? [{ type: 'text', text: output }] : output;
216 return {
217 role: 'tool',
218 content,
219 toolCalls: [],
220 toolCallId,
221 };
222}

Callers 3

message.test.tsFile · 0.90
runTwoStepLoopFunction · 0.90
appendLoopEventMethod · 0.90

Calls

no outgoing calls

Tested by 1

runTwoStepLoopFunction · 0.72