2026-04-23 20:09:34 +00:00
|
|
|
import { Effect, Schema } from "effect"
|
2026-04-16 03:56:54 +00:00
|
|
|
import * as Tool from "./tool"
|
2025-08-04 15:59:42 +00:00
|
|
|
|
2026-04-23 20:09:34 +00:00
|
|
|
export const Parameters = Schema.Struct({
|
|
|
|
|
tool: Schema.String,
|
|
|
|
|
error: Schema.String,
|
|
|
|
|
})
|
|
|
|
|
|
2026-04-11 02:36:02 +00:00
|
|
|
export const InvalidTool = Tool.define(
|
|
|
|
|
"invalid",
|
|
|
|
|
Effect.succeed({
|
|
|
|
|
description: "Do not use",
|
2026-04-23 20:09:34 +00:00
|
|
|
parameters: Parameters,
|
2026-04-11 02:36:02 +00:00
|
|
|
execute: (params: { tool: string; error: string }) =>
|
|
|
|
|
Effect.succeed({
|
|
|
|
|
title: "Invalid Tool",
|
|
|
|
|
output: `The arguments provided to the tool are invalid: ${params.error}`,
|
|
|
|
|
metadata: {},
|
|
|
|
|
}),
|
2025-08-04 15:59:42 +00:00
|
|
|
}),
|
2026-04-11 02:36:02 +00:00
|
|
|
)
|