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

Function toolResultPart

packages/effect/src/unstable/ai/Response.ts:1704–1716  ·  view source on GitHub ↗
(
  params: Params
)

Source from the content-addressed store, hash-verified

1702 * @since 4.0.0
1703 */
1704export const toolResultPart = <const Params extends ConstructorParams<ToolResultPart<string, unknown, unknown>>>(
1705 params: Params
1706): Params extends {
1707 readonly name: infer Name extends string
1708 readonly isFailure: false
1709 readonly result: infer Success
1710} ? ToolResultPart<Name, Success, never>
1711 : Params extends {
1712 readonly name: infer Name extends string
1713 readonly isFailure: true
1714 readonly result: infer Failure
1715 } ? ToolResultPart<Name, never, Failure>
1716 : never => makePart("tool-result", params) as any
1717
1718// =============================================================================
1719// Tool Approval Request Part

Callers

nothing calls this directly

Calls 1

makePartFunction · 0.70

Tested by

no test coverage detected