agents / Exports / IProgressReportingTool
Interface: IProgressReportingTool
🆕 IProgressReportingTool - Optional interface for tools that can provide their own progress information
This interface extends the standard IToolInterface to allow tools to optionally provide:
- Estimated execution duration
- Step-by-step execution plans
- Real-time progress callbacks
Benefits:
- Tools can provide accurate progress information based on their internal knowledge
- No simulation or fake progress - only real tool-provided estimates
- Completely optional - existing tools work unchanged
- Tools can self-report progress for better user experience
Hierarchy
↳
IProgressReportingTool
Table of contents
Properties
Methods
- getEstimatedDuration
- getExecutionSteps
- setProgressCallback
- execute
- validate
- validateParameters
- getDescription
Properties
schema
• schema: IToolSchema
Tool schema
Inherited from
Defined in
packages/agents/src/interfaces/tool.ts:207
Methods
getEstimatedDuration
▸ getEstimatedDuration(parameters): number
Get estimated execution duration for given parameters (optional)
Tools can implement this to provide accurate time estimates based on:
- Parameter complexity (e.g., search query length, file size)
- Historical execution data
- Internal optimization knowledge
Parameters
| Name | Type | Description |
|---|---|---|
parameters | TToolParameters | The parameters that will be passed to execute() |
Returns
number
Estimated duration in milliseconds, or undefined if not available
Defined in
packages/agents/src/interfaces/progress-reporting.ts:51
getExecutionSteps
▸ getExecutionSteps(parameters): IToolExecutionStep[]
Get execution steps for given parameters (optional)
Tools can implement this to provide step-by-step execution plans:
- webSearch: [query processing, API call, result parsing, filtering]
- fileSearch: [file scanning, content reading, pattern matching, result formatting]
- github-mcp: [authentication, API request, response processing, data transformation]
Parameters
| Name | Type | Description |
|---|---|---|
parameters | TToolParameters | The parameters that will be passed to execute() |
Returns
Array of execution steps, or undefined if not available
Defined in
packages/agents/src/interfaces/progress-reporting.ts:64
setProgressCallback
▸ setProgressCallback(callback): void
Set progress callback for real-time updates (optional)
Tools can implement this to provide real-time progress updates during execution:
- Called when each step starts/completes
- Progress value between 0-100 representing completion percentage
- Step name helps users understand what's currently happening
Parameters
| Name | Type | Description |
|---|---|---|
callback | TToolProgressCallback | Function to call with progress updates |
Returns
void
Defined in
packages/agents/src/interfaces/progress-reporting.ts:76
execute
▸ execute(parameters, context?): Promise<IToolResult>
Execute the tool with given parameters
Parameters
| Name | Type |
|---|---|
parameters | TToolParameters |
context? | IToolExecutionContext |
Returns
Promise<IToolResult>
Inherited from
Defined in
packages/agents/src/interfaces/tool.ts:212
validate
▸ validate(parameters): boolean
Validate tool parameters
Parameters
| Name | Type |
|---|---|
parameters | TToolParameters |
Returns
boolean
Inherited from
Defined in
packages/agents/src/interfaces/tool.ts:217
validateParameters
▸ validateParameters(parameters): IParameterValidationResult
Validate tool parameters with detailed result
Parameters
| Name | Type |
|---|---|
parameters | TToolParameters |
Returns
Inherited from
IToolInterface.validateParameters
Defined in
packages/agents/src/interfaces/tool.ts:222
getDescription
▸ getDescription(): string
Get tool description
Returns
string