> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Type Alias: ToolDefinition<Input, Output>

> Generated from the public TypeScript API.

```ts theme={null}
type ToolDefinition<Input, Output> = ToolDefinitionBase<Input, Output> &
  | {
  inputJsonSchema?: unknown;
  inputSchema: unknown;
}
  | {
  inputJsonSchema: unknown;
  inputSchema?: undefined;
};
```

A custom tool with an execution callback and either a Zod/JSON input schema or an explicit JSON Schema. Tool execution stays in the SDK process. The callback must validate invocation input before side effects; schema parsing is not automatic.

## Type Parameters

### Input

`Input` = `unknown`

### Output

`Output` = `unknown`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.