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

Function toolFile

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

116});
117
118const toolFile = (input: {
119 readonly name?: string;
120 readonly mimeType: string;
121 readonly data: string;
122 readonly byteLength: number;
123}): ToolFileValue => ({
124 _tag: "ToolFile",
125 ...(input.name ? { name: input.name } : {}),
126 mimeType: input.mimeType,
127 encoding: "base64",
128 data: input.data,
129 byteLength: input.byteLength,
130});
131
132/** Build an engine whose execute triggers one elicitation and returns the handler's result. */
133const makeElicitingEngine = (

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected