MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / toolFile

Function toolFile

packages/hosts/mcp/src/tool-server.test.ts:103–115  ·  view source on GitHub ↗
(input: {
  readonly name?: string;
  readonly mimeType: string;
  readonly data: string;
  readonly byteLength: number;
})

Source from the content-addressed store, hash-verified

101});
102
103const toolFile = (input: {
104 readonly name?: string;
105 readonly mimeType: string;
106 readonly data: string;
107 readonly byteLength: number;
108}): ToolFileValue => ({
109 _tag: "ToolFile",
110 ...(input.name ? { name: input.name } : {}),
111 mimeType: input.mimeType,
112 encoding: "base64",
113 data: input.data,
114 byteLength: input.byteLength,
115});
116
117/** Build an engine whose execute triggers one elicitation and returns the handler's result. */
118const makeElicitingEngine = (

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected