> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runflow.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool Types

> TypeScript types for Tools

## Tool Types

```typescript theme={null}
interface ToolConfig<TInput = any, TOutput = any> {
  id: string;
  description: string;
  inputSchema: z.ZodSchema<TInput>;
  outputSchema?: z.ZodSchema<TOutput>;
  execute: (params: {
    context: TInput;
    runflow: RunflowAPIClient;
    projectId: string;
  }) => Promise<TOutput>;
}

interface RunflowTool {
  id: string;
  name?: string;
  description: string;
  parameters: Record<string, ToolParameter>;
  execute: (params: any, context: ToolContext) => Promise<any>;
}

interface ToolContext {
  projectId: string;
  companyId: string;
  userId?: string;
  sessionId?: string;
  runflowAPI: RunflowAPIClient;
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Workflow Types" icon="diagram-project" href="/api-reference/types/workflow-types">
    View workflow types
  </Card>

  <Card title="Trace Types" icon="chart-line" href="/api-reference/types/trace-types">
    View trace types
  </Card>
</CardGroup>
