MCPcopy Create free account
hub / github.com/cortexkit/magic-context / toolResultMessage

Function toolResultMessage

packages/pi-plugin/src/test-utils.test.ts:72–85  ·  view source on GitHub ↗
(
	toolCallId: string,
	text: string,
	timestamp = 3,
)

Source from the content-addressed store, hash-verified

70}
71
72export function toolResultMessage(
73 toolCallId: string,
74 text: string,
75 timestamp = 3,
76): PiMessage {
77 return {
78 role: "toolResult",
79 toolCallId,
80 toolName: "Read",
81 content: [{ type: "text", text }],
82 isError: false,
83 timestamp,
84 } as PiMessage;
85}
86
87export function textOf(message: PiMessage | undefined): string {
88 if (!message) return "";

Callers 5

makeTranscriptIdFunction · 0.90
buildMessagesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected