• 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:

    • Basic string schemas (z.string())
    • String schemas with validations (z.string().min(1), z.string().email(), etc.)

    This function returns false for everything else, including:

    • String schemas with defaults (z.string().default("value"))
    • Branded string schemas (z.string().brand<"UserId">())
    • String schemas with catch operations (z.string().catch("default"))
    • Optional/nullable string schemas (z.string().optional())
    • Transformed schemas (z.string().transform() or z.object().transform())
    • Object or record schemas, even if they're empty
    • Any other schema type

    Parameters

    • schema: unknown

      The Zod schema to check.

    Returns schema is InteropZodType<undefined | string, undefined | string>

    True if the schema is a basic ZodString, false otherwise.