Answer: You define custom tools using `createTool` with zod schemas for type-safe tool definitions, providing a name, description, inputSchema built with z.object, and an async execute function. Use `z.enum` to constrain values and `.describe()` on each field to tell the model what to provide. Status: Confirmed Entry: tool/cline/agents-and-automation/define-tools-zod-schemas Revision: 1 Digest: sha256:226ee634f9baf15d (changes whenever the content changes) Timeline: Created: 2026-11-13T03:07:36Z Last changed: 2026-11-13T03:07:36Z Last verified: 2026-11-20T12:30:29Z Next check: 2026-11-21T12:30:29Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of tool creation function | createTool | [1] | 2026-11-20 schema definition | inputSchema: z.object({ | [1] | 2026-11-20 enum constraint | z.enum | [1] | 2026-11-20 field description method | .describe() | [1] | 2026-11-20 Sources: [1] Cline. "Building an Agent". https://docs.cline.bot/sdk/guides/building-an-agent.md Role: primary. Accessed: 2026-11-20T12:30:29Z Quote: "The bot uses `createTool` with zod schemas for type-safe tool definitions." (Supports: tool creation function) Quote: "inputSchema: z.object({" (Supports: schema definition) Quote: "`z.enum` constrains severity to valid values, which improves model accuracy" (Supports: enum constraint) Quote: "`.describe()` on each field tells the model what to provide" (Supports: field description method) Published: 2026-11-20T06:00:36Z Snapshot SHA-256: cf25f857878714fd999cfc471551493fc97ed24e31746344e35d48e3722bce8f (captured 2026-11-13T03:07:35Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:07:36Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:30:29Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:30:29Z Last attempt: 2026-11-20T12:30:29Z Notes and limitations: Extracted automatically from a single official source (section "Defining Tools with Zod Schemas"). Related: https://latestn.com/tool/cline/agents-and-automation/distribute-plugin-file-cli How do I distribute a Cline plugin as a file or install it via CLI? https://latestn.com/tool/cline/agents-and-automation/done-event-reasons What reasons can a Cline done event have? https://latestn.com/tool/cline/agents-and-automation/enable-automation-apis How do I enable automation APIs in ClineCore? https://latestn.com/tool/cline/agents-and-automation/create-scheduled-agent-sdk How do I create a scheduled agent with the Cline SDK? https://latestn.com/tool/cline/agents-and-automation/cron-expression-reference What cron expression syntax does Cline scheduling support? https://latestn.com/tool/cline/agents-and-automation/custom-tool-error-handling How do I handle errors in a Cline custom tool's execute function? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:07:36Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/cline/agents-and-automation/define-tools-zod-schemas/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/cline/agents-and-automation/define-tools-zod-schemas POST: https://latestn.com/dispute/tool/cline/agents-and-automation/define-tools-zod-schemas with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cline/agents-and-automation/define-tools-zod-schemas?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I define custom tools with Zod schemas in a Cline SDK agent? Revision 1, last verified 2026-11-20T12:30:29Z. https://latestn.com/tool/cline/agents-and-automation/define-tools-zod-schemas (accessed 2026-11-21T10:05:32Z). @misc{LatestN_tool_cline_agents_and_automation_define_tools_zod_schemas_r1, title = {How do I define custom tools with Zod schemas in a Cline SDK agent?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cline/agents-and-automation/define-tools-zod-schemas}}, note = {Revision 1; digest sha256:226ee634f9baf15d; last verified 2026-11-20T12:30:29Z; accessed 2026-11-21T10:05:32Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/cline/agents-and-automation/define-tools-zod-schemas