Determines if the provided Zod schema should be treated as a simple string schema that maps to DynamicTool. This aligns with the type-level constraint of InteropZodType<string | undefined> which only matches basic string schemas. If the provided schema is just z.string(), we can make the determination that the tool is just a generic string tool that doesn't require any input validation.
This function only returns true for basic ZodString schemas, including:
This function returns false for everything else, including:
isSimpleStringZodSchema(
schema: unknown
): schema is InteropZodType<string | undefined, string | undefined>| Name | Type | Description |
|---|---|---|
schema* | unknown | The Zod schema to check. |