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

Function toolFile

packages/hosts/mcp/src/tool-server.test.ts:181–193  ·  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

179});
180
181const toolFile = (input: {
182 readonly name?: string;
183 readonly mimeType: string;
184 readonly data: string;
185 readonly byteLength: number;
186}): ToolFileValue => ({
187 _tag: "ToolFile",
188 ...(input.name ? { name: input.name } : {}),
189 mimeType: input.mimeType,
190 encoding: "base64",
191 data: input.data,
192 byteLength: input.byteLength,
193});
194
195/** Build an engine whose execute triggers one elicitation and returns the handler's result. */
196const makeElicitingEngine = (

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected