<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[agents](../../) / [Exports](../modules) / IToolExecutionContext

# Interface: IToolExecutionContext

Tool execution context - type-safe context for tool execution
Enhanced with hierarchical execution tracking support

## Table of contents

### Properties

- [toolName](IToolExecutionContext#toolname)
- [parameters](IToolExecutionContext#parameters)
- [executionId](IToolExecutionContext#executionid)
- [userId](IToolExecutionContext#userid)
- [sessionId](IToolExecutionContext#sessionid)
- [metadata](IToolExecutionContext#metadata)
- [parentExecutionId](IToolExecutionContext#parentexecutionid)
- [rootExecutionId](IToolExecutionContext#rootexecutionid)
- [executionLevel](IToolExecutionContext#executionlevel)
- [executionPath](IToolExecutionContext#executionpath)
- [realTimeData](IToolExecutionContext#realtimedata)
- [extensions](IToolExecutionContext#extensions)
- [ownerType](IToolExecutionContext#ownertype)
- [ownerId](IToolExecutionContext#ownerid)
- [ownerPath](IToolExecutionContext#ownerpath)
- [sourceId](IToolExecutionContext#sourceid)
- [eventService](IToolExecutionContext#eventservice)
- [baseEventService](IToolExecutionContext#baseeventservice)

## Properties

### toolName

• **toolName**: `string`

#### Defined in

[packages/agents/src/interfaces/tool.ts:68](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L68)

---

### parameters

• **parameters**: [`TToolParameters`](../modules#ttoolparameters)

#### Defined in

[packages/agents/src/interfaces/tool.ts:69](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L69)

---

### executionId

• `Optional` **executionId**: `string`

#### Defined in

[packages/agents/src/interfaces/tool.ts:70](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L70)

---

### userId

• `Optional` **userId**: `string`

#### Defined in

[packages/agents/src/interfaces/tool.ts:71](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L71)

---

### sessionId

• `Optional` **sessionId**: `string`

#### Defined in

[packages/agents/src/interfaces/tool.ts:72](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L72)

---

### metadata

• `Optional` **metadata**: [`TToolMetadata`](../modules#ttoolmetadata)

#### Defined in

[packages/agents/src/interfaces/tool.ts:73](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L73)

---

### parentExecutionId

• `Optional` **parentExecutionId**: `string`

Parent execution ID for hierarchical tool execution tracking

#### Defined in

[packages/agents/src/interfaces/tool.ts:78](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L78)

---

### rootExecutionId

• `Optional` **rootExecutionId**: `string`

Root execution ID (Team/Agent level) for complete execution tree tracking

#### Defined in

[packages/agents/src/interfaces/tool.ts:81](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L81)

---

### executionLevel

• `Optional` **executionLevel**: `number`

Execution depth level (0: Team, 1: Agent, 2: Tool, etc.)

#### Defined in

[packages/agents/src/interfaces/tool.ts:84](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L84)

---

### executionPath

• `Optional` **executionPath**: `string`[]

Execution path array showing the complete execution hierarchy

#### Defined in

[packages/agents/src/interfaces/tool.ts:87](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L87)

---

### realTimeData

• `Optional` **realTimeData**: `Object`

Real-time execution data for accurate tracking (no simulation)

#### Type declaration

| Name                 | Type                                            | Description                                 |
| :------------------- | :---------------------------------------------- | :------------------------------------------ |
| `startTime`          | `Date`                                          | Actual execution start time                 |
| `actualParameters`   | [`TToolParameters`](../modules#ttoolparameters) | Actual input parameters passed to the tool  |
| `estimatedDuration?` | `number`                                        | Tool-provided estimated duration (optional) |

#### Defined in

[packages/agents/src/interfaces/tool.ts:90](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L90)

---

### extensions

• `Optional` **extensions**: `Record`\<`string`, `TToolContextExtensionValue`\>

Additional tool execution context extensions.

IMPORTANT:

- Avoid ad-hoc top-level fields to keep the contract stable.
- Use this map for forward-compatible extra data with constrained value types.

#### Defined in

[packages/agents/src/interfaces/tool.ts:106](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L106)

---

### ownerType

• `Optional` **ownerType**: `string`

Owner context propagated from EventService

#### Defined in

[packages/agents/src/interfaces/tool.ts:109](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L109)

---

### ownerId

• `Optional` **ownerId**: `string`

#### Defined in

[packages/agents/src/interfaces/tool.ts:110](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L110)

---

### ownerPath

• `Optional` **ownerPath**: [`IOwnerPathSegment`](IOwnerPathSegment)[]

#### Defined in

[packages/agents/src/interfaces/tool.ts:111](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L111)

---

### sourceId

• `Optional` **sourceId**: `string`

#### Defined in

[packages/agents/src/interfaces/tool.ts:112](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L112)

---

### eventService

• `Optional` **eventService**: [`IEventService`](IEventService)

Tool-call scoped EventService instance.
Caller (ExecutionService/ToolExecutionService) is responsible for providing
an ownerPath-bound EventService for this tool call.

#### Defined in

[packages/agents/src/interfaces/tool.ts:119](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L119)

---

### baseEventService

• `Optional` **baseEventService**: [`IEventService`](IEventService)

Unbound base EventService instance.

Required when a tool needs to create another owner-bound EventService
for a different owner (e.g., creating an agent from a tool call).

NOTE: Do not wrap an already owner-bound EventService to bind a different owner.
Owner-bound instances must not be layered across different owners.

#### Defined in

[packages/agents/src/interfaces/tool.ts:130](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/interfaces/tool.ts#L130)
