Skip to content

agents / Exports / ProgressReportingTool

Interface: ProgressReportingTool

🆕 ProgressReportingTool - Optional interface for tools that can provide their own progress information

This interface extends the standard ToolInterface 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: ToolSchema

Tool schema

Inherited from

ToolInterface.schema

Defined in

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

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
parametersToolParametersThe 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): ToolExecutionStep[]

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
parametersToolParametersThe parameters that will be passed to execute()

Returns

ToolExecutionStep[]

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
callbackToolProgressCallbackFunction to call with progress updates

Returns

void

Defined in

packages/agents/src/interfaces/progress-reporting.ts:76


execute

execute(parameters, context?): Promise<ToolResult>

Execute the tool with given parameters

Parameters

NameType
parametersToolParameters
context?ToolExecutionContext

Returns

Promise<ToolResult>

Inherited from

ToolInterface.execute

Defined in

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


validate

validate(parameters): boolean

Validate tool parameters

Parameters

NameType
parametersToolParameters

Returns

boolean

Inherited from

ToolInterface.validate

Defined in

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


validateParameters

validateParameters(parameters): ParameterValidationResult

Validate tool parameters with detailed result

Parameters

NameType
parametersToolParameters

Returns

ParameterValidationResult

Inherited from

ToolInterface.validateParameters

Defined in

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


getDescription

getDescription(): string

Get tool description

Returns

string

Inherited from

ToolInterface.getDescription

Defined in

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

Released under the MIT License.