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

Function toolFile

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

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected