Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API reference for creating and configuring tools.
createTool(config)
import { createTool } from "@cline/sdk"
@cline/agents
@cline/core
const tool = createTool({ name: "get_current_time", description: "Return the current time as ISO string.", inputSchema: { type: "object", properties: {} }, execute: async (_input, context) => { return { now: new Date().toISOString() } }, })
inputSchema
interface AgentTool<TInput = unknown, TOutput = unknown> { name: string description: string inputSchema: Record<string, unknown> execute: (input: TInput, context: AgentToolContext, onChange?: (update: unknown) => void) => Promise<TOutput> timeoutMs?: number retryable?: boolean maxRetries?: number }
createTool
timeoutMs
30000
retryable
true
maxRetries
3
interface AgentToolContext { agentId: string conversationId: string iteration: number abortSignal?: AbortSignal metadata?: Record<string, unknown> }
interface ToolPolicy { enabled?: boolean autoApprove?: boolean }
interface ToolCallRecord { id: string name: string input: unknown output: unknown error?: string durationMs: number startedAt: Date endedAt: Date }
Was this page helpful?