MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / createToolCallMessage

Function createToolCallMessage

packages/core/src/__tests__/test-utils.ts:151–171  ·  view source on GitHub ↗
(
  toolCallName: string,
  args: any = {},
  overrides: MessageOverrides = {},
)

Source from the content-addressed store, hash-verified

149}
150
151export function createToolCallMessage(
152 toolCallName: string,
153 args: any = {},
154 overrides: MessageOverrides = {},
155): Message {
156 const toolCallId = `tool-call-${Math.random().toString(36).substr(2, 9)}`;
157 return createAssistantMessage({
158 content: "",
159 toolCalls: [
160 {
161 id: toolCallId,
162 type: "function",
163 function: {
164 name: toolCallName,
165 arguments: JSON.stringify(args),
166 },
167 },
168 ],
169 ...overrides,
170 });
171}
172
173export function createToolResultMessage(
174 toolCallId: string,

Calls 1

createAssistantMessageFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…