Skip to content

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

Table of contents

Properties

Methods

Properties

schema

schema: IToolSchema

Tool schema

Inherited from

IToolInterface.schema

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

NameTypeDescription
parametersTToolParametersThe 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

NameTypeDescription
parametersTToolParametersThe parameters that will be passed to execute()

Returns

IToolExecutionStep[]

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

NameTypeDescription
callbackTToolProgressCallbackFunction 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

NameType
parametersTToolParameters
context?IToolExecutionContext

Returns

Promise<IToolResult>

Inherited from

IToolInterface.execute

Defined in

packages/agents/src/interfaces/tool.ts:212


validate

validate(parameters): boolean

Validate tool parameters

Parameters

NameType
parametersTToolParameters

Returns

boolean

Inherited from

IToolInterface.validate

Defined in

packages/agents/src/interfaces/tool.ts:217


validateParameters

validateParameters(parameters): IParameterValidationResult

Validate tool parameters with detailed result

Parameters

NameType
parametersTToolParameters

Returns

IParameterValidationResult

Inherited from

IToolInterface.validateParameters

Defined in

packages/agents/src/interfaces/tool.ts:222


getDescription

getDescription(): string

Get tool description

Returns

string

Inherited from

IToolInterface.getDescription

Defined in

packages/agents/src/interfaces/tool.ts:227

Released under the MIT License.