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

Function toolOk

packages/kosong/test/fixtures/simple-toolset.ts:53–66  ·  view source on GitHub ↗
(opts: {
  output: string | ContentPart | ContentPart[];
  message?: string;
  brief?: string;
})

Source from the content-addressed store, hash-verified

51}
52
53export function toolOk(opts: {
54 output: string | ContentPart | ContentPart[];
55 message?: string;
56 brief?: string;
57}): ToolReturnValue {
58 const display: DisplayBlock[] = [];
59 if (opts.brief) display.push({ type: 'brief', text: opts.brief });
60 return {
61 isError: false,
62 output: normalizeOutput(opts.output),
63 message: opts.message ?? '',
64 display,
65 };
66}
67
68export function toolError(opts: {
69 message: string;

Calls 2

normalizeOutputFunction · 0.85
pushMethod · 0.45

Tested by 2

createSimpleMockToolsetFunction · 0.72
handleFunction · 0.72