MCPcopy Create free account
hub / github.com/Effect-TS/effect / ToolCallPart

Function ToolCallPart

packages/effect/src/unstable/ai/Response.ts:1406–1417  ·  view source on GitHub ↗
(
  name: Name,
  params: Params
)

Source from the content-addressed store, hash-verified

1404 >
1405 }
1406> = <const Name extends string, Params extends Schema.Constraint>(
1407 name: Name,
1408 params: Params
1409) =>
1410 Schema.Struct({
1411 ...BasePart.fields,
1412 type: Schema.Literal("tool-call"),
1413 id: Schema.String,
1414 name: Schema.Literal(name),
1415 params,
1416 providerExecuted: Schema.Boolean.pipe(Schema.withDecodingDefaultKey(Effect.succeed(false)))
1417 }).annotate({ identifier: "ToolCallPart" }) as any
1418
1419/**
1420 * Constructs a new tool call part.

Callers 3

AllPartsFunction · 0.70
PartFunction · 0.70
StreamPartFunction · 0.70

Calls 3

annotateMethod · 0.65
pipeMethod · 0.65
succeedMethod · 0.45

Tested by

no test coverage detected